Solved

Using C# with SQL Server Express/Standard

Posted on 2009-04-10
5
222 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
As a workaround consider importing temporarily into an Image column and then copying from there to a varbinary(MAX)
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now