Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 14th, 2009, 05:04 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: , , .
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Database connection

Hello,

I have a form where a user provide database connection info and than click "Test" button to check if given database info is correct or not.

If database is MS Access then user provides database name and path and if it is Sql Server than user provides sql server connection info.

Is there any command or script that check database connection info and find whether info provided by user is correct or not?


Thank you,
Reply With Quote
  #2 (permalink)  
Old March 16th, 2009, 04:28 AM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Ummm...just try to make the connection and test to see if it worked or not???

Code:
Set conn = Server.CreateObject("ADODB.Connection")
On Error Resume Next
    conn.Open "...user supplied connection info goes here ... "
    If Err.Number <> 0 Then
        Response.Write "Invalid connection information"
    End If
On Error GoTo 0
...
???
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Connection to Access Database reachsevar ASP.NET 2.0 Basics 1 November 28th, 2007 08:56 AM
Database Connection kapi.goel SQL Language 2 February 14th, 2006 07:01 PM
Database connection fogofogo Classic ASP Professional 2 December 1st, 2005 12:45 PM
Need help w/ Database connection brkd63 Dreamweaver (all versions) 1 August 5th, 2004 01:14 AM



All times are GMT -4. The time now is 12:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.