DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: MS-Access / VB

  1. #1
    Chakrapani Guest

    MS-Access / VB


    Hi,

    How to access MS-Access database, using VB application. Here, MS-Access
    Db is not available on the local m/c. It is available on the LAN.

    I want to know how to create the ODBC connection for MS-Access. Will MS-Access
    does support RDO/ADO concept ??? If not how to over-come this situation ?

    Thanks in advance,
    chakri

  2. #2
    Arthur Wood Guest

    Re: MS-Access / VB


    Yes, MS Access can be accessed with ADO over a LAN, I do it all the time.


    your code (using Access 97) will look something like this:

    Dim conn as Connection
    Dim rs as Recordset
    Dim strSQL as String

    Set conn = New Connection
    conn.Provider = "Microsoft.Jet.OLEDB.3.51"
    conn.Mode = adModeReadWrite

    conn.Open "<your path to the database on the lan>"

    strSQL = "Select * from <your table in database>"

    set rs= New RecordSet
    rs.Open strSQL,conn

    <now you can use rs as you see fit>


    this is very sketchy, and you would probably want to work with this in a
    more scalable way, but this gives you the basic idea.

    I would suggest you might find the book "Visual Basic 6 Business Objects"
    by Rockford Lhotka to be informative.


    Arthur Wood


    "Chakrapani" <chakri_pani@india.dharma.com> wrote:
    >
    >Hi,
    >
    > How to access MS-Access database, using VB application. Here, MS-Access
    >Db is not available on the local m/c. It is available on the LAN.
    >
    > I want to know how to create the ODBC connection for MS-Access. Will

    MS-Access
    >does support RDO/ADO concept ??? If not how to over-come this situation

    ?
    >
    > Thanks in advance,
    > chakri



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links