zoltan_ie
April 16th, 2003, 12:19 PM
string m_sSelect = "SELECT Firstname, Secondname, [House Name], [House No], Street, Area, Postcode FROM VOTERSREGISTER WHERE [Postcode] = 'DUBLIN 6W'";
int m_nCurrentRow = 0;
...
...
...
public bool Read(ref DataSet ds)
{
SqlDataAdapter m_sda = new SqlDataAdapter(m_sSelect, m_sqlcConn);
ds.Clear();
try
{
m_sda.Fill(ds, m_nCurrentRow, 100, "VotingRegister");
}
catch(ERROR BLA DI BLA....)
{
return false;
}
if(0 == ds.Tables["VotingRegister"].Rows.Count)
return false;
m_nCurrentRow += 100;
return true;
}
This is the my code.
Now my problem is that I am using a DataSet to hold the return data and I place that data in a Table called VotingRegister. I feel thats a bit of a waste. Is there anyway that just insert the data into a DataTable? Also see the way I pull in 100 rows at a time. Is it possible to do the same with .Fill() if you use a DataTable? As I'm expect over 5000 records to be returned if I didn't do it in steps.
help please!
int m_nCurrentRow = 0;
...
...
...
public bool Read(ref DataSet ds)
{
SqlDataAdapter m_sda = new SqlDataAdapter(m_sSelect, m_sqlcConn);
ds.Clear();
try
{
m_sda.Fill(ds, m_nCurrentRow, 100, "VotingRegister");
}
catch(ERROR BLA DI BLA....)
{
return false;
}
if(0 == ds.Tables["VotingRegister"].Rows.Count)
return false;
m_nCurrentRow += 100;
return true;
}
This is the my code.
Now my problem is that I am using a DataSet to hold the return data and I place that data in a Table called VotingRegister. I feel thats a bit of a waste. Is there anyway that just insert the data into a DataTable? Also see the way I pull in 100 rows at a time. Is it possible to do the same with .Fill() if you use a DataTable? As I'm expect over 5000 records to be returned if I didn't do it in steps.
help please!