Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Microsoft SQL Server 2005 and longblob

Posted on 2006-06-22
6
Medium Priority
?
1,856 Views
Last Modified: 2012-05-05
I have small upload program that I wrote for MySQL.  It uploads to a longblob field.  What would be the equivilant in Microsoft SQL Server 2005?
0
Comment
Question by:johnywhite
[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
6 Comments
 
LVL 20

Expert Comment

by:Sirees
ID: 16959625
Image
0
 
LVL 20

Expert Comment

by:Sirees
ID: 16959628
0
 
LVL 13

Expert Comment

by:devsolns
ID: 16959679
Well, it is ntext, text, and image data types.  BUT they will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

--DS
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 27

Expert Comment

by:ptjcb
ID: 16959700
Is this an image or a text object? If it is an image, then SQL has the image data type. If it is a text, then varchar(max) or varbinary(max).
0
 
LVL 20

Accepted Solution

by:
Sirees earned 2000 total points
ID: 16959706
SQL Server 2005 has new VARCHAR(MAX) data type - along with NVARCHAR(MAX) and VARBINARY(MAX) - with the ability to store up to 2GB of data, supplementing TEXT, NTEXT, and IMAGE data types.

Source: http://www.databasejournal.com/features/mssql/article.php/10894_3432541_2
0
 

Expert Comment

by:Dr3Pc
ID: 17097323
if your running MS SQL 2000, take a look at this feed

http://forums.mysql.com/read.php?60,18474,30679

It migrates from MySQL to MSSQL.

If your running MS SQL 2005 or later, then you should use the VARBINARY(MAX) field. Being LONGBLOB, this is a type of Binary field, so this is most appropriate.

Although in the MySQL documentation, it states that LONGBLOB can habve up to 4GB or (2^32-1), From everything I have read and my own experience, it is only possible to reach 1GB. This may actually be an aid as MSSQL offers only up to 2GB. Keep in mind for the future, if you need to migrate fields back to MySQL, don't make them larger than 1GB in MSSQL.

Hope this helps.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

636 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