Results 1 to 9 of 9

Thread: DNS problems

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Question

    Ok From the previous posting, I finally got it to work on my Personal web server!!!!!!!!!!
    BUT
    I can't get my remote server to see my DSN.....
    when I upload it to the www directory...
    If the DSN is specified in the local directory, does it change when it is uploaded? Or do I have to change the DSN on the remote server someway???

    HELP!!!!!!!!!!!!!!!!!!!!!!!!!

  2. #2
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149
    I would think the DSN needs to be set on the remote servers ODBC otherwise that machine doesnt know what the DSN is. If your using an access db there is away to go dirrectly to the DB file also.

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Unhappy Directly..

    What do you mean by going directly? How...
    Remember I'm a rookie!

  4. #4
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149
    you can set the connection to connect directly to the db file instead of going through ODBC

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Reply

    Any code for an example????
    Does this eliminate the need for a dsn?

  6. #6
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149
    its all just set in te connect string. don't have an example at the moment but I'll see what I can dig up for you.

  7. #7
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149
    Here is an example for you

    Code:
    Set con = CreateObject("ADODB.Connection")
        con.Open "PROVIDER='MICROSOFT.JET.OLEDB.4.0';User ID=;Password=; Data Source=-path to DB-;"
    
    'the sql command
    mysql = "SELECT * FROM table"
    
    'executes the sql
    con.Execute (mysql)
    Hope this helps

  8. #8

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Red face

    THANKS!!!!!!!!!!
    if my database is in the root directory of my web page,
    what path should I use?
    If i use c:, the isp server tells me that ...
    ------------------------------

    Microsoft JET Database Engine error '80004005'

    Could not find file 'C:\WINNT\system32\employees.mdb'.
    --------------------------
    SG

  9. #9
    Addicted Member
    Join Date
    Jun 2000
    Location
    Pittsburgh, PA
    Posts
    149
    try "C:\employees.mdb"

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