Results 1 to 4 of 4

Thread: File DSN????

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Location
    Kalix, Norrbotten, SWEDEN
    Posts
    343

    Question File DSN????

    Hi!

    I have a little problem connecting to a File DSN.

    When I try connect to a System DSN there is no problem.
    This is the syntax I use to connect to the System DSN:

    Dim cn
    Set cn = Server.CreateObject("ADODB.Connection")
    cn.open "DSN=Data"

    What is the exact syntax for setting up a connection
    based on a File DSN??

    The File DSN file, where should I place it?? In the same
    folder as the ASP page??

    /Smirre
    Visual Basic
    C, C++
    Java
    Access
    SQL Server

    MCP, MCSD

  2. #2
    Frenzied Member seoptimizer2001's Avatar
    Join Date
    Apr 2001
    Location
    Toledo, Ohio USA GMT -5
    Posts
    1,075
    You can set it up through ODBC or copy and paste it into Program Files\Common Files\ODBC\Data Sources.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Location
    Kalix, Norrbotten, SWEDEN
    Posts
    343

    Setting up a DSN....

    Hi!

    I know how to setup the actual DSN File through ODBC. The problem is when I try to access it from my code on the ASP page. It only returns errror Data Source not found when I connect to the File DSN the same way as I connect to a System DSN.

    I have tried to copy the file to the same catalog as the ASP page is in. From the beginning the file is located in the standard ODBC Data Source catalog.

    Any ideas on how to fix this???

    /Smirre
    Visual Basic
    C, C++
    Java
    Access
    SQL Server

    MCP, MCSD

  4. #4
    kayoca
    Guest

    try this..

    You can try this..
    Code:
    .Open "FILEDSN=C:\inetpub\wwwroot\yoursite\yourdsn.dsn", "Admin", ""

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