JvJ Posted July 30, 2020 Share Posted July 30, 2020 Hi I changed my connection in my application to odbc mssql -> using adodb.org libraries -> It connects fine -> The update query below works -> But when I pass the select query below SQL odbc_exec does not return a resource id for my query -> None of my select queries returns a resource id Below is the details that I logged. -> Any idea how to fix -> If I paste the select sql in MS Sql management studio it executes fine. Please assist in what could be the cause? Time->2020-07-30 19:09:14 adodb-odbc.inc.php sql = SET CONCAT_NULL_YIELDS_NULL OFF odbc_exec = Resource id #89 Time->2020-07-30 19:09:14adodb-odbc.inc.php Connection Arguments => DSN=amphibian;UID=amphibian;PWD=speedster;DATABASE=crmapm;,, Time->2020-07-30 19:09:14 adodb-odbc.inc.php sql = Update pwd_incorrect set record_status_id = 2 where date <> '2020-07-30'odbc_exec = Resource id #92 Time->2020-07-30 19:09:14 adodb-odbc.inc.php sql = SET CONCAT_NULL_YIELDS_NULL OFF odbc_exec = Resource id #95 Time->2020-07-30 19:09:14adodb-odbc.inc.php Connection Arguments => DSN=amphibian;UID=amphibian;PWD=speedster;DATABASE=crmapm;,, Time->2020-07-30 19:09:14 adodb-odbc.inc.php sql = SET CONCAT_NULL_YIELDS_NULL OFF odbc_exec = Resource id #98 Time->2020-07-30 19:09:14adodb-odbc.inc.php Connection Arguments => DSN=amphibian;UID=amphibian;PWD=speedster;DATABASE=crmapm;,, Time->2020-07-30 19:09:14 adodb-odbc.inc.php sql = select c.name,t.name,c.length,c.isnullable, c.status, (case when c.xusertype=61 then 0 else c.xprec end), (case when c.xusertype=61 then 0 else c.xscale end) from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='pwd_user_deny' odbc_exec = Resource id #101 Time->2020-07-30 19:09:14 adodb-odbc.inc.php sql =SELECT user_name_used,password_used,ip_address,date,ref_no,record_status_id FROM crmapm.dbo.pwd_user_deny WHERE record_status_id = 1 and ip_address = '::1'odbc_exec = Quote Link to comment https://forums.phpfreaks.com/topic/311249-odbc_exec-not-returning-resource-id/ Share on other sites More sharing options...
requinix Posted July 30, 2020 Share Posted July 30, 2020 Have you checked the documentation to see what else odbc_exec might be returning? Quote Link to comment https://forums.phpfreaks.com/topic/311249-odbc_exec-not-returning-resource-id/#findComment-1580197 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.