I keep getting an error when I try to execute and SQL query on VB6 - TechRepublic
Question
March 5, 2008 at 07:58 AM
13th

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

by 13th . Updated 18 years, 4 months ago

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.

This discussion is locked

All Comments