Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5, SQLEXEC into Oracle Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00137462
Message ID:
00138610
Views:
34
Laurisa,

I think you've run into VFP's 255 byte limit on a single string. This is easily solved by just concatanating smaller strings together. Try this:
vtest3=sqlexec(vtest,;
 "insert into pmwrkord (pmwrkord_code,spbldinf_code,spbldrom_code,;
 pmshop_code,pmpricd_code,pmactv_code,pmbldsys_code,pmfacprj_code,"+;
 "its_current_date,status,wo_type,description) ;
	values (9200014,'ALKICC','101','SSS','2','EVEN',;
        'SERV','WP31401',?dtoday,'O','D','A Test')")
Note that the first string ends at the end of the third line and is concatenated to the string that starts on the fourth line with a ".

>Sure...
>
>vtest3=sqlexec(vtest,;
> "insert into pmwrkord (pmwrkord_code,spbldinf_code,spbldrom_code,;
> pmshop_code,pmpricd_code,pmactv_code,pmbldsys_code,pmfacprj_code,;
> its_current_date,status,wo_type,description) ;
> values (9200014,'ALKICC','101','SSS','2','EVEN',;
> 'SERV','WP31401',?dtoday,'O','D','A Test')")
>
>Laurisa
>
>>There's a limit to how long a VFP command can be and Oracle may have a limit as well, but you don't appear to be anywhere near it (I think the VFP limit is 2k). Can you give an example of an exact line of code that doesn't work?
>>
>>>Ok, now I've got a second question. Is there a limit to either the # of characters or parameters that can be sent with an sqlexec command? Here's what I've got so far.
>>>
>>>vtest=sqlconnect('TESTSPAN','SPANFM','SPANFM')
>>>dtoday=DATETIME()
>>>vtest3=sqlexec(vtest,;
>>> "insert into pmwrkord (pmwrkord_code,spbldinf_code,spbldrom_code,;
>>> pmshop_code,pmpricd_code,pmactv_code,pmbldsys_code,pmfacprj_code,;
>>> its_current_date,status,wo_type) ;
>>> values (9200014,'ALKICC','101','SSS','2','EVEN',;
>>> 'SERV','WP31401',?dtoday,'O','D')")
>>>vtest4=sqldisconnect(vtest)
>>>
>>>If I add another field/value combination it fails by saying I have a syntax error and I've swapped the field/value so I know it's not a spelling issue. Is there something else I'm missing?
>>>TIA
>>>Laurisa Watkins
>>>Seattle Parks Dept.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform