Unix Technical Forum

Connecting to SQL Server

This is a discussion on Connecting to SQL Server within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> I have a website which uses a SQL Server database (version 7 I think). I have two database files ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:32 PM
Laurent
 
Posts: n/a
Default Connecting to SQL Server

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:32 PM
Brannon Jones [MS]
 
Posts: n/a
Default Re: Connecting to SQL Server

One big difference between SQL and Access is that SQL requires you to login
with a username and password.

So, at the very least, your connection string needs to have the following
properties added to it: UID= and PWD=.

The actual database files (the .mdf and .ldf) are not really important, as
you are connecting to a server, and not the file itself (unlike Access).

You should get the proper username and password to use from your database
administrator.

Brannon

"Laurent" <Laurent@creation-station.com> wrote in message
news:0a1401c39973$46c96b80$a601280a@phx.gbl...
> 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?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:08 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com