Current location: Hot Scripts Forums » Programming Languages » ASP » global.asa giving problem


global.asa giving problem

Reply
  #1 (permalink)  
Old 03-14-04, 10:03 AM
lordmerlin lordmerlin is offline
Newbie Coder
 
Join Date: Jul 2003
Location: South Africa
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
global.asa giving problem

I recently took over a site from someone else, written in ASP. The global.asa file contrains the DB connection string, yet I haven't seen this before.
When I try and load the site, it gives me an internal 500 error, and the following:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
//global.asa, line 20

This is taken from the global.asa file:

Quote:
Sub Application_OnStart
Application("hellopeter") = "DSN=hellopeter2;UID=username;PWD=password"
Application("Datasource") = "DSN=hellopeter2;UID=username;PWD=password"
Application("question") = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID='username';Password='password';Initial Catalog='catalogue name';Data Source=remote host"

End Sub
I haven't seen anything like this before. Can anyone please direct to to some answers? I haven't done any ASP.NET coding b4, so I'm not sure if this is ASP.NET, if it is, what do I need todo to get this site working on my PC, so I can work on it?
Reply With Quote
  #2 (permalink)  
Old 05-14-04, 04:43 AM
GO4TF4CE's Avatar
GO4TF4CE GO4TF4CE is offline
Wannabe Coder
 
Join Date: Apr 2004
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Talking

its not asp .net, its classic asp. The global.asa file is basically used to control when sessions are started and ended, for likes of shopping carts etc.

You would need to specify what database type your are using, so you get this going. If you let us know what database your using I'll try to give you the solution.

Cheers

Quote:
Originally Posted by lordmerlin
I recently took over a site from someone else, written in ASP. The global.asa file contrains the DB connection string, yet I haven't seen this before.
When I try and load the site, it gives me an internal 500 error, and the following:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
//global.asa, line 20

This is taken from the global.asa file:


I haven't seen anything like this before. Can anyone please direct to to some answers? I haven't done any ASP.NET coding b4, so I'm not sure if this is ASP.NET, if it is, what do I need todo to get this site working on my PC, so I can work on it?
__________________
Intelligence is not knowledge, but the way we use our knowledge.
Reply With Quote
  #3 (permalink)  
Old 05-22-04, 04:32 AM
Morritt Morritt is offline
Newbie Coder
 
Join Date: May 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
look at line 20, if for example it is the one that declares "Datasource", go to "Adminstratove Tools > Data Sources (ODBC)".

get a copy of the database and setup "Datasource" to point to this file, then you can use it on your local machine and on the server without changing any code.
Reply With Quote
  #4 (permalink)  
Old 05-22-04, 03:09 PM
AllQuickfix AllQuickfix is offline
Newbie Coder
 
Join Date: May 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
**************************
Sub Application_OnStart
Application("hellopeter") = "DSN=hellopeter2;UID=username;PWD=password"
Application("Datasource") = "DSN=hellopeter2;UID=username;PWD=password"
Application("question") = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID='username';Password='password';Initial Catalog='catalogue name';Data Source=remote host"
*******************************************

It seems like they are minataining connection string values in appliaction level.

You have to give corect MS SQL Server connection details to make it work, mainly remote host value should be provided.

Saran
__________________
AllQuickFix - Hire a Programmer
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Include Problem DAL Perl 3 11-20-04 07:45 AM
How to sale php code to customer without giving him code pradeep_soft PHP 4 03-12-04 12:10 PM
Small problem for a pro, but for novice like me... argh! ntek Perl 3 11-19-03 01:45 PM
Global.asa blocks ASP response HenkBaas ASP 1 10-18-03 06:55 AM
file download problem ukyankee Perl 6 10-04-03 10:39 PM


All times are GMT -5. The time now is 04:16 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.