DSN Connection

Discussion in 'Databases' started by bmacdonald, May 11, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Can someone please explain how to use the Access ODBC Tool?
    The Data Source name apparantly has to begin with your user name.

    So I presume that in your code you refer to the DSN as such:
    "username_whatever"

    As for the "Path to Access DB File", how do you format that? Do I input a relative or absolute path to my Database? If I put in a relative path, is it relative to what?



    bmacd
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    With ASP, you can choose to connect to the database using different methods, DSN or DSNless

    If you use DSN (you'll have to create the DSN in the ODBC manager), and use the following connection string

    "DSN=mySystemDSN;Uid=myUsername;Pwd=myPassword"

    If you want to use DSNless connection, you can use the following connection string

    "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" & server.mappath("\test.mdb") & ";User ID=Admin;Password=dbpassword"


    For more information, you can review these articles

    http://www.able-consulting.com/ADO_Conn.htm
    http://www.learnasp.com/learn/dbopen.asp

    quote:Originally posted by bmacdonald

    Can someone please explain how to use the Access ODBC Tool?
    The Data Source name apparantly has to begin with your user name.

    So I presume that in your code you refer to the DSN as such:
    "username_whatever"

    As for the "Path to Access DB File", how do you format that? Do I input a relative or absolute path to my Database? If I put in a relative path, is it relative to what?



    bmacd
    </blockquote id="quote"></font id="quote">
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page