From: "Karen Resplendo" <[EMAIL PROTECTED]>

> I can't get odbc call to work inside of a function. It works on the
outside, then I pass the recordset and fieldname to the function to use the
data. I would like to just have the whole odbc stuff inside the function. Am
I missing something obvious? This is the error I get for the odbc_do line:
> "Supplied argument is not a valid ODBC-Link resource"
[snip]
> ****************************
> This doesn't work:
>
> function isValidPWS($pws)
>  {
> $data=odbc_do($connectionSDWIS,"EXEC sp_PWSExists '$pws'");

Scope issue. $connectionSDWIS is not defined within your function. Either
pass it to the function or make it global.

---John Holmes...

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

Reply via email to