Solved

Microsoft SQL Server 2005 and longblob

Posted on 2006-06-22
6
1,809 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
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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.
Viewers will learn how the fundamental information of how to create a table.

840 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