473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

no connect - redirect

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
%>
Jul 22 '05 #1
1 1344
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"
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ohaya | last post by:
Hi, I've been researching this, and I'm not sure if what I'm trying to do is possible, but I thought that I'd ask: I have two webservers/websites. The first webserver/website is running...
1
by: GNoter | last post by:
Scenario: I've a WebFarm with 2 web servers which are NLBs (network load balanced). Web1 and Web2; they are not part of a domain. I have a third server, Server3, which is part of a domain and on...
1
by: manicmax | last post by:
Hi Xperts, I dont know y I am getting this error "Failed to connect to host".Everything was working fne and all of a sudden this started. On this form I am asking for cradit card details.The...
6
by: xx75vulcan | last post by:
Hi, I have two seperate production machines that I'm trying to get to play nicely together. This setup has worked for years before - until recently bother machines were reformatted, and...
11
by: =?Utf-8?B?c2NodXJzdDMw?= | last post by:
Hi, I am currently trying to get back into ASP and have begun looking at an old webpage I developed some years ago, it was fully functional back in 2002 and I had it up and running with no...
1
by: hkma08 | last post by:
I dont know I should post JSP error in here or not. If not please redirect me to another one. Thx. I just installed apache tomcat with mysql with java, but i got error when try to connect to mysql...
2
by: hkma08 | last post by:
I dont know I should post JSP error in here or not. If not please redirect me to another one. Thx. I just installed apache tomcat with mysql with java, but i got error when try to connect to mysql...
3
by: =?Utf-8?B?SFJzb2Z0IEluZm9ybcOhdGljYQ==?= | last post by:
Dear Friends I'm new with asp.net. I have a asp.net 2.0 application hosted in a ISP, that don't permit instal of Firebird database. I need this application to access a firebird database that is...
11
by: Atal | last post by:
hi friends i have a problem with asp.net to connect ms access file on net when i upload these file it does not work. web.config code is here <?xml version="1.0"?> <!-- Note: As an...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.