P
ich habe sowas ähnliches schon mal beobachtet und bin der meinung das das ergebnis in die erste spalte erster datensatz geschrieben wird.. dass heisst deine tabelle hat als erste spalte zb artist und die variable m_artist, folglich ist der wert für m_artist (1.datensatz) gleich das ergebnis der abfrage... mir ist das mal bei einer distinct abfrgae aufgefallen... folgender code...
int selection=ArtistListBox.GetCurSel();
ArtistListBox.GetText(selection,SelectedCString);
CString SQLCommand="SELECT Distinct Album FROM MP3_db WHERE Artist='" + SelectedCString + "';";
Albumdb.Open(CRecordset::dynaset,SQLCommand);
while(!Albumdb.IsEOF())
{
temp=Albumdb.m_Artist; // die alben stehen jetzt in artist
AlbumListBox.AddString(temp);
UpdateData(FALSE);
Albumdb.MoveNext();
}
Albumdb.Close();
SQLCommand=" ";
ArtistListBox.GetText(selection,SelectedCString);
SQLCommand="SELECT Distinct Title FROM MP3_db WHERE Artist='" + SelectedCString + "';";
Albumdb.Open(CRecordset::dynaset,SQLCommand);
while(!Albumdb.IsEOF())
{
temp=Albumdb.m_Artist; // die title stehen jetzt in artist..
TitleListBox.AddString(temp);
UpdateData(FALSE);
Albumdb.MoveNext();
}
Albumdb.Close();
hoffe ich konnte helfen