Solved

VB SQL Server

Posted on 2002-03-18
3
179 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

803 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