Pulling TEXT datatype into a VB5 app 
Author Message
 Pulling TEXT datatype into a VB5 app

I'm pulling data out of FoxPro 2.6 tables and putting it into an Informix
database on OLWS 7.23, and am running into a problem.  The FoxPro program
uses "memo" fields to store notes, which are important to the users.  Some
of these notes are pretty large, possibly 3k or more, so a 255 character
field will not be enough.  I decided to use the TEXT field on Informix to
give me a large area to store notes and not be worried about running out of
room.  Unfortunately, I can't get the notes back *out* of the Informix

When I first converted the data, I couldn't shoot it directly from FoxPro
into Informix, because I kept getting a null error from FoxPro.  I had to
temporarily store it in a string variable, then put it into Informix, like

Dim rstQuery as recordset ' data coming from foxpro
Dim rstInformixTable as rdoResultset ' target on Informix database
Dim tmpString as string

set rstQuery = dbsFoxPro.OpenRecordset("vndmast", dbOpenDynaset)
SQL = "SELECT * FROM splrmast"
set rstInformixTable = conInformix.OpenResultset(SQL, rdOpenKeyset,

... ' code to loop through rstQuery and add record to rstInformixTable
tmpString = rstQuery!notes
rstInformixTable!notes = tmpString

... ' other code

This is the only way it would work.  Now that I have all the data in an
Informix db, I query a supplier id and try to get the notes back out, and I
get an invalid use of null error, even after testing it for null.  Here's
an example:

SQL = "SELECT * FROM splrmast WHERE splr_id = '00694'
set rstQuery = conSMS.OpenResultset(SQL, rdOpenKeyset)
' blah blah blah
if not isnull(rstQuery!notes) then
    tmpString = rstQuery!notes
    tmpString = ""
end if

When there is something in the field "notes", I get an "invalid use of
null" error when I try to assign it to tmpstring.  Note this is *after* the
isnull test is successful!

I need to be able to read the notes and put them into a text box on a form.
 Does anyone have any ideas?

Phillip Koebbe
Eagle-Picher Technologies, LLC.

Wed, 18 Jun 1902 08:00:00 GMT
 Pulling TEXT datatype into a VB5 app

Try looking up VB5 help for GetChunk()


>I'm pulling data out of FoxPro 2.6 tables and putting it into an Informix

Wed, 18 Jun 1902 08:00:00 GMT
 [ 2 post ] 

 Relevant Pages 

1. Conversion of Text datatype to Image datatype

2. convert image datatype to text datatype

3. All text datatypes vs. more specific datatypes

4. text datatype and char datatype

5. passing TEXT datatype to a sp, returning text (>8K) to sp_OAMethod from vb

6. BCP a text file into a column of Text dataType

7. Getting text into TEXT datatype

8. insert text from file into text-datatype

9. Full Text Searches on TEXT datatype ?

Powered by phpBB® Forum Software