dns less connection String

This is a discussion on "dns less connection String" within the Classic ASP section. This forum, and the thread "dns less connection String are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 26th, 2003, 09:39
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
dns less connection String

What is the right code for creating a dns connection string to the following address. dnot know the local address

http://www.tribassrecords.co.uk/dba/tribassrecords.mdb

  #2 (permalink)  
Old Sep 26th, 2003, 11:21
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("dba/tribassrecords.mdb") & ";"
  #3 (permalink)  
Old Sep 26th, 2003, 11:23
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Its gonna be one of these:

Code: Select all
'## Make sure to uncomment one of the strConnString lines and edit it so that it points to where your database is!
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("tribassrecords.mdb") '## MS Access 2000 using virtual path
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/USERNAME/db/tribassrecords.mdb") '## MS Access 2000 on Brinkster
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\dbroot\tribassrecords.mdb" '## MS Access 2000
'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("tribassrecords.mdb") '## MS Access 97 using virtual path
'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/tribassrecords.mdb") '## MS Access 97 on Brinkster
'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\dbroot\tribassrecords.mdb" '## MS Access 97
'strConnString = "Provider=SQLOLEDB;Data Source=SERVER_NAME;database=DB_NAME;uid=UID;pwd=PWD;" '## MS SQL Server 6.x/7.x/2000 (OLEDB connection)
  #4 (permalink)  
Old Sep 26th, 2003, 12:55
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to djaccess
keep getting back http error code 401 unathorised
  #5 (permalink)  
Old Sep 26th, 2003, 13:09
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not big on Access, but I'd say you'll need to check the permissions on the .MDB file.
  #6 (permalink)  
Old Oct 3rd, 2003, 12:00
Reputable Member
Join Date: Aug 2003
Location: Singapore
Posts: 321
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gwx03
make sure its on a writable path??? like brinkster has a /db directory for read/write to databases

if it still doesn't work and you've contacted your sys admin you can try this out : http://www.webwizguide.info/asp/tuto...tabase_pt2.asp
  #7 (permalink)  
Old Oct 3rd, 2003, 15:11
Junior Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by djaccess

keep getting back http error code 401 unathorised


<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Make sure you have set full read/writ permissions the IUSR account on the database file/directory. You may need to contact your host to get this done.

P.s. when you have a live site, you should make so effort to hide the location of the Access database. Preferably put it in a directory which is below web access (many hosts provide a 'data' directory alongside a 'web' or 'www' directory). If you can't do that, name the directory and database something obscure. You may want to do this before you contact your host to set permissions, otherwise they may have to be re-set.
  #8 (permalink)  
Old Oct 5th, 2003, 14:34
Reputable Member
Join Date: Aug 2003
Location: Singapore
Posts: 321
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gwx03
i think the easiest way to get things done is just call your sys admin
Closed Thread

Tags
dns, less, connection, string

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Connection string for password protected databases alexgeek Classic ASP 6 Oct 31st, 2007 15:59
MySQL Connection String Info Monie Classic ASP 9 Oct 24th, 2007 01:48
ODBC connection go4kpo PHP Forum 2 Jul 10th, 2007 14:20
PHP n MySQL connection uddin PHP Forum 1 Apr 18th, 2007 06:41
Connection String DSN-less gwx03 Classic ASP 11 Nov 26th, 2003 12:07


All times are GMT. The time now is 04:33.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43