DBGrid - multiple Table read with TZConnection, TZQuery Prob
Posted: 07.09.2009, 18:45
I try to use a DBGrid Object to display data from a MySQL database with 3 tables containing normalized data. So I created a test app, put TZConnection with connection information to the MySQL database, TZQuery (connection = TZConnection, SQL property = select * from tracks, album, artists where tracks.trArtistId = artists.ArtistId and tracks.AlbumId = album.AlbumId order by tracks.AlbumId), TDataSource (Dataset = TZQery) and DBGrid (Datasource = TDataSource) on a Form. Setting the TZQuery property "Active" to True a Messagebox pops up with Error "SQL Error: No Database selected". I have a TCP/IP connection to the database, so the database property in TZConnection is empty, other database properties I cannot find.
What is wrong? Any help is wellcome.
Greetings
Werner
What is wrong? Any help is wellcome.
Greetings
Werner