Results 1 to 6 of 6
  1. #1
    Join Date
    May 2007
    Posts
    3

    Question Unanswered: Asynchronous ADO in VB6

    When requesting more than 'TOP 4900' records using AdSyncFetchNonBlocking, when client is on XP it dies and the app vanishes near the end of the transfer or sometimes before the transfer begins. Running same App on Win2000 SP4 even 'TOP 20,000' works fine. Database has 1.4 million records. The error message is Automation Error Client has disconnected. Any Ideas?

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Why don't you post your code so we can check it. Otherwise, we're trying to work blindfolded.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    May 2007
    Posts
    3

    Cool Sorry... Here is the code that fails from XP client

    Private WithEvents oADORS As ADODB.Recordset

    Private Sub cmdGo_Click()

    Set oADORS = New ADODB.Recordset
    oADORS.CursorLocation = adUseClient
    oADORS.CacheSize = 200
    Set oADOCN = New ADODB.Connection
    On Error Resume Next
    oADOCN.Open sConnStr
    oADORS.Open sSQL, oADOCN, , , adAsyncFetchNonBlocking

    'Sql string is like Select Top 5000 a,b,c,d FROM <Table>
    'I know there are more than 5000 when I do this.
    'It ends with Automation Error ...Disconnected from client, and the whole VB6 app just goes POOF!!!

    Exit Sub

    Private Sub oADORS_FetchComplete(ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
    On Error GoTo ErrH
    Set fg.DataSource = pRecordset 'Where fg is a vsFlexGrid
    fg.Refresh
    Exit Sub

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    and, is this SQL server or Access? (I want to try to recreate the error...)

    and, are oADORS and oADOCN declared at the form level, or globally?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  5. #5
    Join Date
    May 2007
    Posts
    3
    Sql Server 2000.
    Both variables are defined at the form level which stays up until after the Complete event.

  6. #6
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    One other question. On average, what's your extimate of the number of bytes per record?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

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