Solved

Try Catch SQL insert PHP VFP oledb

Posted on 2011-09-11
1
922 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 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

738 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