[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Try Catch SQL insert PHP VFP oledb

Posted on 2011-09-11
1
Medium Priority
?
983 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 30

Accepted Solution

by:
Olaf Doschke earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month18 days, 6 hours left to enroll

831 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