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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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? |
| ||||
| 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? |