Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linking Fox and Oracle
Message
 
 
To
18/06/1999 11:19:44
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00227943
Message ID:
00231889
Views:
17
>select sernum from pers where pers.sernum = m.sernum into array temp;
>if _tally <> 0
>yadda yadda
>

In Oracle, you have an index on the field Sernum in the Pers table? Next problem is you can not rely on _tally for the number of records returned by a SQL query against an Oracle table. Use tje RecCount function. _Tally is probably working because its value has not been reset to 0 after it already performed a VFP function that had already set it to a non-zero value.

If you are using SQL Passthru, do you build your select statement like:

lcSQL = "select sernum from pers where pers.sernum = " + m.sernum + " into array temp"

This assumes m.sernum is character. If numeric:

"... = " + str(m.sernum, nLength, nDecimals) + " into array temp"

I think you are better off retrieving into a cursor [delete the into array temp clause], then copy the results into an array from the cursor.

lnRetval = SQLExec(nConnectionHandle, lcSQL, "Results_Cursor_Name_Here")
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform