filling a dataset

Results 1 to 3 of 3

Thread: filling a dataset

  1. #1
    Join Date
    Dec 1969

    Default filling a dataset

    When filling a dataset with sql query, it chokes if I try retrieve above 50 records. Is there a way to set a value of how many rows my dataset ca hold?<BR><BR>Here is my code...<BR>cConnection myConnection = new OdbcConnection(mySQLConnStr); <BR> string SQL = "select * from residents";<BR> OdbcDataAdapter myCommand = new OdbcDataAdapter(SQL,myConnection);<BR> myCommand.FillSchema(<BR> DataSet ds = new DataSet();<BR> myCommand.Fill(ds,0,50,"residents");<BR> MyDataGrid.DataSource = ds.Tables["residents"];<BR>

  2. #2
    Join Date
    Dec 1969

    Default I don't get it...

    What&#039;s with the FillSchema in there? It&#039;s not completed.<BR><BR>And your code is explicitly limiting you to 50 records. Is that because a larger number blows up? Is that what you are saying?<BR><BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default What do you mean when you say "chokes"?

    Post the code you are using when it "chokes" and post your error.<BR><BR>Is there a reason that you are not using the built in paging functionality of DataGrids? Just curious.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts