Showing posts with label globalasa. Show all posts
Showing posts with label globalasa. Show all posts

Sunday, February 26, 2012

Global.asa for MS SQL 2000

Hello,
I'd like to use global.asa to connect a database in MS SQL 2000, running on
the same MS Server 2003. I wondered if any of you know about the code for
the two functions:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
.....
End Sub
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart
......
End Sub
</SCRIPT>
Thanks a lot,
Hank
Why would you connect to the database in global.asa? Connect to the
database in the code of each page. You don't want to create a connection
object for the application or session scope. http://www.aspfaq.com/2053
http://www.aspfaq.com/
(Reverse address to reply.)
"Hank Leigh" <hairong@.msu.edu> wrote in message
news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
> Hello,
> I'd like to use global.asa to connect a database in MS SQL 2000, running
on
> the same MS Server 2003. I wondered if any of you know about the code for
> the two functions:
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> Sub Application_OnStart
> ....
> End Sub
> </SCRIPT>
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> Sub Session_OnStart
> .....
> End Sub
> </SCRIPT>
> Thanks a lot,
> Hank
>
|||Thank you. That makes a lot of sense. My database file is at
C:\Program Files\Microsoft SQL Server\MSSQL\Data
Would you mind sharing a code to use in each of the ASP page?
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ewtt5k0$EHA.1604@.TK2MSFTNGP12.phx.gbl...
> Why would you connect to the database in global.asa? Connect to the
> database in the code of each page. You don't want to create a connection
> object for the application or session scope. http://www.aspfaq.com/2053
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hank Leigh" <hairong@.msu.edu> wrote in message
> news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
> on
>
|||Thank you again. Instead of using global.asa, I embedded a connection string
in each page and it works really fast! Below is the code I modified from a
message at http://www.aspfaq.com, an excellent site:
cst = "Provider=SQLOLEDB;Data Source=(local);" & _
"Initial Catalog=signmeup;Network=DBMSSOCN;"& _
"User Id=sa;Password="
set signmeup = CreateObject("ADODB.Connection")
signmeup.open cst
All the best,
Hank
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ewtt5k0$EHA.1604@.TK2MSFTNGP12.phx.gbl...
> Why would you connect to the database in global.asa? Connect to the
> database in the code of each page. You don't want to create a connection
> object for the application or session scope. http://www.aspfaq.com/2053
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hank Leigh" <hairong@.msu.edu> wrote in message
> news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
> on
>

Global.asa for MS SQL 2000

Hello,
I'd like to use global.asa to connect a database in MS SQL 2000, running on
the same MS Server 2003. I wondered if any of you know about the code for
the two functions:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
....
End Sub
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart
.....
End Sub
</SCRIPT>
Thanks a lot,
HankWhy would you connect to the database in global.asa? Connect to the
database in the code of each page. You don't want to create a connection
object for the application or session scope. http://www.aspfaq.com/2053
http://www.aspfaq.com/
(Reverse address to reply.)
"Hank Leigh" <hairong@.msu.edu> wrote in message
news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
> Hello,
> I'd like to use global.asa to connect a database in MS SQL 2000, running
on
> the same MS Server 2003. I wondered if any of you know about the code for
> the two functions:
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> Sub Application_OnStart
> ....
> End Sub
> </SCRIPT>
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> Sub Session_OnStart
> .....
> End Sub
> </SCRIPT>
> Thanks a lot,
> Hank
>|||Thank you. That makes a lot of sense. My database file is at
C:\Program Files\Microsoft SQL Server\MSSQL\Data
Would you mind sharing a code to use in each of the ASP page?
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ewtt5k0$EHA.1604@.TK2MSFTNGP12.phx.gbl...
> Why would you connect to the database in global.asa? Connect to the
> database in the code of each page. You don't want to create a connection
> object for the application or session scope. http://www.aspfaq.com/2053
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hank Leigh" <hairong@.msu.edu> wrote in message
> news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
> on
>|||Thank you again. Instead of using global.asa, I embedded a connection string
in each page and it works really fast! Below is the code I modified from a
message at http://www.aspfaq.com, an excellent site:
cst = "Provider=SQLOLEDB;Data Source=(local);" & _
"Initial Catalog=signmeup;Network=DBMSSOCN;"& _
"User Id=sa;Password="
set signmeup = CreateObject("ADODB.Connection")
signmeup.open cst
All the best,
Hank
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ewtt5k0$EHA.1604@.TK2MSFTNGP12.phx.gbl...
> Why would you connect to the database in global.asa? Connect to the
> database in the code of each page. You don't want to create a connection
> object for the application or session scope. http://www.aspfaq.com/2053
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hank Leigh" <hairong@.msu.edu> wrote in message
> news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
> on
>

