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!

How to write to a Btrieve Memo Field that is NOT the last field (VB)

Status
Not open for further replies.

MarvinK9

Programmer
Jan 9, 2006
3
CA
Hi all,

I have a strange problem. I'm a VB Programmer and I'm trying to write to a predesigned database that has a longvarchar field. Editing the structure of the database is not an option as it is for a third party, pre-existing software.

The basic issue is that the database structure is as follows.
FIELD1 - CHAR - SIZE 2 - POSITION 1
FIELD2 - CHAR - SIZE 15 - POSITION 3
FIELD3 - CHAR - SIZE 23 - POSITION 18
FIELD4 - CHAR - SIZE 10 - POSITION 41
MEMO - LONGVARCHAR - SIZE 2048 - POSITION 51
MEMO_KEY - CHAR - SIZE 64 - POSITION 51

The pre-existing software writes to the MEMO_KEY field first and if the data is longer than 64 characters it writes the remaining text into the MEMO field.

I'm trying to write an Import utility to add data to this database, But I can not manage to write anything into the MEMO field.

Even using Pervasive Control Center and a standard SQL statement
Code:
INSERT INTO "INVE_WB_TEXT" VALUES ('LD','12345',' ','TESTTHIS','O THE END THAT SHOULD BE WRITTEN TO THE MEMO FIELD','THIS IS A 64 CHARACTER STRING WITH ADDITIONAL CHARACTERS ADDED T')
.... nothing is being written to the MEMO field and no errors are returned from my insert Statement.

I can program whatever I need to to fix this, but I don't understand why it doesn't work.... so fixing it, is kinda difficult, when I don't understand the problem.

Any help would be GREAT!

Thanks




 
As posted in the other thread:
WHat version of PSQL are you using?
A few observations/questions:
1. Your structure is wrong. You can't have two fields starting at the same position:
MEMO - LONGVARCHAR - SIZE 2048 - POSITION 51
MEMO_KEY - CHAR - SIZE 64 - POSITION 51

What is the exact record structure?

2. What interface are you using (Btrieve, ODBC, etc)?
THis probably won't work with ODBC(or SQL) without modifying the DDFs/data file. WOuld you be able/willing to use the Btrieve API instead of the ODBC/SQL interface?
3. Does the table pass a database consistency check?

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top