[PHP-DB] Re: SQL Server connection error.

2003-06-08 Thread Thomas Zibolowski
Try using mssql

"Russell Roberts-Spears" <[EMAIL PROTECTED]> schrieb im
Newsbeitrag news:[EMAIL PROTECTED]
> Hi,
>
> I am new to PHP DB code and am currently struggling with the connection to
> SQL Server 2000. I am using ODBC and have created a System DSN with
> integrated NT security specifiying which DB etc. I have written the
> following code and posted it in the htdocs folder for Apache. (We are all
> running on Win2000 platforms, Web server is set apart from the DB server,
> but linked via LAN.
>
> PHP code:
>
>
> 
>   ADODB Test in PHP
> 
> 
>   
> // simple conection
>
>
> $cnx = odbc_connect('web', '', '');
> file://query
> $SQL_Exec_String =  "select * from TblClients";
> file://ejecucion query
> $cur= odbc_exec( $cnx, $SQL_Exec_String );
> echo  "DniNombre".
> "codigociudad\n";
>while( odbc_fetch_row( $cur ) ) {
>   $Title= odbc_result( $cur, 1 );
>   $Fname= odbc_result( $cur, 2 );
>   $Surname= odbc_result( $cur, 3 );
>   $Address1= odbc_result( $cur, 4 );
>echo "$Title$Fname".
> "$Surname$Address1\n";
>}
>echo  "";
>
> ?>
> 
> 
>
> 
>
>
> I then get back the following error:
>
>
>
> Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login
> failed for user 'PROTE\LATTITUDWEBSERV$'., SQL state 28000 in SQLConnect
in
> C:\Apache\Apache2\htdocs\DBtest.php on line 9
>
> Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource
in
> C:\Apache\Apache2\htdocs\DBtest.php on line 10
> DATA FROM SQL SERVER WITH PHP4 Cand_ID Password
>
> Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
> resource in C:\Apache\Apache2\htdocs\DBtest.php on line 14
>
>
>
> Am at a loss as to why the error. Have created another DSN in same system
> which links in using VB to the same SQL Server using the same NT
integrated
> security and it is fine, so I am a little perplexed.
>
> Any help or pointers would be gratefully received
>
>
> Best regards
>
>
>
> Russell
>
> _
> Stay in touch with absent friends - get MSN Messenger
> http://www.msn.co.uk/messenger
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] korean characters out of ms sql

2003-06-08 Thread Thomas Zibolowski
I try to build a small webserver using php in cgi mode connecting to a mssql
database. It works allready with 11 different languages. But now I try to
read hangul (korean chars). Under IIS (same php config, same script, same
database) I got the right characters out of the database. Trying to use my
own webserver failded - means I get wrong characters out of the query.
Anyone a idea how it works??
Thanx in advance.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php