Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert SQL
Message
 
To
13/12/1997 01:41:34
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brazil
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Miscellaneous
Thread ID:
00065719
Message ID:
00065733
Views:
35
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform