Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global.asa & subdomains, how can I solve this problem? 1

Status
Not open for further replies.

matute

Programmer
Apr 28, 2002
4
AR
Hi there
I have a global.asa that Session_onStart
Check a DB connection and add some values.
The DB is under the root directory.
The starting file is an ASP page (index.asp).

After creating a subdomain that also has an ASP starting page it also runs the global.asa and can't find the database(because it is in a different root than this asp page.)

the error : Page(masters/index.asp)
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.
//global.asa, line 38

Global ASa script
<SCRIPT LANGUAGE=&quot;VBScript&quot; RUNAT=&quot;Server&quot;>

Sub Application_OnStart
Application(&quot;ActiveUsers&quot;) = 0
Application(&quot;variableUser&quot;) = &quot;&quot;
Application(&quot;variablePass&quot;) = &quot;&quot;
End Sub
Sub Session_OnStart
Dim MySQL
Dim rstemp
Dim Cnn
Dim TotalSessions
Dim TodaySessions
Dim DBDriver
Dim DBPath
Dim DBUser
Dim DBPass
Dim NameUsers, Login, Sailor, NameSailor
Dim variableUser, variablePass, Pais, Copa, Localidad, Fechaini, Fechafin, Website, Format
DBDriver = &quot;Microsoft Access Driver (*.mdb)&quot;
DBPath = Server.Mappath(&quot;/flor.mdb&quot;)
DBUser = &quot;&quot;
DBPass = &quot;&quot;
Set Cnn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Cnn.Open &quot;DRIVER={&quot; & DBDriver & &quot;}; DBQ=&quot; & DBPath, DBUser, DBPass
etc...

How can I solve this issue? Many thanks
 
You should make the subdomain a separate application...
This is not a bug - it's an undocumented feature...
;-)
 
How I do that?
this is done at the global.asa file or at the server tools?
By my self or the hosting ISP provider?.

Will appreciate some help. Thanks a lot for the previous answer.
YHK
 
It's done by your ISP, and it usually isn't free ;(

but you could try uploading a file that shows you the right path, and then hardcode it in your files...

like this:
Code:
response.write Server.Mappath(&quot;/flor.mdb&quot;)

It will show something like:

T:\yaddayaddayadda\flor.mdb

put this in your files... This is not a bug - it's an undocumented feature...
;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top