473,408 Members | 2,087 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,408 software developers and data experts.

DSN or DSN-less connection

Hello, and thanks for your help to my last question :)


I am setting up my website using ASP and an Access database, the site is being hosted, with an option to use DSN, but the recommendation from the hosting company is to use a DSN-less connection.

The following is the configuration for the Access database connection, but I find the code confusing. It seems to use a DSN, but it also seems to use a DSN-less connection since the path to the database is specified. I would greatly appreciate any insights into this, currently, I cannot seem to get the database connection working properly on the hosted site. Thanks !

Here is the code:
Expand|Select|Wrap|Line Numbers
  1. ' use this connect string for the Access tables
  2. ' change the following
  3. '    YourDB        to the physical path of your database
  4. 'strConnect = "Driver={Microsoft Access Driver (*.mdb)} DBQ=C:\inetpub\wwwroot\BegASP\Chapter.14\Contact.mdb"
  5.  
  6. 'strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data 'Source=C:\inetpub\wwwroot\share\Contact.mdb;Mode=Share Deny None;Extended Properties="";Jet 'OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet 'OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk 'Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet 'OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy 'Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"
  7.  
  8. 'strConnect = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Contact;Connect 'Timeout=15;Locale Identifier=1033;DSN=Contact"
  9. 'DBQ=C:\inetpub\wwwroot\BegASP\Chapter.14\Contact.mdb"
  10.  
  11. 'set ObjConn = Server.CreateObject("ADODB.connection")
  12. 'ObjConn.open ConnStr, "Admin", ""
  13. ' use this connect string for a DSN data store
  14. ' change the following
  15. '    DSN=YourDSNName
  16.  
  17. strConnect = "DSN=Users123"
  18.  
Jan 13 '10 #1
0 1967

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Leader | last post by:
HI All, I created a SQL Server DSN using Windows ODBC Data Source Administrator. While creating the DSN, it asked me about authentication process in reply to which I selected "With SQL Server...
3
by: kakaz | last post by:
Hi All there! I am quite new in MS SQL administration so let me explain how it work on Your instances of SQL Servers. We have several DTS packages on our server, all of them managed on some...
3
by: McCool | last post by:
How can I get the deployment project to setup a DSN pointing to an Access DB after installation takes place? Also, is there a way to kick off a vbs script after installation takes place through...
1
by: Dan | last post by:
Hi I have recently converted an Access 97 database to 2003. Most of the change went fine with no problems but every now and then my DSN connections to my back-end SQL-database fail and it does not...
3
by: Zlatko Matić | last post by:
Hi! What happens with linked tables if they were linked using File DSN, when I copy the Access file on some other PC without File DSN ? What is the difference between DSN on linked tables and...
4
by: Steve Sweales | last post by:
I'm trying to find some code on how to create a DSN using C# and SQLConfigDataSource. Can anybody help me please, before I tear my hair out!! *** Sent via Devdex http://www.devdex.com ***...
8
by: DerekS | last post by:
Hi, I've been pulling my hair out trying to write a simple method to programatically create a system DSN with all parameters on a remote machine. I have ensured I have the correct permissions on...
3
by: Niks | last post by:
Hi, I need to connect to SQL server Database using a System DSN. Can anyone tell me how to connect to SQL Server using DSN in ASP.NET (VB.Net). Using a Try Catch block. Does anyone know how to...
0
by: Neo | last post by:
Hello All, ODBCAD32.exe launches DSN Setup. But then I have to select DSN and click configure to configure DSN. Is there any way, I could invoke configuration dialog box for particular DSN...
0
by: senthildb2 | last post by:
Hi there, I want to create DSN for DB2 database through my VB application. I have installed DB2 v8.2 with FixPack6.0 ESE. (The actual version shown in Control Center is DB2 V8.1.13.193) The...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.