Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > no connect - redirect

Reply
Thread Tools

no connect - redirect

 
 
shank
Guest
Posts: n/a
 
      01-25-2005
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
%>


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-25-2005
shank wrote:
> 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

if err<>0 then response.redirect ...
> %>


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Response.redirect does not redirect from .aspx page =?Utf-8?B?VHJveQ==?= ASP .Net 3 10-15-2008 09:07 PM
Could Not Connect To SMTP Host Connection Failed -- Software caused connection abort: connect kishore@novelteam.com Java 3 11-16-2005 03:33 PM
Can't connect to local machine with anything except IE Other browsers can't connect without password Otis Mukinfus ASP .Net 3 07-08-2005 03:54 AM
Redirect to secure FTP site via response.redirect Ron Howard ASP General 2 08-11-2004 07:40 PM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM



Advertisments