Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a longvarchar type... Clob field

Status
Not open for further replies.

suntanme

Programmer
Jul 20, 2002
16
US
I'm trying to save a large number of characters to a longvarchar data type using Pervasive V8.

The syntax below worked great for a char field which is limited to a size of 256.

cvaccess->SetFieldValue(COleVariant(fieldname),COleVariant(*datavalue));

After converting the field from char to longvarchar, I can't figure out how to get the the data to it. I have tried numerous methods and none seem to work. Any suggestions would be greatly appreciated.

Thank you...



 
I assume you're using the api's for direct access to the btr or mkd file. I attempted this several months ago and gave up since I couldn't find any good documentation or examples in VB. I finally created a simple char field and set a string field in VB "Var As String * 1500". However, if I wanted to convert it over to ODBC, I couldn't because of the 255 character limitation. Maybe there's an easier way to work with huge fields in btrieve that I'm missing. I apologize in advance if I misunderstood your post.
 
Sounds like you're trying to use the ActiveX controls. If that's the case, it doesn't support the new LongVarChar field type. It only supports the old style Note or LVAR field. The LongVarChar field is actually an 8 byte pointer (4 byte offset and 4 byte length).
Hope this helps.


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Thank you for keeping me from continuing down a dead end. You are both correct. I am using the ActiveX controls and need to store records of approximately 4000 characters in a field. The tables were all setup from the start on V8. Is it possible to roll back and use the old Note field? I am open to any suggestions as this seems like a catch 22.
 
You should be able to use the Note field. If you can get it created. None of the current tools can create a note field

info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
I created the note field and it works great. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top