Global.asa for MS SQL 2000

Hello,
I'd like to use global.asa to connect a database in MS SQL 2000, running on
the same MS Server 2003. I wondered if any of you know about the code for
the two functions:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
....
End Sub
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Session_OnStart
.....
End Sub
</SCRIPT>
Thanks a lot,
HankWhy would you connect to the database in global.asa? Connect to the
database in the code of each page. You don't want to create a connection
object for the application or session scope. http://www.aspfaq.com/2053
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Hank Leigh" <hairong@.msu.edu> wrote in message
news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
> Hello,
> I'd like to use global.asa to connect a database in MS SQL 2000, running
on
> the same MS Server 2003. I wondered if any of you know about the code for
> the two functions:
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> Sub Application_OnStart
> ....
> End Sub
> </SCRIPT>
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
> Sub Session_OnStart
> .....
> End Sub
> </SCRIPT>
> Thanks a lot,
> Hank
>|||Thank you. That makes a lot of sense. My database file is at
C:\Program Files\Microsoft SQL Server\MSSQL\Data
Would you mind sharing a code to use in each of the ASP page?
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ewtt5k0$EHA.1604@.TK2MSFTNGP12.phx.gbl...
> Why would you connect to the database in global.asa? Connect to the
> database in the code of each page. You don't want to create a connection
> object for the application or session scope. http://www.aspfaq.com/2053
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hank Leigh" <hairong@.msu.edu> wrote in message
> news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
>> Hello,
>> I'd like to use global.asa to connect a database in MS SQL 2000, running
> on
>> the same MS Server 2003. I wondered if any of you know about the code for
>> the two functions:
>> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>> Sub Application_OnStart
>> ....
>> End Sub
>> </SCRIPT>
>> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>> Sub Session_OnStart
>> .....
>> End Sub
>> </SCRIPT>
>> Thanks a lot,
>> Hank
>>
>|||Thank you again. Instead of using global.asa, I embedded a connection string
in each page and it works really fast! Below is the code I modified from a
message at http://www.aspfaq.com, an excellent site:
cst = "Provider=SQLOLEDB;Data Source=(local);" & _
"Initial Catalog=signmeup;Network=DBMSSOCN;"& _
"User Id=sa;Password="
set signmeup = CreateObject("ADODB.Connection")
signmeup.open cst
All the best,
Hank
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:ewtt5k0$EHA.1604@.TK2MSFTNGP12.phx.gbl...
> Why would you connect to the database in global.asa? Connect to the
> database in the code of each page. You don't want to create a connection
> object for the application or session scope. http://www.aspfaq.com/2053
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Hank Leigh" <hairong@.msu.edu> wrote in message
> news:e8DrD7z$EHA.4004@.tk2msftngp13.phx.gbl...
>> Hello,
>> I'd like to use global.asa to connect a database in MS SQL 2000, running
> on
>> the same MS Server 2003. I wondered if any of you know about the code for
>> the two functions:
>> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>> Sub Application_OnStart
>> ....
>> End Sub
>> </SCRIPT>
>> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>> Sub Session_OnStart
>> .....
>> End Sub
>> </SCRIPT>
>> Thanks a lot,
>> Hank
>>
>