im having error message saying "data type mismatch in criteria expression"
dim conn oledbconnection = new oledbconnection dim provider = "provider=microsoft.ace.oledb.12.0;data source =" dim datafile = "e:\tme review\tme review database.accdb" conn.connectionstring = provider & datafile conn.open() dim cmd oledbcommand = new oledbcommand("select * monthly [date ended]= '" + textbox3.text + "'", conn) dim dr oledbdatareader = cmd.executereader
[date ended] data type text , content of textbox3 string value. double checked. idea why getting error data type mismatch? in advance
check value inputted in textbox. in case you're filtering out records using date field, better check first value in textbox whether it's valid date or not before using oledbcommand.
dim cmd oledbcommand= nothing if isdate(textbox3.text)= true cmd= new oledbcommand("select * monthly [date ended]= '" + textbox3.text + "'", conn) end if
Comments
Post a Comment