Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00065719
Message ID:
00065881
Vues:
44
>I can't see anything wrong with your insert statement. It looks like your specifying 6 columns and 6 values. Maybe someone else can see the problem.
>
>>Hello Jonh
>>
>>Thanks to help me
>>
>>I'm getting to do my insert sql
>>But i'm having anothers problems
>>
>>my connection work fine but i have to write all fields of my table
>>
>>resp=SQLEXEC(nCONECTAR,[INSERT INTO cadcli (cod_cli, nome_cli, tel_cli, fax_cli, email_cli) VALUES (1, 'Anderson Reis Girardi', 3664579, 3664579, 'ander@net1.com.br')],'cartoes')
>>
>>If i use the followisg sintax the odbc driver shows me a message
>>
>>"Connectivity error:[TCX][MyODBC] Column count doesn't match value count."
>>
>>Do you can help me?
>>
>>Thanks

One problem could be that you are sending a third parameter in your SQLEXEC that is not allowed. The only time the third parameter is used in SQLEXEC is to name a cursor that SQLEXEC would return via a SELECT statement. Your call should look like this:

resp=SQLEXEC(nCONECTAR, "INSERT INTO cadcli (cod_cli, nome_cli, tel_cli, fax_cli, email_cli) VALUES (1, 'Anderson Reis Girardi', 3664579, 3664579, 'ander@net1.com.br')")

It should also be noted that if there are only five columns in the cadcli table then the column list is not required.

HTH
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform