Question

Locked

I keep getting an error when I try to execute and SQL query on VB6

By 13th ·
Good morning/evening to you guys.<br><br>

I am creating a VB6 application connected to an Access database. <br>
I already set up an ODBC data source through this <a href="http://www.vb6.us/tutorials/database-access-ado-vb6-tutorial">guide </a>. I placed an Adodc item on the form and I successfully bound textboxes to the fields of the database.
<br><br>
The problem is when I put a command on a button, this specifically:<br><Br>
<b>
Adodc1.SQL = "select * from artist order by artistname"<br>
Adodc1.Refresh
</b><br><br>
I get a compile error saying "method or data member not found". and when I click the debug button, the ".SQL" part of the "Adodc1.SQL=...." command is highlighted.
<br><br>
I am making a program that creates playlists through genres or artist names. So I am planning to populate a listbox with all the artist names in my database. I have tried doing this using the normal data control and it worked. The only problem is I can't sort the artist names alphabetically with that object. So I resorted to using ADO but to no avail up to now.<br><br>

Thanks in advance guys.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

That's a very bad guide

by Tony Hopkinson In reply to I keep getting an error w ...

Try this instead

None of that dsn and design time twaddle.

http://en.allexperts.com/q/Visual-Basic-1048/Viewing-data-Access-VB6.htm

MS VB accessing Ms access, and he tells you to use ODBC...
sheesh

Collapse -

Thanks will try this

by 13th In reply to That's a very bad guide

Wow, that was quick.
Thanks. Will try this later.

Collapse -

Thanks!!! Works wonders!!!

by 13th In reply to That's a very bad guide

Thank you very much. Just tried it and worked the first time. <br>
I officially owe you and this site some cookies.<br>
Thanks again.

Collapse -

No problem <nt>

by Tony Hopkinson In reply to Thanks!!! Works wonders!! ...
Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums