Solved

Try Catch SQL insert PHP VFP oledb

Posted on 2011-09-11
1
895 Views
Last Modified: 2012-05-12
In my PHP script to connect Visual Foxpro with a SOAP web services server I would like to write the errors occured, directly in the Visual Foxpro tables. My interface between PHP and the VFox tables uses VFP Ole DB provider.
When I try to use the PHP Try Catch clause I never succeed wrting the errors returned in an error log.
All the other fields to log the error are writen without any issue. The sql command that I was trying to execute and returned an error, can't be writen in the error log VFox table.
I enclose my PHP scripts and some files with the command i'm trying to record in the error log table.
 PHP-interface-VFPoledbsetup.pdf
0
Comment
Question by:luciliacoelho
1 Comment
 
LVL 29

Accepted Solution

by:
Olaf Doschke earned 500 total points
ID: 36522300
'engano_aAW170AvariavelYEMAILSYnaoencontroupontoKincorrerAPZcriaremans_presAPreceitVerro_wsVtipoerroVrequestkeyVcod_reqVemailsVdtenvioVn
reqFPvaloresAPY2123451121928YVY0002000600010017YVYAYVYRegistoPrescricaoMedicamentosT2d333832353238333633313437303634TbdnpT280127
5TbdnpT28122514YV550VYruipontosantosATspsipontoptYVY11T09T201123A11A25YV94FPZFP'

Is too long, string literals can only be up to 254 chars long.

If you want to update a memo field with longer texts, then you could write this as 'part1(max254)'+'part2(max254)'+'part3max(254)' as split strings each maximum 254 chars long, in this case for example that could be:

UPDATE mafxpt SET env_erro ='engano_aAW170Avar...'+'reqFPvaloresAPY...'+'5TbdnpT28122514Y...'
WHERE nreq = 200"

Bye, Olaf.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question