View Full Version : data source problem

08-25-2005, 01:37 AM
Hi, again.

I have another script which the script refuses this local:


it wants for a local path: Server.MapPath("lexicum.mdb")

This is the head of the script. I want to know WHY it does this? and how I do for it understand that databases path is :Server.MapPath("/_private/lexicum.mdb")


intPage = Request("page")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If

Dim SqlJunk

Dim strDB, sSQL, dbGlobalWeb,con
dbGlobalWeb.open = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/_private/lexicum.mdb")

'Set dbGlobalWeb = Server.CreateObject("ADODB.Connection")

'Dim dbGlobalWeb
Set dbGlobalWeb = CreateObject("ADODB.Connection")
' con.Open strDB

dbGlobalWeb.Open strdb

SqlJunk = "SELECT * FROM ec" %>

Thank you


08-26-2005, 08:52 PM
the / at the start means it is starting from root (most likely C:\Inetpub\wwwroot\ but its acutally the root of the virtual directory)

i start all my relative paths with ./

. means current working directory
.. means parent of current working directory, some servers have been set up to disable ..

what does it output when you do
Response.Write Server.MapPath("/_private/lexicum.mdb")