String^ constring=L"datasource=localhost;port=3306;username=root;password=kocurka12"; MySqlConnection^ conDataBase=gcnew MySqlConnection(constring); MySqlCommand^ cmdDataBase=gcnew MySqlCommand("select * from database.new_table where model ='"+this->Search->Text+"' ",conDataBase); try{ MySqlDataAdapter^ sda=gcnew MySqlDataAdapter(); sda->SelectCommand=cmdDataBase; DataTable^ dbDataSet= gcnew DataTable(); sda->Fill(dbDataSet); BindingSource^ bSource = gcnew BindingSource(); bSource->DataSource=dbDataSet; dataGridView1->DataSource =bSource; sda->Update(dbDataSet); } catch(Exception^ ex){ MessageBox::Show(ex->Message); } }
dbDataSet.Rows.Count
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)