P
Paul Mars
I think it is my SQL code that is causing the failure here. I receive "An
unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in
system.data.dll" on the second to last line below. What's wrong?
conUserInfo.Open()
Dim cmdAdd As OleDb.OleDbCommand = New OleDb.OleDbCommand
cmdAdd.CommandText = "INSERT UserGame VALUES " & strUserID & ", " &
strPassword & ", " & strAge & ", " & strGender & ", " & blnSound & ", " &
blnSoundAsLast & ", " & decGameSize & ", " & blnSizeAsLast & ", " &
strImagePlacement & ", " & blnImagePlacementAsLast & ""
also tried
cmdAdd.CommandText = "INSERT UserGame VALUES '" & strUserID & "', '" &
strPassword & "', '" & strAge & "', '" & strGender & "', " & blnSound & ", "
& blnSoundAsLast & ", " & decGameSize & ", " & blnSizeAsLast & ", '" &
strImagePlacement & "', " & blnImagePlacementAsLast & ""
also tried other variations
cmdAdd.Connection = conUserInfo
cmdAdd.ExecuteNonQuery()
conUserInfo.Close()
unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in
system.data.dll" on the second to last line below. What's wrong?
conUserInfo.Open()
Dim cmdAdd As OleDb.OleDbCommand = New OleDb.OleDbCommand
cmdAdd.CommandText = "INSERT UserGame VALUES " & strUserID & ", " &
strPassword & ", " & strAge & ", " & strGender & ", " & blnSound & ", " &
blnSoundAsLast & ", " & decGameSize & ", " & blnSizeAsLast & ", " &
strImagePlacement & ", " & blnImagePlacementAsLast & ""
also tried
cmdAdd.CommandText = "INSERT UserGame VALUES '" & strUserID & "', '" &
strPassword & "', '" & strAge & "', '" & strGender & "', " & blnSound & ", "
& blnSoundAsLast & ", " & decGameSize & ", " & blnSizeAsLast & ", '" &
strImagePlacement & "', " & blnImagePlacementAsLast & ""
also tried other variations
cmdAdd.Connection = conUserInfo
cmdAdd.ExecuteNonQuery()
conUserInfo.Close()