1 Replies - 681 Views - Last Post: 13 April 2017 - 08:51 AM Rate Topic: -----

#1 gussy81  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 164
  • Joined: 24-February 15

connection query

Posted 13 April 2017 - 08:08 AM

hi,

i am moving a few pages from a web server onto our website.

i have copied all of the pages over and one of the asp pages connects to a access database and checks it for a record. if the record is in the database the user proceeds to the next page.

the location of the db has changed and im not sure this is the only change i need to make? please see my connection below. currently getting a 500 internal server error - so was thinking my syntax for path was wrong but not sure if theres mo0re to it....

set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= www.domain.com/TEST/myDB.mdb"

set rs=Server.CreateObject("ADODB.Recordset")
sql="select id from Refs where ID = '" & OurReference & "'"
rs.open sql,adoCon


Is This A Good Question/Topic? 0
  • +

Replies To: connection query

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13491
  • View blog
  • Posts: 53,888
  • Joined: 12-June 08

Re: connection query

Posted 13 April 2017 - 08:51 AM

First off - using Access DB for a website is a bad idea. Access was meant for a local DB/single user. Concurrent users, etc really really are not its style, function, or security. I would think heavily of moving away from that to something like MSSQL or MYSql.

Second - assuming that's your only location for the db - in the web config - then yeah, should be the only major change you need. Though I would figure you would reference it locally and not the full web address.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1