R
RockDale
Hello, everybody:
String sql = "SELECT * FROM TABLE1;SELECT * FROM TABLE2;";
try{
SqlCeDataAdapter da = new SqlCeDataAdapter(sql, mDBConn);
da.Fill(ds);
for(int i=0;i<tableName.Length ;i++)
{
ds.Tables.TableName = tableName;
}
}catch(Exception ex){
MessageBox.Show(ex.Message.ToString());
}
The above ds.Fill(ds) caught error with the error message is empty
string. (What's the Mircosoft thinking)
But if the sql contains only one sql statement, then everything is ok.
Also it get the correct data if I execute the multiple select statement
in sqlce analyzer.
How should I fill in multiple table in one dataset?
String sql = "SELECT * FROM TABLE1;SELECT * FROM TABLE2;";
try{
SqlCeDataAdapter da = new SqlCeDataAdapter(sql, mDBConn);
da.Fill(ds);
for(int i=0;i<tableName.Length ;i++)
{
ds.Tables.TableName = tableName;
}
}catch(Exception ex){
MessageBox.Show(ex.Message.ToString());
}
The above ds.Fill(ds) caught error with the error message is empty
string. (What's the Mircosoft thinking)
But if the sql contains only one sql statement, then everything is ok.
Also it get the correct data if I execute the multiple select statement
in sqlce analyzer.
How should I fill in multiple table in one dataset?