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="">guide </a>. I placed an Adodc item on the form and I successfully bound textboxes to the fields of the database.
The problem is when I put a command on a button, this specifically:<br><Br>
Adodc1.SQL = "select * from artist order by artistname"<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.
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.

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.

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

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!! ...

Related Discussions

Related Forums