Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting records to SQL Server
Message
De
31/10/2001 15:36:13
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
 
 
À
30/10/2001 20:04:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00574760
Message ID:
00575846
Vues:
23
Crescencio the following code works fine:

*******************************************************************************
nRes = SQLExec(nHan, "INSERT INTO jeinterface ( batch_Skey, co_code, usr_batch_id,per_end_date, sys_doc_type_code,usr_doc_type_suf,; max_dcml_places );
VALUES ( ?BatchSkey , ?CoCode, ?UsrBatchId, ?PerEndDate, ?SysDocTypeCode , ;
?UsrDocTypeSuf, maxdcmlplaces ) ")
*******************************************************************************

But when I added the following field I get a syntax error. Here is the code.

*******************************************************************************
MaxDcmlPlaces = 2

nRes = SQLExec(nHan, "INSERT INTO jeinterface ( batch_Skey, co_code, usr_batch_id,per_end_date, sys_doc_type_code,usr_doc_type_suf, max_dcml_places );
VALUES ( ?BatchSkey , ?CoCode, ?UsrBatchId, ?PerEndDate, ?SysDocTypeCode , ;
?UsrDocTypeSuf, ?MaxDcmlPlaces ) ")

*******************************************************************************
So as soon as I add the MaxDcmlPlaces variable I get the following error:
Command contains unrecognized phrase/keyword.

The field type in the SQL table is smallint, length 2, precision 5.
The strange think is that this is a syntax error from VFP.

Any clue of what is going on here.???????

Thanks,
Sergio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform