|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
I have to display data in the grid with adodc and this code works fine.but I can't get the record count.It is giving error.Is there any way to get around this problem
Public Sub display_data_grid(Sql As String) Grd1.Refresh Adodc1.ConnectionString = Connect2Sourcedb.conn Adodc1.CursorLocation = adUseClient Adodc1.LockType = adLockOptimistic Adodc1.CursorType = adOpenDynamic Adodc1.RecordSource = Sql Grd1.Refresh Adodc1.Refresh MsgBox Adodc1.Recordset.RecordCount Set Grd1.DataSource = Adodc1 Grd1.Refresh Adodc1.Refresh Call setHeadings end sub |
|
#2
|
|||
|
|||
|
Review the documentation on the recordcount property, there are quite a few common reasons that it's not available (returns -1). Some providers don't support recordcount. You need a recordset that supports bookmarks to get a recordcount. And so on.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > ADODC problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|