Access to sql server from Asp 3.0
i access to Access from asp 3.0 but what can i access to sql server database from asp 3.0 in win xp (sp2) ? I used this cammand
<%
dim objconn,DSNtest
Set objconn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={SQL Server};SERVER=127.0.0.1;DATABASE=C:\Program Files\Microsoft SQL Server\MSSQL\Data\dbregister.MDF"
objconn.open DSNtest
%>
but this errors appears:
--------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
---------------------------------------------
or
----------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\dbregister.MDF'. Login fails.
-----------------------------------------------
if my way of connction is wrong plaease help me!!!
|