Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert SQL
Message
 
À
13/12/1997 01:41:34
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00065719
Message ID:
00065733
Vues:
30
Anderson,

First of, you need to do something about the delimiters in your SQLEXEC(). You're enclosing the SQL Statement in single quotes and using single quotes around the values. This won't work. Try this:

RESP=SQLEXEC(nCONECTAR,[INSERT INTO cartoes VALUES(0,0,'3', 'E', 'Another Room' )], 'MyCursor')

If you still have problems, use the AERROR() command to see if an error was returned by ODBC when you tried to INSERT the data. Even before that, make sure that you're connecting to the datasource correctly. nConectar should have a positive value after your SQLCONNECT().

>Hello All!!!
>
>I did create a connection with Mysql, but i'm having any problems to insert data in the table i'm using the follow sintax:
>
>
>CREATE CONNECTION tCONECTAR DATASOURCE MySQL USERID guest
>STORE SQLCONNECT("MySQL", "guest") TO nCONECTAR
>RESP=SQLEXEC(nCONECTAR,'INSERT INTO cartoes VALUES(0,0,'3', 'E', Another Room' )', 'MyCursor')
>=SQLDISCONNECT(nCONECTAR)
>
>But when i see in the table the data are'nt in the table
>
>Anyone knows what i have to do?
>
>
>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform