Bantam
March 5th, 2003, 05:15 PM
Whenever I try to programatically execute:
"INSERT INTO tblCampRegistrations(fldRWUID, fldRegionID, fldYear, fldRWUIDDiscount) VALUES(" & strBlah & " , " & cmbRegion.SelectedIndex + 1 & " , " & cmbYear.SelectedItem & ")"
it throws an exception, the .tostring is:
System.InvalidCastException: Cast from type 'DataRowView' to type 'String' is not valid.
at Microsoft.VisualBasic.CompilerServices.StringType.FromObject(Object Value)
at Microsoft.VisualBasic.CompilerServices.ObjectType.StrCatObj(Object vLeft, Object vRight)
at RWUDatabase.frmRegister.cmdOK_Click(Object sender, EventArgs e)
I've taken out every single SQL line that's not required and I still get this, and the datatypes all seem to be ok. Any suggestions?
-Jacob the n00b
"INSERT INTO tblCampRegistrations(fldRWUID, fldRegionID, fldYear, fldRWUIDDiscount) VALUES(" & strBlah & " , " & cmbRegion.SelectedIndex + 1 & " , " & cmbYear.SelectedItem & ")"
it throws an exception, the .tostring is:
System.InvalidCastException: Cast from type 'DataRowView' to type 'String' is not valid.
at Microsoft.VisualBasic.CompilerServices.StringType.FromObject(Object Value)
at Microsoft.VisualBasic.CompilerServices.ObjectType.StrCatObj(Object vLeft, Object vRight)
at RWUDatabase.frmRegister.cmdOK_Click(Object sender, EventArgs e)
I've taken out every single SQL line that's not required and I still get this, and the datatypes all seem to be ok. Any suggestions?
-Jacob the n00b