Solved

Using C# with SQL Server Express/Standard

Posted on 2009-04-10
5
227 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

739 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