Results 1 to 5 of 5

Thread: Guide me with ODBC's DAO Connectivity using MS Access in VB6.0

  1. #1
    Join Date
    Aug 2009
    Posts
    1

    Guide me with ODBC's DAO Connectivity using MS Access in VB6.0

    hEY ...PLS anyone has any idea about how to do ODBC Connectivity with MS Access using Visual Basic 6.0 . I'm making a project on " PLACEMENT ADMINISTRATION DATABASE " in which i create Student's Database containing student name, Roll no, Branch or stream to which they belong & Company's information consist of Company Name , Salary , Selection criteria.
    THIS ARE THE DATA FIELDS I WANT TO INSERT IN THE DATATABLE.

    pLEASE do send me STEP BY STEP procedure on how do i go on to build it ???
    I tried making it on my own by i couldn't connect it to the MS Access data table.

  2. #2
    Join Date
    Oct 2008
    Posts
    27

    Re: Guide me with ODBC's DAO Connectivity using MS Access in VB6.0

    Well its ADO (ActiveX Data Objects). Use ADO instead of DAO
    I think you need to go through the database connection part.
    Please go through this tutorial. If you still have any query please ask.

    If you still want to go with ADO then use this snippet

    Code:
    strConn= "ODBC;DSN=" & DatabaseName & ";UID=" & UserName
    & ";PWD=" & UserPassword
    set db=OpenDatabase("", False, False, strConn)

    See this example on "Visual Basic - open .accdb database using DAO"

    Hope this helps.

  3. #3
    Join Date
    Mar 2008
    Posts
    335

    Re: Guide me with ODBC's DAO Connectivity using MS Access in VB6.0

    You can manually establish a ODBC connection going to Control Panel ->Administrative Tools-> Data Sources -> System DSN, adding a new DataSource.

  4. #4
    Join Date
    Nov 2008
    Posts
    1,054

    Re: Guide me with ODBC's DAO Connectivity using MS Access in VB6.0

    Use a similar kind of code as given below (the variables or statements might alter but the basic idea is same):

    Code:
    Private Sub Form_Load()
    Set conn = New ADODB.Connection
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=path_of_your_database.mdb;Persist Security Info=False"
    conn.Open 
    End Sub
    But remember to close "conn" when you exit the main form.

  5. #5
    Join Date
    Oct 2010
    Posts
    1

    Re: Guide me with ODBC's DAO Connectivity using MS Access in VB6.0

    hi nityam, this ramakrishan, Please give me ur email id and i send complete database accessbility document to u.....

    Regards,

    Ramakrishan.

Similar Threads

  1. No ODBC Drivers available for Excel or Access in Windows 7
    By Mahican in forum Networking & Security
    Replies: 7
    Last Post: 01-11-2011, 12:59 PM
  2. Access 2007 gives "ODBC--call failed" error message
    By hARSH007 in forum MS Office Support
    Replies: 5
    Last Post: 01-12-2010, 08:11 AM
  3. Microsoft Access ODBC Driver for Vista 64 bit
    By Richard in forum Vista Help
    Replies: 4
    Last Post: 14-06-2010, 02:07 AM
  4. Replies: 3
    Last Post: 01-06-2009, 09:04 PM
  5. 64 bit ODBC driver for MS Access
    By Vera Noest in forum MS Office Support
    Replies: 2
    Last Post: 15-03-2007, 01:29 AM

Tags for this Thread

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
  •  
Page generated in 1,710,843,955.11633 seconds with 17 queries