mahalakshmi_s
asked on
record count in vb.net
Hi,
what is the equivalent of rs.recordcount of VB6.0 in VB.NET ?
Dim connstr = "server=s07\mumford;uid=gd buser;pwd= gdbuser;da tabase=NyS ample"
Dim sqlConn3 As New SqlConnection(connstr)
sqlConn3.Open()
Dim rsNickNames_sqlcomm As New SqlCommand("SELECT * from tabNickName", sqlConn3)
Can we use like this or is it wise to use ADO ? Pls help,
Maha
what is the equivalent of rs.recordcount of VB6.0 in VB.NET ?
Dim connstr = "server=s07\mumford;uid=gd
Dim sqlConn3 As New SqlConnection(connstr)
sqlConn3.Open()
Dim rsNickNames_sqlcomm As New SqlCommand("SELECT * from tabNickName", sqlConn3)
Can we use like this or is it wise to use ADO ? Pls help,
Maha
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oops, I meant to say ".RecordCount" not ".Count" for the data adapters property.
ASKER
leavitt76,
I actaully needed for RecordCount only. But ur info abt ADO.NET was very useful though pictures are not available in that downloaded material :-(
Thanks
Maha
I actaully needed for RecordCount only. But ur info abt ADO.NET was very useful though pictures are not available in that downloaded material :-(
Thanks
Maha
ADO.Net has many changes from ADO. There is a good tutorial here:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1169&lngWId=10
As far as the count, you can get this from the .count property of your data adapter object once you get that far in your code. BTW: use a data adapter if you need a count, not a data reader which is forward only and does not support counts/updates.
Good luck.