标签:des style blog ar color os sp for 数据
1.利用AdoConnect+AdoQuery链接SqlServer查询数据
int i,j,col,row; UnicodeString strSQL; strSQL = " select * from viewBasicLensProblem"; adoquery->Close(); adoquery->SQL->Clear(); adoquery->SQL->Add(strSQL); adoquery->Open(); col = qryBasic->FieldCount; row = qryBasic->RecordCount; strGrid1->ColCount = col; strGrid1->RowCount = row+1; for (i =1; i < row+1; i++) { for ( j =0; j< col; j++) { strGrid1->Cells[j][i] = qryBasic->Fields->Fields[j]->AsString; } qryBasic->Next(); }
标签:des style blog ar color os sp for 数据
原文地址:http://www.cnblogs.com/marlbora/p/4118736.html