Web Analytics Made Easy -
StatCounter Access DSN-Less Connection Strings - CodingForum

Announcement

Collapse
No announcement yet.

Access DSN-Less Connection Strings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access DSN-Less Connection Strings

    My company has given to temporary access to there load balanced web severs. I have written a simple “HTML” form to add to an access database. I have used ASP to do the connection to the database (DSN Less connection). I have loaded all my files on websever1 & webserver2 and I know that if I change one file I have to do the same to the other one on the second sever.

    The problem I have is the database is not a centralised.

    I know the path the network path for the database. Has anyone got any suggestions how I can use a DSN Less to MDB connection for this type of set-up. I just need the database in one location.

    I have tried putting in the network path in the connect string in the asp script that adds to the database but it tells me the there is an error

    I used something like

    DataSource1 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\\severname\folder\folder\datebse.mdb") & ";"

    Has anyone got any advice? My company will not spare a developer to assist me on this due to the project being short term and ad hoc.


    I hope this makes sense
    Kind regards,
    Mike Hughes

  • #2
    using Server.MapPath maps the file from the weblocation. if it's not located on the website and is on a different server, try removing Server.MapPath
    Code:
    DataSource1 = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=\\severname\folder\folder\datebse.mdb;"

    Comment


    • #3
      Thanks for this. I will try today and I will post back to ket you know how I get on.

      Mike.
      Kind regards,
      Mike Hughes

      Comment

      Working...
      X