Hi. I just started using System.Data.SQLite and really like it. I do however have some trouble with a to me simple query. I have three tables, tblArtist, tblAlbum, tblTrack I guess you can figure out the relations yourself ;) Now I want to select 1 album with it's artist and tracks, so I use the following query
SELECT tblAlbum.AlbumName, tblAlbum.AlbumReleaseYear, tblTrack.TrackNumber, tblTrack.TrackName, tblTrack.TrackDuration, tblArtist.ArtistName, tblArtist.ArtistId, tblArtist.ArtistGenre
FROM tblAlbum
INNER JOIN tblTrack ON tblAlbum.AlbumId = tblTrack.AlbumId
INNER JOIN tblArtist ON tblAlbum.ArtistId = tblArtist.ArtistId
WHERE tblAlbum.AlbumId = " + id + " ORDER BY tblTrack.TrackNumber, tblTrack.TrackId ASC
However this returns nothing, but when I run the query in SQLServer using the same tables and data it returns what I'd expect it to. What am I doing wrong here?
-------------------------
Let me tell you what I'm doing wrong, I'm being stupid. No wonder you get no result when you enter the id from sql server into sqlite. Sorry for the post.