Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL INSERT FAILURE FROM VFP50! Help!
Message
De
06/11/1997 23:51:41
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
SQL INSERT FAILURE FROM VFP50! Help!
Divers
Thread ID:
00058811
Message ID:
00058811
Vues:
73
Once again I'm pulling out my hair. I got the previous sql problem solved by using ' instead of ". Now, the following snippet won't insert the record into SQL Server. If I use the following lcSQL with the expanded values in the statement, from ISQL-w it works just fine, from my program it returns -1. Help! Do I need to DBSet some property? I am not using a view but inserting directly into the table. ***************************************************************************** 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)
Répondre
Fil
Voir

Click here to load this message in the networking platform