Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asptoday_discuss thread: Lazy boy


Message #1 by "eugene merlin" <merline@m...> on Tue, 14 Aug 2001 20:34:33
We are moving our data to new server. In my ASP applications I use OLEDB 

and my old server name is hard-coded. After moving I should manually 

change this name to a new one, for example, from "SERVER1" to "SERVER3".

Is there any other way of doing this, may be I can change settings and 

make "SERVER1" as an alias name of "SERVER3" ? 



Thank you and sorry for my English.



Eugene 
Message #2 by hkchang@h... on Wed, 15 Aug 2001 17:28:05 +0800
You can either use resquest.servervariables("HTTP_HOST") or use global.asa

and set the following code:

<SCRIPT LANGUAGE=vbscript RUNAT=Server>

sub Application_OnStart

   Application("ServerName") = "Server3"

end sub

</SCRIPT>



Regards,

HK Chang



> -----Original Message-----

> From:	eugene merlin [SMTP:merline@m...]

> Sent:	Wednesday, August 15, 2001 4:35 AM

> To:	ASPToday Discuss

> Subject:	[asptoday_discuss] Lazy boy

> 

> We are moving our data to new server. In my ASP applications I use OLEDB 

> and my old server name is hard-coded. After moving I should manually 

> change this name to a new one, for example, from "SERVER1" to "SERVER3".

> Is there any other way of doing this, may be I can change settings and 

> make "SERVER1" as an alias name of "SERVER3" ? 

> 

> Thank you and sorry for my English.

> 

> Eugene 

Message #3 by "Jo Nuttinck" <Jo.Nuttinck@C...> on Tue, 21 Aug 2001 10:49:15
You can use an UDL-file. The code is:



Dim Cn As New ADODB.Connection

Cn.Open "File Name=Test.UDL"



Test.UDL is the name of the UDL-file. This may be a complete path.

Cn is the connection-object of ADO.



Hopes this will help you.



Greetinx,

Jo



> We are moving our data to new server. In my ASP applications I use OLEDB 

> and my old server name is hard-coded. After moving I should manually 

> change this name to a new one, for example, from "SERVER1" to "SERVER3".

> Is there any other way of doing this, may be I can change settings and 

> make "SERVER1" as an alias name of "SERVER3" ? 

> 

> Thank you and sorry for my English.

> 

> Eugene 

  Return to Index