问题描述
private:System::Voidbutton1_Click(System::Object^sender,System::EventArgs^e){String^selectSql=L"SELECT*FROMCustomersWHERE";if(this->textBox1->Text==String::Empty)selectSql+=L"1>0";elseselectSql+=L"CustomIDLIKE'"+this->textBox1->Text+L"'";selectSql+=L"AND";if(this->textBox2->Text==String::Empty)selectSql+=L"1>0";elseselectSql+=L"CompanyNameLIKE'"+this->textBox2->Text+L"'";this->dataSet1->Clear();this->sqlSelectCommand1->CommandText=selectSql;this->sqlDataAdapter1->Fill(this->dataSet1);}sqldataadpter可以预览datagridview只显示标题栏?
解决方案
时间: 2024-10-10 09:01:41