TeleFlow Forums http://teleflow.org/phpbb/ |
|
SQL: Populate call list http://teleflow.org/phpbb/viewtopic.php?f=10&t=504 |
Page 1 of 1 |
Author: | susan.burkley [ Wed Mar 26, 2008 9:26 am ] |
Post subject: | SQL: Populate call list |
I’m trying to pull my call list from a SQL 2005 database. I have a DSN set up, and I have two tasks, the connect and the select. I have simply used the default outgoing template and tweaked from there. Unfortunately, this is my output: 2008/03/21 14:23:51.718: OutboundReq_Check<==DbSet 2008/03/21 14:23:51.718: [14] DB Connect 2008/03/21 14:23:51.718: Parameters is 'DSN=Voice' 2008/03/21 14:23:51.718: ConnectString: DSN=Voice 2008/03/21 14:23:51.750: SQL Error State: 01000 Native Error Code: 1645 ODBC Error: [Microsoft][SQL Native Client][SQL Server]Changed database context to 'Voice'. 2008/03/21 14:23:51.750: SQL Error State: 01000 Native Error Code: 1647 ODBC Error: [Microsoft][SQL Native Client][SQL Server]Changed language setting to us_english. 2008/03/21 14:23:51.750: SQL Error State: HY092 Native Error Code: 0 ODBC Error: [Microsoft][SQL Native Client]Invalid attribute/option identifier 2008/03/21 14:23:51.750: [5] SQL Statement 2008/03/21 14:23:51.750: Handle is '1' 2008/03/21 14:23:51.750: Warning time threshold is '' 2008/03/21 14:23:51.750: Empty Warning time threshold defaults to '2000' 2008/03/21 14:23:51.765: <----- BEGIN -----> USE VOICE SELECT DISTINCT PhoneNo AS OUTCALLNUM FROM Patient, Link WHERE Patient.PatientID = Link.PatientID <----- END -----> 2008/03/21 14:23:51.781: Success with info 2008/03/21 14:23:51.781: Elapsed Time: 0.031 2008/03/21 14:23:51.781: [7] SQL Fetch 2008/03/21 14:23:51.781: Handle is '1' 2008/03/21 14:23:51.781: ERROR: Can only fetch records after select statements. 2008/03/21 14:23:51.781: FAILURE First, what are is the ‘invalid attribute’ error? I’ve removed all ‘fluff’ settings from the DSN, and I still see it. However, I saw in the task that DSN errors may not cause failure, which is nice. ? Second, I’m not sure about the SQL fetch error. Do I need another task? Do you maybe have a sample project that pulls from DB? Thanks in advance, Susan Burkley |
Author: | Chris [ Tue Jun 24, 2008 10:37 am ] |
Post subject: | Re: SQL: Populate call list |
This issue was handled off-line, but for the benefit of those in the forums: You can see in the log snippet that the SQL Fetch is failing, because a Fetch requires that the preceding SQL Statement be a SELECT statement. Quote: [7] SQL Fetch 2008/03/23 15:13:02.375: Handle is '1' 2008/03/23 15:13:02.375: ERROR: Can only fetch records after select statements. 2008/03/23 15:13:02.375: FAILURE The SELECT statement was incorrect because of the "USE VOICE" line. Since the DB Connect step already set the database to use, no clause to set the database to use was required anyway. As for the invalid attribute error: This is actually a non-critical warning returned from the ODBC driver when connecting. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |