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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help me plz! Problem with VFP using VB6.0 and ADO

Status
Not open for further replies.

0918060045

Programmer
Joined
Sep 23, 2003
Messages
2
Location
VN
I have a problem as follow:
I'm using VB 6.0 with ADO to insert data into Foxpro database (50. or 6.0). using VB, i want to insert the string into memo field of Foxpro. That string is that:
"abc" & chr(0) & "def"

But, after inserting into Fox database, it's only "abc", that means anything from chr(0) is removed from the string. Can you help to insert that string into memo field of Fox using VB with ADO. Thanks a lot
 
I've had the same problem trying to access a MSSQL database. The best guess I have is that somewhere in the underlying structure of ado or windows or something else is some C/C++ code that interprets the chr(0) (NULL) to indicate the end of a string. I've gotten around it by escapeing the chr(0) with a different character sequence and then re-extracting it as chr(0) later. Not pretty when using binary data. If there is some other solution, I would like to hear it.
 
Chr$(0) inserts (I believe) a Hex 0 into the string. That is the C string terminator and the underlying processing for dbf's is written in C. You probably need to use some other separator.
 
i can't not use another character as a delimiter. chr(0) is required strickly. thank for you reply
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top