ASP Forum
DNSless connection with Freehosting
caltin | Posted 2:12am 26. August 2001 Server Time |

hi
I try dnsless connection as in lesson 20 but it doesnt work.
I try this at www.brinkster.com  

Set outpostDB= Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("db.mdb")
outpostDB.Open "Driver={Microsoft Access Driver (*.mdb)};
DBQ="&MdbFilePath&";"

db.mdb and the asp page are at the same location.I think
MapPath should be different than db.mdb .on my computer
this work:

Set outpostDB= Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("outpost.mdb")
outpostDB.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=E:\Inetpub\wwwroot\db.mdb"

ýf I specify db.mdb's location on my computer it work but
what should do at freehosting.

there are some information at:
http://support.microsoft.com/support/kb/articles/q193/3/32.asp

   '  Access ODBC Driver via DSN-Less
   con1.Open "PROVIDER=MSDASQL;" & _

             "DRIVER={Microsoft Access Driver (*.mdb)};" & _
             "DBQ=C:\...\NWind.mdb;" & _
             "UID=admin;PWD=;"

I think this dnsless connection for personal computer.

I found some other information at:
http://www.webteknikleri.com/ASP/default.asp?sayfaNo=151
this page write in a different language and there are a dnsless connection example:

<%
Dim Veriyolu, Kayitdizisi
Set Veriyolu = Server.CreateObject("ADODB.Connection")
Veriyolu.Open "Veri=" & Server.MapPath_("..../veriler/uyeler.mdb") &
"; Driver = {Microsoft Access Driver (*.mdb);"

Set Kayitdizisi = Veriyolu.Execute("SELECT * FROM Veri_adi")
%>

actully line where I put _ and next line at same line  
but dont fit here.

haneng what kind of connection you use for this page

   Thanks...
joshuakhuu | Posted 7:21am 26. August 2001 Server Time |

I can suggest a different dnaless connection lines of code that have worked for me.

set conn=server.createobject("ADODB.connection")
dbpath="Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE='" & server.mappath("db.mdb")
conn.open dbpath

"db.mdb" can be specified like you would if it was on your computer.

I don't know if that has helped.  Let me know.
micro102 | Posted 3:53am 19. July 2008 Server Time |

visit this URL to free web hosting: http://www.hosthamper.com/
mp3cdman | Posted 1:48am 24. July 2008 Server Time |

if by "not work" you mean can't write to the database then this is because Brinkster only allow the writable directory that they supply which is outside the webroot... can't quite remember the name but look on their Support pages

mp3cdman
;-P


Reply to Post DNSless connection with Freehosting



Back to Forum Page