Solved

Microsoft SQL Server 2005 and longblob

Posted on 2006-06-22
6
1,791 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
Comment Utility
Image
0
 
LVL 20

Expert Comment

by:Sirees
Comment Utility
0
 
LVL 13

Expert Comment

by:devsolns
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 27

Expert Comment

by:ptjcb
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

762 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