John Baird
Coatesville, Pennsylvania, United States
General information
Title:
VFP and SQL SERVER 6.5
Well, you all solved the last dilemma that kept me pulling what little bit of hair I have left out. Here's another one for the SQL guru's
This is just like the previous one. The lcSQL statement works (the insert takes place) just fine in ISQL-w but fails in VFP (lcErrorCode)
is -1. Do I need the DBSET some property? Thanks in advance.
STORE SQLCONNECT('MyDataBase', 'sa') TO gnConnHandle
IF gnConnHandle <= 0
RETURN
ENDIF
lcLoginID='john'
lnSessionID = VAL(RIGHT(SYS(3) + SYS(3),10))
lnStudentID = 26
lcRemoteAddress = '177.100.100.98'
lcSQL = [INSERT INTO Sessions (SessionID, LoginID, LoginDate, UserType, UserID, ] +;
[CdromDrive, IPAddress, CurrentCourse, Comment) VALUES (] + ;
ALLTRIM(STR(lnSessionID)) + [, '] + lcLoginId +[', '] + TTOC(DTOT(DATE())) +;
[', 'STUDENT', '] + ALLTRIM(STR(lnStudentId)) + [', 'None', '] + lcRemoteAddress + [', ' ', ' ')]
lcErrorCode = SQLEXEC(gnConnHandle, lcSql)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only