ADODB connection to remote SQL2000

Source: Internet
Author: User
Tags pconnect
Virtual machine Environment SQLSERVR2003 installed APPSERV Package
SQL2000 database that can connect to this machine

The SQL2000 database of the public network is unreachable (can be connected with ASP.)
Excuse me, what is the reason?


Reply to discussion (solution)

With ASP. NET can be connected, with PHP not connected, obviously the code or the connection word is wrong
Of course, it does not rule out the problem of environment configuration when not on the same machine

Then why the SQL2000 connected to the machine is no problem?

Environment configuration? This database is placed in the public network of space, should be popular
Use ASP. NET to connect to public network database from native computer
Use ADODB can only connect the SQL2000 of the machine to the remote SQL2000 error:
Warning:mssql_pconnect () [Function.mssql-pconnect]: Message: User ' (null) ' Login failed. Cause: It is not associated with a trusted SQL Server connection. (severity) in C:\AppServ\www\test\adodb\drivers\adodb-mssql.inc.php on line 625

The error message is not to tell you: you did not give the user name?

That's where the hell is. Ming is a user name! This user can log in to SQL normally
Code:
Include (' adodb\adodb.inc.php ');
$conn = &newadoconnection (' mssql ');
$conn->pconnect (' Remote IP ', ' db_xxx ', ' XXX ', ' test ');
$conn->debug = true;
$ADODB _fetch_mode = Adodb_fetch_both;

Pconnect ($host = "", $username = "", $password = "", $database = "")

$host = "201.111.21.132";
$username = "Db_test";
$password = "Testpwd";
$database = "Test";
$conn->pconnect ($host, $username, $password, $database);

This is still not good, the same mistake
Switch to the local IP on OK

Thanks for the reply from upstairs!


Search for the next related posts! Here's how to fix it:
Open php.ini
Put mssql.secure_connection = On
Modified to Mssql.secure_connection = Off
You can connect to the remote SQL2000 database.

  • 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.