Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CHR(13) and EXECSCRIPT() error
Message
 
To
19/09/2005 07:36:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01050807
Message ID:
01050810
Views:
9
#define CRLF CHR(13)+CHR(10)

IF !FILE('c:\temp\test.dbf')
CREATE TABLE c:\temp\test (nVal I autoinc, cText C(30), mText M)
ENDIF && FILE('c:\temp\test.dbf')

lcFldList = "cText, mText"
lcFldVal1 = "Text"
lcFldVal2 = ["Line 1" + CHR(13) + "Line 2"]
lcTbl     = "c:\temp\test"

lcInsertStr = "INSERT INTO " + lcTbl +;
              " (" + lcFldList + [) VALUES("] + lcFldVal1 + [",] + lcFldVal2 + [)]
?lcInsertStr

TRY
   *!* &lcInsertStr
   EXECSCRIPT(lcInsertStr)
CATCH TO loErr
   MESSAGEBOX("lcInsertStr failed" + CRLF + lcInsertStr + CRLF + loErr.message, 0, "Info")
ENDTRY
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform