Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

method refresh of object Iadodc failed 1

Status
Not open for further replies.

ezroberts

Programmer
Apr 2, 2003
4
0
0
US
I get this error on the adodc1.refresh code line. I am using Access Database. Here is the revelant code:

asql = &quot;select * from messages where sendto = '&quot; & imuser & &quot;' and read <> 0&quot;
imclient.Adodc1.CommandType = adCmdText
imclient.Adodc1.ConnectionString = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; & datapath & &quot;;Persist Security Info=False&quot;
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.
 
Maybe read is a keyword and should be [read].
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top