>PROCEDURE HandleError(sAppName AS String, iErrNo AS Integer,; > sErrMessage AS String, sLineOfCode AS String,; > sProgram AS String, iLineNo AS int, sStack AS String) > > LOCAL iRetVal, sDateTime, sErrNo, sLineNo, sUserId, sMemory, sStatus > LOCAL sSqlCommand > > iRetVal = TRUE > > WITH This > > ** Setup the connection > IF .Setup() > > tDateTime = DATETIME() > sUserId = UPPER(ALLTRIM(SUBSTR(SYS(0), AT("#", SYS(0))+1))) > > TEXT TO sSqlCommand NOSHOW > > insert into syserrors > (datetime, error, line, message, codeline, program, > [user], appname) > values > (?tDateTime, ?iErrNo , ?iLineNo, ?sErrMessage, ?sLineOfCode, > ?sProgram, ?sUserId, ?sAppName) > > ENDTEXT > > >** Just added this code. Still prompted me for values >tDateTime = DATETIME() >sUserId = UPPER(ALLTRIM(SUBSTR(SYS(0), AT("#", SYS(0))+1))) >iErrNo = 1 >iLineNo = 2 >sErrMessage = "Some message" >sLineOfCode = "Some code" >sProgram = "Some program" >sAppName = "Some app name" > > > ** Run the insert command > ._oSQLProcs.SQLCommand(sSqlCommand) > > ** Check for and handle any errors that occured > ._CheckForSQLError() > > ENDIF > > ENDWITH > >RETURN > >ENDPROC > >>