INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Using a longvarchar type... Clob field

Using a longvarchar type... Clob field

(OP)
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...



RE: Using a longvarchar type... Clob field

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.

RE: Using a longvarchar type... Clob field

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

RE: Using a longvarchar type... Clob field

(OP)
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.  

RE: Using a longvarchar type... Clob field

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

RE: Using a longvarchar type... Clob field

(OP)
I created the note field and it works great.  Thanks!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close