SQL state 37000? More database problems.
Posted: Thu Sep 01, 2005 9:41 pm
This is what I'm getting now:
Too long to list all the code but here is the part I'm having trouble with:
dbConnectionString.php
------------------------------
test.php
----------
I had this working the night before and tonight I get this error. Have no idea why. Does anyone have any suggestions?
Code: Select all
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]CryptoAPI function 'CryptAcquireContext' failed. Error 0x8009001d: Provider DLL failed to initialize correctly. , SQL state 37000 in SQLConnect indbConnectionString.php
------------------------------
Code: Select all
<?php
$dsn="Driver={SQL Server};Server=DEVSERV;Database=testDB;";
$username="test";
$password="test";
?>----------
Code: Select all
<?php
require "dbConnectionString.php";
class test{
/**
* CONSTRUCTOR:
*/
function test() {
global $dsn, $username, $password;
$sqlconnect=odbc_connect($dsn,$username,$password);
$sqlquery="SELECT test_ID, name FROM testTable;";
$process=odbc_exec($sqlconnect, $sqlquery);
while(odbc_fetch_row($process))
{
$Name = odbc_result($process,"name");
$ID = odbc_result($process,"test_ID");
// More code goes here ...
} // End while
odbc_close($sqlconnect);
}
// More code goes here
}
?>