Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting records to SQL Server
Message
De
31/10/2001 16:06:22
 
 
À
31/10/2001 15:36:13
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
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:
00575871
Vues:
24
Is the insert statement the same as in your SqlPrepare() clause? If you are using the SqlPrepare() then you don't need to repeat the statement on SqlExec(). Just change the values on the variables and do nRes=SqlExec(nHan).

>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