Results 1 to 6 of 6

Thread: [RESOLVED] adodc database path

  1. #1

    Thread Starter
    Junior Member macmatira's Avatar
    Join Date
    Mar 2010
    Posts
    21

    Resolved [RESOLVED] adodc database path

    when i transfering my file.mdb in other folder or location there is always a bug..

    what is the best code for these problem..
    (ADODC)

    pls help me...

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: adodc database path

    The best code for ADODC is not to use it.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    Junior Member macmatira's Avatar
    Join Date
    Mar 2010
    Posts
    21

    Re: adodc database path

    i used this code.

    Code:
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\All Users\Documents\mac try\try.mdb;Persist Security Info=False"
    what is the best alternative code, even i transfer the folder (containing the project, file.mdb and other files)?

    i can do this last year, but i forgot because i've stopped making program for a year.
    but i remember that i used the word "path" and other simbles like ' " * / and others..
    i don't know the exact codes
    but an example is a great help for me.

    pls help me...

    thank you.

  4. #4
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: adodc database path

    I have no idea. I avoid ADODC like a plague
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  5. #5
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: adodc database path

    look at this page:
    http://connectionstrings.com/access

    This has all you should need to creating a connection string for ADODB connection objects
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  6. #6

    Thread Starter
    Junior Member macmatira's Avatar
    Join Date
    Mar 2010
    Posts
    21

    Re: adodc database path

    the link does not answer my question.




    i got the answer for my question..

    i make a trial and error. trying different words then adding "." (period or dot).

    i found that using "app.path" which locates the path of the folder.

    i used this codes...

    Code:
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\try.mdb;Persist Security Info=False"
    ...
    thanks for your kindness...

Tags for this Thread

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