Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting records to SQL Server
Message
From
31/10/2001 16:06:22
 
 
To
31/10/2001 15:36:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00574760
Message ID:
00575871
Views:
25
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform