G
Guest
Hi
I am trying to access a row of data from an Access database based on info
entered into a textbox.
I "int.Parse" the textbox name so that I could use it in the "WHERE"
criteria, but I keep getting this error msg: "Data type mismatch in criteria
expression".
All the fields in the data table are "number" fields.
Can anyone give me any sugguestions?
Here's the the partial code:
int TotWageFld = int.Parse(txtTotWage.Text);
daDataAdapter=
new OleDbDataAdapter("SELECT * FROM StateTax " +
"WHERE fldLowerLimit <= '" +
TotWageFld +
"'AND " + "fldUpperLimit <= '" +
TotWageFld +
"'",cnADONetConnection);
Help,
CsharpNewcommer
I am trying to access a row of data from an Access database based on info
entered into a textbox.
I "int.Parse" the textbox name so that I could use it in the "WHERE"
criteria, but I keep getting this error msg: "Data type mismatch in criteria
expression".
All the fields in the data table are "number" fields.
Can anyone give me any sugguestions?
Here's the the partial code:
int TotWageFld = int.Parse(txtTotWage.Text);
daDataAdapter=
new OleDbDataAdapter("SELECT * FROM StateTax " +
"WHERE fldLowerLimit <= '" +
TotWageFld +
"'AND " + "fldUpperLimit <= '" +
TotWageFld +
"'",cnADONetConnection);
Help,
CsharpNewcommer