Solved

VB SQL Server

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

Independent Software Vendors: 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

Suggested Solutions

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 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