Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TEXTMERGE something
Message
From
05/05/2007 16:29:55
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Miscellaneous
Thread ID:
01222744
Message ID:
01222773
Views:
23
>>>>>I am using TEXTMERGE to create SQL commands. I am trying to use it in an Automation Server that's called from an ASP page. Something strange. If I use it in my error method then line of code after it is not executed.
>>>>>...
>>>>>lcErrText = MESSAGE() + ' ' + cMethod + ' ' + STR(nLine)
>>>>>TEXT TO lcSql TEXTMERGE NOSHOW
>>>>> usp_UpdateErrors '<>'
>>>>>ENDTEXT
>>>>>This.mExecutesqlCommand(lcSql, '', '') && is not executed
>>>>>...
>>>>>if I use lcSql = "usp_UpdateErrors '" + lcErrText + "'" instead
>>>>>then everything is fine.
>>>>>Any idea?
>>>>>
>>>>>Thanks
>>>>
>>>>Hmmm,
>>>>Did you see the difference between:
>>>>usp_UpdateErrors tcErrText (with <<>> around tcErrText)
>>>>and
>>>>"usp_UpdateErrors '" + lcErrText + "'"
>>>>?
>>>I think I got code sample wrong:
>>>TEXT TO lcSql TEXTMERGE NOSHOW
>>> usp_UpdateErrors '<>'
>>>ENDTEXT
>>>Here how it should be.
>>
>>still did not work.
>>
>>TEXT TO lcSql TEXTMERGE NOSHOW
>>	usp_UpdateErrors '<<tcErrText>>'
>>ENDTEXT	
>>
>
>
>OK, what AERROR says?
>
>
>TEXT TO lcSql TEXTMERGE NOSHOW
>    usp_UpdateErrors '<<tcErrText>>'
>ENDTEXT	
>This.mExecutesqlCommand(lcSql, '', '') && is not executed
>** Because IO don't know what code you have in mExecutesqlCommand() method
>** I suggest you to put AERROR immediately AFTER  you executing the string
>
>***
>IF SQLEXEC(...., lcSQL,[CursorGoHere]) < 0
>   AERROR(laError)
>   MessageBox(laError[1,2]) && Or write it to LOG file if you build DLL
>ENDIF
>
Following does not create 'c:\error.txt'
TEXT TO lcSql TEXTMERGE NOSHOW
	usp_UpdateErrors '<<tcErrText>>'
ENDTEXT	
=AERROR(arr)
STRTOFILE(arr(1, 2), 'c:\error.txt')
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform