no connect - redirect

S

shank

How do I edit this so that if there's no connect, there's a redirect?
thanks

<%
'REMOTE CONNECT STRING
Set conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "sqloledb"
conn.Properties("Data Source").Value = "sql38.com"
conn.Properties("Network Library").Value = "dbmssocn"
conn.Properties("Initial Catalog").Value = "mydb"
conn.Properties("User ID").Value = "username"
conn.Properties("Password").Value = "password"
conn.open
%>
 
B

Bob Barrows [MVP]

shank said:
How do I edit this so that if there's no connect, there's a redirect?
thanks

<%
'REMOTE CONNECT STRING
Set conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "sqloledb"
conn.Properties("Data Source").Value = "sql38.com"
conn.Properties("Network Library").Value = "dbmssocn"
conn.Properties("Initial Catalog").Value = "mydb"
conn.Properties("User ID").Value = "username"
conn.Properties("Password").Value = "password" on error resume next
conn.open
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top