Invalid long field number

Discussion forum about all things SqlBase.
kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Invalid long field number

Post by kjellv » 07 Aug 2015, 09:29

hi

search the forum and found some articles about this, but did not help. I try to fetch a LONG VARCHAR into a column LONG STRING, but get the error "Invalid long field number"

Any one can explain me what to do?

Thanks

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2364
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Invalid long field number

Post by Jeff Luther » 07 Aug 2015, 17:28

You don't show the SELECT statement that is causing this error -- the error is during the fetch, correct? -- but my first thought is that the error is 'fooling' you and the cause of the problem is because the SELECT DB columns list or the INTO TW columns list are not matched correctly., data type for data type.

Here is how I would test this:
> Examine the SELECT statement carefully to see if there is a mismatch somewhere.

> If it looks OK, then try writing a simple test appl. and a query with that LONG DB column and Long String TW/Grid only. Does this work?

> If it does work, then build up the query to include more columns and work toward getting a simple test appl. with the complex SELECT you are having a problem with.

> If it does not work, then put together a small test LOAD file with a simple DB table, LONGVAR column + data, etc. And a simple TD appl. with a TW to query the data, zip it and attach to your new msg. in this thread.



To step back a bit, I think of debugging a problem like this as testing in 1 of 2 'directions':
1 -- Either start with a simple test case that does work and build toward the more complex (more columns, etc.) until the error you saw earlier now shows up again. This is what I suggest above;

2 -- Or start with your complex appl. and keep making it more simple until whatever code is causing the error now starts working.

#1 above is very often more easy to do (though not always) and with a simple test (DB table LOAD + test app.) you can zip it and other here can try to duplicate your problem.
Jeff Luther @ PC Design
Palm Springs, California

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests