Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert into Access Database from foxpro
Message
 
 
À
29/04/2009 19:22:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01397090
Message ID:
01397091
Vues:
65
>I am trying to insert records into an access database from foxpro.
>
>If I list my values explicitly, it works.
>But, if I put variables in, it doesn't work.
>
>Example:
>Works:
>STORE SQLCONNECT('RACE1') TO hndODBCIN
>sqlexec(hndodbcin,"insert into table2 values ('T1','T2')")
>
>Doesn't work:
>a= 'T1'
>b = 'T2'
>STORE SQLCONNECT('RACE1') TO hndODBCIN
>sqlexec(hndodbcin,"insert into table2 values (a,b)")
>
>Any ideas on how I can insert records in the access database?
>Has anyone had luck updating records in an access database?
>
>Thank you so much for your help, in advance.
>Laurie

Try
STORE SQLCONNECT('RACE1') TO hndODBCIN
sqlexec(hndodbcin,"insert into table2 values (?m.a,?m.b)")
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform