Am trying to read the primary key from an Access database table using
ExecuteScaler:
objSQLCommand = New OleDb.OleDbComm and
objSQLCommand.C onnection = objConnection
objSQLCommand.C ommandText = "SELECT PK_ID FROM tblBaz WHERE
FK_Item_ID=" & lintItemID & " AND Time_Sold=" &
cstrDateDelimit er & ldatDate & cstrDateDelimit er
lintID = objSQLCommand.E xecuteScalar()
(where cstrDateDelimit er is a constant "#")
I get the following error message on the ExecuteScalar command:
"A first chance exception of type 'System.Data.Ol eDb.OleDbExcept ion'
occurred in system.data.dll "
Can anyone a) tell me what I'm doing wrong or b) tell me how to get a
better idea of what the error is all about!?
Many Thanks
Sarah
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
ExecuteScaler:
objSQLCommand = New OleDb.OleDbComm and
objSQLCommand.C onnection = objConnection
objSQLCommand.C ommandText = "SELECT PK_ID FROM tblBaz WHERE
FK_Item_ID=" & lintItemID & " AND Time_Sold=" &
cstrDateDelimit er & ldatDate & cstrDateDelimit er
lintID = objSQLCommand.E xecuteScalar()
(where cstrDateDelimit er is a constant "#")
I get the following error message on the ExecuteScalar command:
"A first chance exception of type 'System.Data.Ol eDb.OleDbExcept ion'
occurred in system.data.dll "
Can anyone a) tell me what I'm doing wrong or b) tell me how to get a
better idea of what the error is all about!?
Many Thanks
Sarah
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
Comment