TeleFlow Forums
http://teleflow.org/phpbb/

SQL Connection works only with simulator
http://teleflow.org/phpbb/viewtopic.php?f=11&t=525
Page 1 of 1

Author:  j.moghisi [ Thu May 15, 2008 2:45 am ]
Post subject:  SQL Connection works only with simulator

Hi,

We are not sure what we are doing wrong with a Test application we have just made. It does not have any error handling, etc yet. We just wanted to get the DB connection working with a query. It works fine with the simulator, but not when we use the Dialogic telephony card:

Simulator
Code:
2008/05/15 10:26:47.203:  ==>test2
2008/05/15 10:26:47.203:     [1] START
2008/05/15 10:26:47.203:     [3] Wait for Call
2008/05/15 10:26:47.203:        TIMEOUT is '0'
2008/05/15 10:26:47.203:        WARNING: TIMEOUT '0' evaluates to 0 and is interpreted as no timeout
2008/05/15 10:26:47.203:        Rings is '1'
2008/05/15 10:26:47.203:        Connection Delay is '500'
2008/05/15 10:26:48.703:        Wait for 1 rings and then pickup
2008/05/15 10:26:51.218:        Setting global variable '@CALLERID' to ''
2008/05/15 10:26:51.218:        Setting global variable '@CALLEDID' to ''
2008/05/15 10:26:51.218:        Connection delay: 500 ms
2008/05/15 10:26:51.718:     [5] DB Connect
2008/05/15 10:26:51.718:        Parameters is 'DSN=telephone;UID=Administrator;Trusted_Connection=Yes;WSID=MARANDYSERVER1;DATABASE=telephone;'
2008/05/15 10:26:51.718:        ConnectString: DSN=telephone;UID=Administrator;Trusted_Connection=Yes;WSID=MARANDYSERVER1;DATABASE=telephone;
2008/05/15 10:26:52.515:     SQL Error State:   01000
                             Native Error Code: 1645
                             ODBC Error:        [Microsoft][SQL Native Client][SQL Server]Changed database context to 'telephone'.
2008/05/15 10:26:52.515:     SQL Error State:   01000
                             Native Error Code: 1647
                             ODBC Error:        [Microsoft][SQL Native Client][SQL Server]Changed language setting to us_english.
2008/05/15 10:26:52.546:     SQL Error State:   HY092
                             Native Error Code: 0
                             ODBC Error:        [Microsoft][SQL Native Client]Invalid attribute/option identifier
2008/05/15 10:26:52.546:     [9] SQL Statement
2008/05/15 10:26:52.546:        Handle is '1'
2008/05/15 10:26:52.562:        Warning time threshold is ''
2008/05/15 10:26:52.562:        Empty Warning time threshold defaults to '2000'
2008/05/15 10:26:52.562:           <----- BEGIN ----->
                          SELECT
                              house, street1, town, pc
                          FROM
                              dbo.customer
                          WHERE
                              tel = ''
                         
                                   <-----  END  ----->
2008/05/15 10:26:52.640:        Elapsed Time: 0.094
2008/05/15 10:26:52.640:     [11] SQL Fetch
2008/05/15 10:26:52.640:        Handle is '1'
2008/05/15 10:26:52.640:        FAILURE
2008/05/15 10:26:52.640:     [43] Beep
2008/05/15 10:26:52.828:     [44] Hang Up
2008/05/15 10:26:52.828:        Hanging up
2008/05/15 10:26:52.828:     [2] FINISH
2008/05/15 10:26:52.843:  End of application.
2008/05/15 10:26:55.843: 
                         
                         
2008/05/15 10:26:55.843:  All memory released.  Exiting...



Dialogic
Code:
2008/05/15 09:58:12.421:  ==>test2
2008/05/15 09:58:12.421:     [1] START
2008/05/15 09:58:12.421:     [3] Wait for Call
2008/05/15 09:58:12.421:        TIMEOUT is '0'
2008/05/15 09:58:12.421:        WARNING: TIMEOUT '0' evaluates to 0 and is interpreted as no timeout
2008/05/15 09:58:12.421:        Rings is '1'
2008/05/15 09:58:12.421:        Connection Delay is '500'
2008/05/15 09:58:13.921:        Wait for 1 rings and then pickup
2008/05/15 09:58:13.968:        ERROR: Port not available on SCbus
2008/05/15 09:58:13.968:           (106): Invalid Switching Handler Bus Mode
2008/05/15 09:58:13.968:        Warning: port's switch status unchanged.
2008/05/15 10:24:11.093:           Incoming call...
2008/05/15 10:24:11.093:        dx_sethook, lines[curLine].chdev = 4, OFFHOOK
2008/05/15 10:24:11.640:        Setting global variable '@CALLERID' to '907738196049'
2008/05/15 10:24:11.640:        Setting global variable '@CALLEDID' to ''
2008/05/15 10:24:11.640:        Connection delay: 500 ms
2008/05/15 10:24:12.140:     [5] DB Connect
2008/05/15 10:24:12.140:        Parameters is 'DSN=telephone;UID=Administrator;Trusted_Connection=Yes;WSID=MARANDYSERVER1;DATABASE=telephone;'
2008/05/15 10:24:12.140:        ConnectString: DSN=telephone;UID=Administrator;Trusted_Connection=Yes;WSID=MARANDYSERVER1;DATABASE=telephone;
2008/05/15 10:24:12.156:  ERROR: Connect: SQLConnect failed.
2008/05/15 10:24:12.187:     SQL Error State:   IM002
                             Native Error Code: 0
                             ODBC Error:        [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
2008/05/15 10:24:12.187:        FAILURE
2008/05/15 10:24:12.187:     [43] Beep
2008/05/15 10:24:12.187:        Call Status (lps0)
2008/05/15 10:24:12.203:              ATDX_HOOKST (4)
2008/05/15 10:24:12.218:        Playing audio buffer...
2008/05/15 10:24:12.421:     [44] Hang Up
2008/05/15 10:24:13.671:        Attempting ag_unlisten, lines[curLine].chdev = 0x4
2008/05/15 10:24:13.671:              ag_unlisten - failure
2008/05/15 10:24:13.671:              dx_close
2008/05/15 10:24:13.671:        ReleaseLine done.
2008/05/15 10:24:13.671:     [2] FINISH
2008/05/15 10:24:13.671:  End of application.
2008/05/15 10:24:16.671: 
                         
                         
2008/05/15 10:24:16.671:  All memory released.  Exiting...


Any ideas? I am guessing we have done something wrong with the connection string. Thanks

Author:  Chris [ Thu May 15, 2008 9:21 am ]
Post subject:  Re: SQL Connection works only with simulator

The most likely cause is that you are using a User DSN, and need to use a System DSN.

TeleFlow Simulator is an interface application, and as such is associated with the currently logged in windows user when you run it, which means it can use a User data source.

TeleFlow Server is running as a service, and is not associated with a user (or is using a SYSTEM account), so it will only be able to use a System data source.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/