I am aiming to create a very basic web based DBMS for Microsoft SQL Server. However, in order to connect to a SQL Server database you seem to require a ODBC connection on the server. Is there any possible way to overcome this?
Asked
Active
Viewed 2.6k times
1 Answers
4
You haven't stated which version of SQLServer but you can use OLEDB connection in ASP.
<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = Northwind; User Id = sa; Password="
If conn.errors.count = 0 Then
Response.Write "Connected OK"
End If
%>

codingbadger
- 42,678
- 13
- 95
- 110
-
Thanks for the speedy answer we are using 2005 / 2008. So this connection method means an ODBC connection does not need to be created on the server? Many Thanks, Joel – J Harley May 26 '10 at 10:29
-
Yes it should be fine. This site also a good source of information http://databases.aspfaq.com/database/what-should-my-connection-string-look-like.html And this one is always good when you just can't remember the connection string you need. www.connectionstrings.com Hope this helps Barry – codingbadger May 26 '10 at 10:39