Unless you use Telnet to the software logon ISP's server, you are not able to connect the database via DSN. Here are a few ways to connect you beyond your ISP and make it easy to connect to your database:
1.SQL Server
<%
CStr = "PROVIDER=SQLOLEDB; Server=<ip address>;d atabase=<dbname>; "
CStr = CStr & "network=dbmssocn;uid=<uid>;p wd=<pwd>"
Set conn = Server.CreateObject ("Adodb.connection")
Conn.Open CStr
' Connect with NETWORK=DBMSSOCN to avoid errors caused by admin naming
%>
2.Oracle
<%
CStr = "provider=oraoledb.oracle; Server=<ip address>;D ata "
CStr = CST & "source=<dbname>; User id=<uid>; Password=<pwd> "
Set conn = Server.CreateObject ("Adodb.connection")
Conn.Open CStr
%>
3. Access
<%
CStr = "Driver={microsoft Access Driver (*.mdb)};D bq="
CStr = CStr & Server.MapPath ("/<pathtofile.mdb>")
Set conn = Server.CreateObject ("Adodb.connection")
Conn.Open CStr
%>
4. If you have Jet 4.0 installed, this is a better way to connect.
<%
CStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data source="
CStr = CStr & Server.MapPath ("/<pathtofile.mdb>")
Set conn = Server.CreateObject ("Adodb.connection")
Conn.Open CStr
%>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.