Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A strange problem about my sql pass through statements!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00063586
Message ID:
00063602
Vues:
49
Here's an example that works well for me. It uses extra code the control the ayns conenction. It's possible to use simpler but slower sync connections. *try to connect connHandle= sqlconnect("gestionff") *look if the connection was successful if connHandle < 0 wait "Impossible de se connecter à GestionFF par ODBC" window nowait timeout 1 return endif *now send the sqlstatement sqlprepare(connHandle, "select distinct custcode from historique where upper(custcode) like upper('%" + alltrim(.text3.value) + "%')" , "rv_custcode") *doing this do while...enddo beacause i'm using an async connection and need to check it it has finished do while sqlexec(connHandle) <= 0 *look if the statement failed if sqlexec(connHandle) < 0 wait "Erreur dans la recherche" window nowait timeout 1 return endif doevents enddo do while !eof("rv_custcode") * do the processing with the cursor "rv_custcode" enddo > >>Dear all, >> >>I am just beginning to start writing codes for C/S trials. One very >strange problem which occurs very often is the execution of spt statements. >Sometimes a spt executes successfully, and positive number is returned, >while, the same form, same spt fails at other times. I don't know what >causes the problem. Can someone suggest where I should look into? >> >>Many thanks. >> >>Best regards, >>Ron. > >Can you post an example of your code? It's hard to answer these kind of >questions without seeing what it is you are doing! --
-------------
Jonathan Gauthier

Administrateur de bases de données
Programmeur-Analyste, bases de données

fastfwd@netc.net
Net Communications
(514) 346-3401
ICQ: 7389446
-------------
"Summer is winter and you always knew"
Little Things - Bush X
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform