Linking to my database on the server

Results 1 to 2 of 2

Thread: Linking to my database on the server

  1. #1
    daniel Guest

    Default Linking to my database on the server

    I am below the level of a novice ASP programmer. I am trying to link my web page to a database that I have now put at my ISP. I created the data access page on my local drive and it links fine to my database so I transfered them both over to my ISP server now they refuse to talk to one another. I have read through the DSN, DSNless articles but confused would be a nice way of putting it. I have created a DSN file at my ISP called "dbusers" which is my Access database. I have then thrown in the text below. <BR><BR><BR>set dataconn = server.createobject ("adodb.connection")<BR>set cmdaddrecord = server.createobject ("ADODB.Recordset")<BR>DataConn.Open "DSN=dbusers"<BR><BR>However, in my data access page I have a classid statement which says "Data Source=C:Mes documentsmamadoo.mdb" - it references my C drive so the data access page will not look (I think) at my page on the server. <BR><BR>I have been at this for 5 days virtually non stop. I want my data access page to read and modify my Access database. I do not care if it is DSN or DSNless at this stage. <BR>Summary of my state of questions. <BR>1) Where do I, if I need to, put the set dataconn command i.e. what section of my page?<BR>2) what do I do with this data source command?<BR>3) do I need to change the remoteprovider property to false? <BR><BR>thanks so much.

  2. #2
    Join Date
    Dec 1969

    Default RE: Linking to my database on the server

    try this and see if it works. DNS-Less is always better as it is faster, lighter, and more portable.<BR><BR>&#060;%<BR> Dim strSQL<BR> Dim rs<BR> Dim strSource<BR> strSQL = "SELECT * FROM [Table1]"<BR> strSource = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"<BR> strSource = strSource & "DATA SOURCE=" & server.mappath("db.mdb") & ";"<BR> Set rs = Server.CreateObject("ADODB.Recordset") <BR> rs.Open strSQL, strSource<BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts