Solved

VB SQL Server

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

724 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