Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataTable.Load Method (IDataReader) Failure

Status
Not open for further replies.

paulgenga

Programmer
Jan 8, 2004
61
KE
Dear Friend,
This method of filling data tables worked perfectly until now...

For one particular SQL Statement, it returns only one Row (The last Row) omitting all the others. i.e. 1/10

Code:
Sub FillTable(ByVal strSQL As String, ByVal dt As DataTable)
Using reader As System.Data.Common.DbDataReader = SQLReader(strSQL)
   dt.Load(reader)
End Using
Please note --SQLReader(strSQL)-- returns DbDataReader[/color red]

The method below loops thru all the records including the omitted...
Code:
Using reader As System.Data.Common.DbDataReader = SQLReader(strSQL)
Do While reader.Read
...
Loop

Please advice me, what is wrong with the Method

Thanks
Paul

:-|Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top