I get this error on the adodc1.refresh code line. I am using Access Database. Here is the revelant code:
asql = "select * from messages where sendto = '" & imuser & "' and read <> 0"
imclient.Adodc1.CommandType = adCmdText
imclient.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & datapath & ";Persist Security Info=False"
imclient.Adodc1.RecordSource = asql
imclient.Adodc1.Refresh
The same control is also used for a different sql statement in the forms load property. It works fine. If I delete tha and clause from the above code, the form works fine. Any suggestions would be greatly appreciated.
asql = "select * from messages where sendto = '" & imuser & "' and read <> 0"
imclient.Adodc1.CommandType = adCmdText
imclient.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & datapath & ";Persist Security Info=False"
imclient.Adodc1.RecordSource = asql
imclient.Adodc1.Refresh
The same control is also used for a different sql statement in the forms load property. It works fine. If I delete tha and clause from the above code, the form works fine. Any suggestions would be greatly appreciated.