Solved

VB SQL Server

Posted on 2002-03-18
3
176 Views
Last Modified: 2010-05-02
Hello Experts:

I am currently working on an application that stores large blocks of text into a Sql 7.0 database.  The text being stored is a property description which can be several thousand characters long.  I have set up the column in Sql to be a Text datatype, which, from my understanding, stores large blocks of text.

The problem is, when the large blocks of text are stored in the database, the column displays <long text> and I can't retrieve this information from the database?  Any ideas?

VB 6.0 Sql 7
0
Comment
Question by:escheider
3 Comments
 
LVL 45

Expert Comment

by:aikimark
ID: 6877222
Look for online help references to handling memo fields.

Hint: GetChunk
0
 
LVL 18

Accepted Solution

by:
mdougan earned 25 total points
ID: 6877268
In SQL Server, you can define a varchar field of up to 8000 bytes, and not need to do any special recordset processing.  If you need to store more than 8000 characters, then you need to use the SQL Server Text datatype, but then whenever you open the recordset and move to a new record, you'll have to issue the RS.GetChunk method.

Basically, you tell it how many bytes to get at a time, and then you append the results to some program variable until the number of bytes actually gotten is less than the number of bytes that you requested, then you know you have received the whole field.

Likewise, when you go to update that column in the recordset, you have to AppendChunk block after block until you've appended the whole contents, and then, I believe that you need to issue an RS.UpdateBatch instead of an RS.Update (at least I've had to do that in some code samples that were updating Image fields...)
0
 
LVL 4

Author Comment

by:escheider
ID: 6886449
Thanks for the input guys, seemed to fix the problem
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

12 Experts available now in Live!

Get 1:1 Help Now