Solved

DSN connection to a SQL Server 'mdf' file

Posted on 2003-10-23
5
1,373 Views
Last Modified: 2006-11-17
I have a website which uses a SQL Server database (version 7 I think).

I have two database files a 'mdf' and a 'ldf'.

This is the asp code that connects to it
---
   Application("Conn_ConnectionString") = "DSN=km" 'local
   sql = "SELECT * FROM AdminUser"
   set rsPass = server.CreateObject("adodb.recordset")
   rsPass.Open sql, Application("Conn_ConnectionString")
---
I have only ever used MS Access databases in the past so im not sure where to start.

What software do I need to install?
How do I setup the DSN connection - Is it the same as MS Access?
0
Comment
Question by:LaurentKyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9606960
>>How do I setup the DSN connection - Is it the same as MS Access? <<
The connection string is not the same as MS Access and you do not have to use DSN.  Here are the connections trings for the OLE DB Provider for SQL Server:
http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForSQLServer

If you really want to use DSN than see this:
ODBC Driver for SQL Server
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSQLServer

Anthony
0
 

Author Comment

by:LaurentKyan
ID: 9607003
Do I have to have SQL Server installed or can I connect to the database  files without it?
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9607095
You will need to have MS SQL Server Client software installed in your PC.

The rest is same. Define a DSN to MS SQL SERVER DATABASE using odbc administrator (odbcad32.exe)

HTH

Namasi Navaretnam
0
 

Author Comment

by:LaurentKyan
ID: 9607180
Is MS SQL Server Client software availible for free or is it a licenced product?
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 175 total points
ID: 9607238
You do not need to install MS SQL Server client software on all your workstations.  At most, all you need is MDAC, which you can download from:
www.microsoft.com/data

Anthony
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Table where row act as column 11 71
find SQL job run average duration 24 57
SQL Get Store Procedure Column Name As Row 5 41
T-SQL: problem comparing datetime 4 51
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question