Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / June 2006

Tip: Looking for answers? Try searching our database.

ADO & local tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Franke - 17 Jun 2006 16:21 GMT
All of the examples that I have seen on hoe to use ADO/or ADOX seem to be
using an external ODBC driver (provider) or external MDB file.

Can anyone direct me to an example of how to use ADO or ADOX to access a
local table contained in the current project (MDB)?

Thanks!
Dave Patrick - 17 Jun 2006 20:52 GMT
   Dim cnn As ADODB.Connection
   Dim rs1 As ADODB.Recordset, rs2 As ADODB.Recordset
   Dim strSQL1 As String, strSQL2 As String
   Set cnn = CurrentProject.Connection
   Set rs1 = New ADODB.Recordset
   Set rs2 = New ADODB.Recordset
   strSQL1 = "SELECT GroupID, description1, " _
       & "description2, description3, description4, description5, " _
       & "description6, description7, Comment, Control, Node, Selectable "
_
       & "FROM lstDelays; "
   rs1.Open strSQL1, cnn, adOpenDynamic, adLockOptimistic
   rs1.MoveFirst
   Do While rs1.EOF = False
   'Do some stuff here
   rs1.MoveNext
   Loop
   rs1.Close
   cnn.Close

Signature

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| All of the examples that I have seen on hoe to use ADO/or ADOX seem to be
| using an external ODBC driver (provider) or external MDB file.
[quoted text clipped - 3 lines]
|
| Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.