Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Create DSN conn. (ODBC) by asp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Create DSN conn. (ODBC) by asp

 Post Reply Post Reply
Author
jalochi View Drop Down
Newbie
Newbie
Avatar

Joined: 13 April 2002
Location: Spain
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote jalochi Quote  Post ReplyReply Direct Link To This Post Topic: Create DSN conn. (ODBC) by asp
    Posted: 28 May 2003 at 1:29pm

I would like to create remotely user DSN connections using ASP. Where could I found a ASP or CGI for it?

Back to Top
aero View Drop Down
Groupie
Groupie
Avatar

Joined: 21 May 2003
Location: Denmark
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote aero Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2003 at 4:48pm

to setup the OBDC to run DSN, do this !!!

  1. Click start -> programs -> administrative tools -> data sources (ODBC)
  2. Click on the system DSN tab then the add button
  3. Select Microsoft Access driver and click finish
  4. Enter the name of the DSN as "cds"
  5. Click on the select button and browse to your Access database
  6. Click OK and you're done


the connection to the database is like this !!!

<%

dim conn
dim rs

set conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")

conn.Open "DSN=DBNAME" (whitout .mdb JUST the name)

rs.ActiveConnection = conn
rs.Open "SELECT * FROM cds ORDER BY title ASC"

while not rs.EOF
%>

and so on !!!!

remember to CLOSE the connection again !!!!

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2003 at 6:47pm
he is asking to create a dsn via asp, which is not possible with a component. Evtl. WSH could do it.
Back to Top
jalochi View Drop Down
Newbie
Newbie
Avatar

Joined: 13 April 2002
Location: Spain
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote jalochi Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2003 at 2:18am

Yes Michael, I'm asking to create a dsn via asp or cgi or other like many webhostings.

What's WSH?

Back to Top
aero View Drop Down
Groupie
Groupie
Avatar

Joined: 21 May 2003
Location: Denmark
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote aero Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2003 at 2:36am
ohhh  sorry
Back to Top
jalochi View Drop Down
Newbie
Newbie
Avatar

Joined: 13 April 2002
Location: Spain
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote jalochi Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2003 at 3:10am
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2003 at 3:13am
wsh is windows script host
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.