Solved

Using C# with SQL Server Express/Standard

Posted on 2009-04-10
5
228 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

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
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
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

622 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