How to execute a query and check the results?
Posted: Thu 26 Jan 2012 21:52
Hello! I'm really new in visual c++ and newer in dbforge.I have a question and hope that someone will answer it.I started a database application,but my problem is that I can't execute and see the query results.As I can see visual c++ have created 2 codes:
Ok its very well made,but how can execute the mySqlCommand1 and see the results?
I have made a ritchtext box wich is supposed to show me the results:
How am I supposed to print the results inthere?PLEASE help me!
any replay is highly appreciated!
THANKS in advance!
Code: Select all
// mySqlCommand1
//
this->mySqlCommand1->CommandText = L"select *\r\nfrom Users";
this->mySqlCommand1->Connection = this->mySqlConnection1;
this->mySqlCommand1->Name = L"mySqlCommand1";
this->mySqlCommand1->Owner = this;
//
// mySqlConnection1
//
this->mySqlConnection1->ConnectionString = L"User Id=programm;Host=*******.net;Database=programm;Password=14"
L"7****;";
this->mySqlConnection1->Name = L"mySqlConnection1";
this->mySqlConnection1->Owner = this;
I have made a ritchtext box wich is supposed to show me the results:
Code: Select all
private: System::Void btntest_Click(System::Object^ sender, System::EventArgs^ e) {
box1-> Text =
}
any replay is highly appreciated!
THANKS in advance!