Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have asterisk Core and i have connected this to sql server with odbc and using func_odbc .
this func odbc executing stored procedure there is only 1 value return but sometimes not always i get this

[Feb 16 12:07:12] WARNING[16437]: func_odbc.c:191 generic_execute: SQL Execute returned an error -1: 24000: [FreeTDS][SQL Server]Invalid cursor state (41)
[Feb 16 12:07:12] WARNING[16437]: func_odbc.c:199 generic_execute: SQL Exec Direct failed (-1)![Exec dbo.Main_Dest @bnumb = ‘XXXXXXXXX’]
[Feb 16 12:07:12] WARNING[16437]: res_odbc.c:604 ast_odbc_direct_execute: SQL Execute error! Verifying connection to MSSQL [MSSQL]…


so i have searched too many solutions but there is nothing about sql server i have tried some changes in db and in odbc.conf timeouts and stuff but it’s not working to me but mby there is some timeout time that must be plz help me solve this problem

What I have tried:

res_odbc.conf:
dsn =>MSSQL
username =>sa
password =>******!
polling=> no
limit => 1
pre-connect => yes
idlecheck => 300
negative_connection_cache => 100
Posted
Comments
itsmypassion 19-Feb-18 5:30am    
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f6466a82-caf7-4053-94a4-a6f756b2f5c6/calling-stored-procedure-invalid-cursor-state?forum=sqldataaccess
GTR0123 19-Feb-18 6:01am    
in func_odbc i have Exec dbo.Main_Dest @bnumb = number that asterisk willl give me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900