Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLExec()
Message
De
09/04/2002 05:36:02
 
 
À
09/04/2002 05:06:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00642520
Message ID:
00642527
Vues:
21
Shaishav,

Did you configure SQL Server to be case sensitive? If yes, then you must specify object names (tables, fields, etc) using the exact case. Try the following:
SQLExec(gnConnHandle,'SELECT * FROM Orders','RESULT1')
Another thing to check if a SQLEXEC() fails is AERROR(). It will tell you what went wrong.

HTH
>I'm trying to establish connection to SQL 2000 database on a server on my LAN. I successfully created a connection using my ODBC data source. however, when i try to run SQL query using SQLExec, it fails.
>
>Following is my code; can any one help me in this.
>
>I'm trying to connect to ORDERS table of Northwind Database.
>
>STORE SQLCONNECT('MRAD', 'sa') TO gnConnHandle
>IF gnConnHandle < 0
> = MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
>ELSE
> = MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
> SQLExec(gnConnHandle,'SELECT * FROM ORDERS','RESULT1')
> SELECT RESULT1
> BROW
>ENDIF
>
>TIA
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform