Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using C# with SQL Server Express/Standard

Posted on 2009-04-10
5
Medium Priority
?
234 Views
Last Modified: 2013-12-17
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
Comment
Question by:bigphildogg86
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Andornagy
ID: 24119253
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
 

Author Comment

by:bigphildogg86
ID: 24120153
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
 

Author Comment

by:bigphildogg86
ID: 24120171
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
 
LVL 6

Accepted Solution

by:
Andornagy earned 1500 total points
ID: 24123445
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24124011
As a workaround consider importing temporarily into an Image column and then copying from there to a varbinary(MAX)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question