Jump to content

davidc3084

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by davidc3084

  1. Problem solved. Lack of SQL Server experience on my part - more an Oracle person. Evidently the user SA is a special type of user account that has access to catalogues (i.e. i could connect to Query Analyzer), but is not considered a valid db user. Create a user in my targeted DB and all worked.
  2. Environment - Windows XP Professional Client running Apache 2.x w/ PHP5. Accessing a Remote SQL Server 2000 DB. Can Access SQL Server DB w/ standard SQL Server Query Analyzer Tool. php.ini has the following extensions (in which all dll have been copied to PHP root) php_pdo_mssql.dll, php_msql.dll, php_mssql.dll. Attempting to access w/ COM approach. Tried mssql_connect, mssql_pconnect both w/ DSN, TCPIP and Name Piples. Cannot seem to make connection. Below is a snippet of the code. I think it is a networking, infrastructure issue, but cannot debug. Q: Is there anyway to track - how and why the connection is failing? At this point I just know it errors out. So its really tough to debug. <html> <head> <title>PHP Test</title> </head> <body> <h1> SQL/PHP /<h1> <?php $HOST = "CSCS02"; $USER = "sa"; $PASS = "mypswd"; $DB = "MY_DB_A"; $dsn = "Provider=SQLOLEDB;Data Source=$HOST;UserId=$USER;Password=$PASS;Initial Catalog=$DB"; $charPage = CP_UTF8; $db = new COM("ADODB.Connection", NULL, $charPage); $db->Open($dsn); echo "made it"; ?> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.