Victor,

Your DSN is not being passed correctly.
Under unix this could be an envrionment variable issue, but I suspect that
you just have a reference error.

Try something like:
$dsn="MQIS";
$pwd="sa";
$conn=odbc_connect("$dsn","$pwd","");

if that doesn't work, try $dsn="dsn=MQIS";

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers


> -----Original Message-----
> From: Victor Espina [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 11, 2001 11:55 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] ODBC connection under Win32 + Apache + SQL Server
>
>
> Hi, i'm new using PHP i'm trying to run some basic PHP scripts to
> retrieve a
> show data coming from a SQL Server database. The problem is that
> when i try
> to run this:
>
> $conn=odbc_connect("MQIS","sa","");
>
> PHP returns the following warning:
>
> Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
> found and no default driver specified
>
> I test the DSN with VFP using:
>
> SQLStringConnect("dsn=MQIS;usr=sa;pwd=;")
>
> and it works pretty fine. ¿What could be the problem here?
>
> TIA
>
> Victor
>
> --
> ==============================
> Victor Espina
> Caracas, Venezuela
> http://mitrompo.com/vespina
> [EMAIL PROTECTED]
> (Quite el 'nospam' para responder)
> (Remove 'nospam' to reply)
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to