[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Try Catch SQL insert PHP VFP oledb

Posted on 2011-09-11
1
Medium Priority
?
964 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

649 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