Question Locked

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

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Good morning/evening to you guys.

I am creating a VB6 application connected to an Access database.
I already set up an ODBC data source through this guide . 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:


Adodc1.SQL = "select * from artist order by artistname"
Adodc1.Refresh

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.

Thanks in advance guys.

5 replies

by 13th

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

by 13th

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

This discussion is closed to new replies.