Ok... im rewriting the sql query and the tabel tomorrow ... im sleepy.
Thank you for your help :)
EDit: Actually, i stopped the sql server. I executed my code and strError should be something like ... "Coult not connect etc" but ... is blank .. no content :)
Here
bool GetListFromDb(List<String^>^ lst_strNames, String^% strError)
{
bool blnRetVal = true;
try
{
MySqlConnectionStringBuilder^ csb = gcnew MySqlConnectionStringBuilder();
csb->Server = "localhost";
csb->Database = "dumi";
csb->UserID = "dumi";
csb->Password = "dumi";
MySqlConnection^ conn = gcnew MySqlConnection(csb->ToString());
String^ strSQL = "SELECT * FROM `bla` WHERE (`ident` = '1' );";
MySqlDataReader^ rdr = (gcnew MySqlCommand(strSQL, conn))->ExecuteReader();
while(rdr->Read())
{
lst_strNames->Add(rdr["blah2"]->ToString()->Trim());
}
rdr->Close();
conn->Close();
}
catch(Exception^ exc)
{
blnRetVal = false;
}
return blnRetVal;
}
I dont see that strError is used .. Possibly you forgotted to write the output of the error ?