home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,269 of 10,840   
   Joe-Paul Robb, Jr. to All   
   ADO Data Control in VB 6.0   
   27 Oct 06 20:32:03   
   
   From: jprobb@seniortrans.com   
      
   Hello:   
      
   I am building a program in Visual Basic 6.0.  (Op Sys:  Windows XP 2002   
   Service Pack 2)   
      
   I placed an AOD Data Control on a form...and a data Grid.  I bound the data   
   grid to the data control.  Then used the following code to populate the data   
   control ...and thus, the grid:   
      
       With datPos   
           .ConnectionString = stConn   
           .RecordSource = sPosSQL   
           .Refresh   
       End With   
      
   stConn is the connection string   
   sPosSQL is the SQL Statement   
   Then I refresh the data control   
      
   I used the exact same language on a different form it the same program...and   
   it works fine.  I put it on this new form and I get the following error:   
        [ADODC]: Unknown error. [ADO];   
   Press "OK" and I get:   
       Run-time error '-2147467259 (80004005)'"   
       Method 'Refresh' of object "IAdodc' failed   
      
   To check out my SQL and be sure there was no error. I defined a   
   DAO.Recordset. and opened the recordset using set MyRST =   
   SUDB.OpenRecordset(sPosSQL) and  it opens... etc.   
      
   Does anyone have any idea why I'm getting that "unknown" error with the   
   program works elsewhere.   
      
   Thanks...   
      
   JP   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca