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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top