Subject | Param Value not correct |
---|---|
Author | Ed Dressel |
Post date | 2005-05-16T14:53:45Z |
I am assigning a value to a DSQL param but the value is not assigning
correctly. Below is the code I am using (revised only to fit in this
window).
CodeSite reports that the value of aClientID is 348 but the value of
the param ClientID right after assigning aClientID is 3. Because
Client_ID is a FK it raises an exception.
What am I doing wrong? It seems so simple!
Ed Dressel
//following line creates a TIB_DSQL object :-)
lDSQL := CreateDSQL(aTx, 'Insert into WebActionLog(CLIENT_ID,'+
'WebActionType_ID, Details) values (:ClientID,' +
':WebActionTypeID, :Details)');
try
try
lDSQL.Prepare;
CodeSite.Send('aClientID', aClientID); //aClientID = 348
lDSQL.ParamByName('ClientID').AsInteger := aClientID;
CodeSite.Send('lDSQL.ParamByName(''ClientID'').AsInteger',
lDSQL.ParamByName('ClientID').AsInteger); //param = 3
correctly. Below is the code I am using (revised only to fit in this
window).
CodeSite reports that the value of aClientID is 348 but the value of
the param ClientID right after assigning aClientID is 3. Because
Client_ID is a FK it raises an exception.
What am I doing wrong? It seems so simple!
Ed Dressel
//following line creates a TIB_DSQL object :-)
lDSQL := CreateDSQL(aTx, 'Insert into WebActionLog(CLIENT_ID,'+
'WebActionType_ID, Details) values (:ClientID,' +
':WebActionTypeID, :Details)');
try
try
lDSQL.Prepare;
CodeSite.Send('aClientID', aClientID); //aClientID = 348
lDSQL.ParamByName('ClientID').AsInteger := aClientID;
CodeSite.Send('lDSQL.ParamByName(''ClientID'').AsInteger',
lDSQL.ParamByName('ClientID').AsInteger); //param = 3