• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Using C# with SQL Server Express/Standard

I'm building a program in C# with a local database backend.  I was going to try to use MS SQL Server Express.  However I need to store binary files in the database and the byte limit of Server Express is 8000 bytes.  I was wondering if the standard edition would allow me to store files around 100 KB in size to binary fields.  And if so can I use the Standard edition to deploy with my program as a local database.  
0
bigphildogg86
Asked:
bigphildogg86
  • 2
  • 2
1 Solution
 
AndornagyCommented:
To store binary files You should use BLOB type. In SQL server it's called varbinary(max). There is no type difference between Express and Standard SQL Server.
0
 
bigphildogg86Author Commented:
Is it just a limitation of the GUI tool that came with the engine?  varbinary is there but it won't let me put a size larger than 8000 bytes.

0
 
bigphildogg86Author Commented:
Okay so in the designer I can make a varbinary(max) field but in the import tool, I'm trying to import from a mediumblob in a mysql database to this MS SQL database.  Maybe I'll just have to reimport the data?  It just won't let me put varbinary(max) as the destination type using the import.
0
 
AndornagyCommented:
If You have problem with import wizard, You should try workaround.
Try varchar(MAX) instead of varbinary(MAX).
or
You can try to transfer binary files other way than Import Wizard. With c# program or similar like this:
http://www.sqlusa.com/bestpractices2005/importimage/
0
 
Anthony PerkinsCommented:
As a workaround consider importing temporarily into an Image column and then copying from there to a varbinary(MAX)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now