Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird Error
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01152862
Message ID:
01152863
Vues:
34
The cursor name to create is the 3rd parameter
lnResult = SQLEXEC(thisform.wo_conn,lcSelectCmd, "crstest")
IF lnResult < 0
  * Proces ODBC error here using AERROR()
ENDIF
>Im trying to populate the textboxes on a form, frm MySQl.. this is the code:

>LPARAMETER twoid
>
>thisform.wo_conn = SQLSTRINGCONNECT("driver={mysql odbc 3.51 driver};server="+alltrim(settings.server)+";uid="+ALLTRIM(settings.user)+";pwd="+ALLTRIM(settings.pass)+";database=mysqldb;option=3") && connect to Mysql DB
>
>lcSelectCmd = 'select com, dat, r1,r2 ,wi from wo'+;
>' where wi=twoid into cursor crstest' && wi is the primary key in wo table
>
>SQLEXEC(thisform.wo_conn,lcSelectCmd)
>select crstest
>
>with this
>.txtcom.controlsource = "crstest.com"
>.txtdat.controlsource = "crstest.dat"
>.txtr1.controlsource = "crstest.r1"
>.txtr2.controlsource = "crstest.r2"
>end with
>
>I get the alias 'crstest' not found error..what gives
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform