Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command works in command windows but not program. Why?
Message
 
To
03/02/1999 04:28:02
Yin Min Chen
Nec Home Electronics(M) Sdn Bhd
Sungai Petani, Malaysia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00183323
Message ID:
00183334
Views:
14
In your program you need to see what SQLEXEC() is returning. If it returns -1, use AERROR() to see what error it returned. That might help you track down the problem. There certainly shouldn't be a difference between running these commands from the command window or in a program. Are you sure you're not doing anything different?

>I type the following commands in the command window and they work well :-
>
>h=sqlconnect("aimaceff")
>x=sqlexec(h, "select * from machine where maccode='111'")
>?sqlresult.descrip
>
>But, when i type the same commands in my program, and run the program, the error message "Alias 'SQLRESULT' is not found."
>
>Can anyone tell me why?
>
>For your information, aimaceff is the data source name for ODBC connection and machine table consists of maccode and descrip columns.
>
>Thank U.
Previous
Reply
Map
View

Click here to load this message in the networking platform