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,272 of 10,840   
   Geoff to Henning   
   Re: ADO Data Control in VB 6.0   
   29 Oct 06 01:16:41   
   
   From: NoSpam@No.com   
      
   "Henning"  wrote in message   
   news:4543d3da$0$32153$57c3e1d3@news3.bahnhof.se...   
   >   
   > "Joe-Paul Robb, Jr."  skrev i meddelandet   
   > news:71u0h.51$mX4.14@trndny03...   
   > > 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   
   > >   
   > >   
   > If the ADO control is on another Form, are you referencing the control on   
   > the correct path (Form)?   
   >   
   > /Henning   
   >   
   DAO.Recordset with ADO control ?   
      
   --- 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