Results 1 to 2 of 2

Thread: an error occured in connecting vb 6.0 to msaccess 2003

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2011
    Posts
    30

    an error occured in connecting vb 6.0 to msaccess 2003

    Dear Sir ,
    i have earlier connected vb 6.0 to ms acess 2003 via code in button
    '
    private sub save_click()

    Const strconnection as string = "provider = Microsoft.Jet.OLEDB.4.0;data source = c:\documents\db1.mdb; persist security info = false"
    dim cnn as new adodb.connection
    dim cmd as new adodb.command
    cnn.connection string = str connection
    cnn.open


    but this code is giving error as compile error as defined cnn as invalid
    please do needfull

    Regards
    Satish.S

  2. #2
    Lively Member S0LARIS's Avatar
    Join Date
    Apr 2011
    Posts
    121

    Re: an error occured in connecting vb 6.0 to msaccess 2003

    Hi,please check if you have appropriate reference to ADODB library (Tools-.References->Microsoft ActiveX data Object ...) ?
    If my post was helpful to you, then express your gratitude using Rate this Post.
    To understand recursion, you must first understand recursion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width