Without DSN access to the ISP's database platter

Source: Internet
Author: User
Tags dsn connect
Access to | data | database unless you use Telnet to the software logon ISP's server, you are not able to connect to 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
%>



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.