incognito
unread,Jul 14, 2009, 1:11:45 AM7/14/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ECHI Converter
Hi All,
Running into a few problems getting the ActiveRecord side of things
inserting records into SQL Server. Was wondering if anyone has had
success.
Can run the rake migrate in order to build the tables, but when ECHI-
Conv processes a CHR file and tries to insert the records into the DB,
I get the following error:
<i>Mon Jul 13 13:54:16 +1000 2009 (2124) EchiRecord Create (0.0ms)
DBI::DatabaseError: 22008 (242) [Microsoft][SQL Server Native Client
10.0][SQL Server]The conversion of a varchar data type to a datetime
data type resulted in an out-of-range value.: INSERT INTO
[echi_records] ([segment], [vdn9], [events0], [asaiuui], [cwcdigits],
[cwcs0], [queuetime], [events1], [split1], [malicious],
[origholdtime], [cwcs1], [firstvdn], [holdabn], [events2], [split2],
[dispsklevel], [cwcs2], [lastobserver], [audiodifficulty], [events3],
[split3], [observingcall], [cwcs3], [uuilen], [events4], [cwcs4],
[segstart], [eqloc], [events5], [conference], [talktime], [duration],
[disptime], [onholdtime], [acdnum], [agentreleased], [events6],
[dispivector], [collectdigits], [firstivector], [origreason],
[calldisp], [callingII], [ansreason], [dispsplit], [events7],
[obslocid], [daqueued], [events8], [consulttime], [ucid],
[trunkgroup], [dialednumber], [dispvdn], [vdn2], [vdn3], [segstop],
[assist], [origlocid], [callid], [vdn4], [transferred], [tklocid],
[vdn5], [ringtime], [callingparty], [acwtime], [answerlocid], [vdn6],
[holds], [disppriority], [vdn7], [origlogid], [anslogid], [netintime],
[vdn8]) VALUES(1, '', 0, '', '', '', 0, 0, 414, 'N', 0, '', '42000',
'N', 0, -1, 1, '', '', 'N', 0, -1, 'N', '', 0, 0, '', '2007-07-20
16:55:10.000', '004A12012', 0, 'N', 183, 261, 78, 0, 1, 'Y', 0, 421,
'2', 400, 0, 2, '', 0, 414, 0, 0, 'N', 0, 0, '00001143721184914510',
41, '42000', '41021', '41007', '41021', '2007-07-20 17:00:02.000',
'N', 0, 9557402, '', 'N', 3, '', 11, '0839411671', 31, 3, '', 0, 4,
'', '', '43031', 0, '')
Mon Jul 13 13:54:16 +1000 2009 (2124) EXECUTE (0.0ms) ROLLBACK
TRANSACTION</i>
I have a feeling this is ODBC related (either using windows default
SQL server ODBC client or the native SQL client).
Troubleshooting performed:
* When I run the query from SQL server itself, it executes perfectly.
* When I run the query from another application using the same ODBC
DSN, it throws the same error.
* When I run the query through the above application, but remove the
hyphens from the datetime fields, it executes perfectly.
My initial thought would be to modify activerecord some how so that it
leaves the hyphens out of those fields.
Does anyone know which rb files this would be done in, or does anyone
have a better suggestion?
Cheers,
- Ryan