This just give me an empty msgbox, no string no nothing... why?
If sqlClientToList = "" Then sqlClientToList = "Select CName, CDate, CLength
FROM Clients ORDER BY CName"
Dim cnClientGridLoader As New System.Data.SqlServerCe.SqlCeConnection("data
source =\my documents\clientbase\clientbase.sdf") ---Dim dtTest as new datatable
Dim daClientGridLoader As New
System.Data.SqlServerCe.SqlCeDataAdapter(sqlClientToList,
cnClientGridLoader) ---daClientGridLoader.Fill(dtTest)
Dim dsClientGridLoader As New System.Data.DataSet dsClientGridLoader.Table.Add(dtTest)
msgbox(dtTest.rows.count)
Dim MyCountOfRecords As String
MyCountOfRecords = dsClientGridLoader.Tables(0).Rows.Count & " clients in
the table match your request."
MsgBox(MyCountOfRecords)
There are 5000 records in the client table. Doesn't make sense to me.
Any help would be appreciated, thanks.
Atley
Peter Foot said:
Using the Count property of the Rows collection:-
[C#]
ds.Tables["TableName"].Rows.Count
[VB]
ds.Tables("TableName").Rows.Count
Peter
--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com |
www.opennetcf.org
Atley said:
What is the best way to get a recordcount from a dataset? I can't
seem