[unixODBC-support] Invalid object name 'table'., SQL state S0002 in SQLExecDirect
Miguel A. Velasco
miguel.suscripcion at gmail.com
Mon Jun 29 17:05:19 BST 2009
Hi, thanks Nick for your answer. I also got the query working with isql
first and I worked fine but not with PHP:
My sceenshot:
18:02:34)[root-php.d]#> isql -v MSSQL_SAFE01 sa mypassword
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select ItemCode from OITM
.............
| F7472002 |
| F7472002R01 |
| F7472002R02 |
| F7472002R03 |
| F7472013 |
| F7472013R02 |
| F7472013R03 |
| F7472024 |
| F7472035 |
| F7482003 |
| F7482003R02 |
| F7482003R03 |
| F7482003R04 |
| F7482003R05 |
| K-2R01 |
| K-2R01R |
+-----------------------------------------+
SQLRowCount returns 1777
1777 rows fetched
Any idea?
Thanks all for your time.
Best regards.
Miguel Velasco
Nick Gorham escribió:
> Miguel A. Velasco wrote:
>> Hi, thanks Gérard for your help but it doesn´t work for me. I´ve tried
>> what you commented and I have the following error message in Apache logs:
>>
>> [Mon Jun 29 16:20:10 2009] [error] [client 10.10.80.81] PHP Warning:
>> odbc_exec() [<a href='function.odbc-exec'>function.odbc-exec</a>]: SQL
>> error: [unixODBC][FreeTDS][SQL Server]Incorrect syntax near
>> 'MY_MICROSOFT_DOMAIN.OITM'., SQL state 37000 in SQLExecDirect in
>> /var/www/html/mydomain.com/index.php on line 7
>> [Mon Jun 29 16:20:10 2009] [error] [client 10.10.80.81] PHP Warning:
>> odbc_fetch_row(): supplied argument is not a valid ODBC result
>> resource in /var/www/html/mydomain.com/index.php on line 9
>>
>> I´ve tried with my Active Directory Domain Name but it still doesn´t
>> work. I really don´t knwo where I can find a domain name in Sql Server
>> 2005, do you?
>>
> I think he means a user name. I would get the query working using isql
> first. If it doesn't work then in php you are not connecting to the same
> database.
>
More information about the unixODBC-support
mailing list