Database Insert Error

30 views
Skip to first unread message

Karen VR

unread,
Dec 4, 2008, 2:06:10 PM12/4/08
to ECHI Converter
The following error is raised when processing file chr0002.97. It
seems to be related to the value in the [asaiuui] field. However, if
the INSERT statement is copied from the error log file and manually
run against the database using the SQL Server Management Studio, the
record gets inserted successfully. There are other records with UUI
data that also insert sucessfully. Can anyone provide any assistance
or direction on troubleshooting? I have uploaded the chr0002.97
file.

Thanks in advance for any assistance.

Tue Dec 02 14:13:42 -0500 2008 (35940) Error processing ECHI file -
DBI::DatabaseError: Execute
OLE error code:80040E14 in Microsoft OLE DB Provider for SQL
Server
Unclosed quotation mark after the character string '5180'.
HRESULT error code:0x80020009
Exception occurred.: 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(2, '', 0, '5180 |UNO|12|6508649903|1849008|00001024021227184479|
5180|1849895|', '', '', 0, 0, -1, 'N', 0, '', '1849895', 'N', 0, -1,
0, '', '', 'N', 0, -1, 'N', '', 4, 0, '', '20081120 07:35:22', '', 0,
'N', 0, 64, 12, 0, 1, 'N', 0, 897, '1', 895, 0, 4, '', 0, -1, 0, 0,
'N', 0, 0, '00001024511227184522', 0, '1849895', '1849897', '1849896',
'1849897', '20081120 07:36:26', 'N', 0, 4992903, '', 'N', 0, '', 0,
'1839956', 0, 0, '', 0, 0, '', '', '', 0, '')
Tue Dec 02 14:13:42 -0500 2008 (35940) ECHI-Converter service stopped

JasonGoecke

unread,
Dec 5, 2008, 9:55:37 AM12/5/08
to ECHI Converter
I used this utility to parse the file:

http://groups.google.com/group/echi-converter/t/c0a3a313dcf9c0ee?hl=en

The record giving you problems appears to be #225. And it appears you
are getting special characters in the asaiuui filed which SQL Server
is not liking via the ActiveRecord library of Ruby/Rails. If I search
for '5180 |' nothing is found, meaning that is not a space between the
0 and the |. I have attached the resulting output file here:

http://groups.google.com/group/echi-converter/web/karen_output.txt?hl=en

Now this character, when I do a 'show invisibles' in TextMate appears
to be a diamond (♦ "filled diamond suit" - 0x2662). If I look at
some of the other ASAI inputs there are &diams in there too, but alone
in a field and not next to another string like the record 225 (I did
not look at everyone, but in the spot checking this appears to be the
case).

What is generating this data into the ASAI field and why is it sending
special characters? Not sure what to do on this particular one, given
that the file is being processed fine and the underlying SQL Server
library is rejecting it. You might try going the ODBC route to connect
to SQL Server and see if that accepts the special character.

Karen Belyea

unread,
Dec 5, 2008, 10:01:00 AM12/5/08
to echi-co...@googlegroups.com
Thanks so much for your help. I believe they have an IVR application that is populating the UUI, so I will refer it back to their IVR team.

Karen Belyea

Senior Systems Engineer | Phone 502.225.0692 | kbe...@vr-inc.com | www.vr-inc.com

Optimizing the contact center experience

Karen Belyea

unread,
Dec 5, 2008, 12:27:11 PM12/5/08
to echi-co...@googlegroups.com

The customer is sending a null after the '5180' through a CTI application for which they don't have the source.

Can you explain further on your recommendation:

You might try going the ODBC route to connect to SQL Server and see if that accepts the special character. 

This is the first time I've used the echi converter tool, primarily because the customer did not opt to have Avaya convert the binary to ASCII.  Can the echi converter tool be configured to connect to SQL via ODBC vs. using ActiveRecord library of Ruby/Rails?

Karen Belyea

 

Senior Systems Engineer | Phone 502.225.0692 | kbe...@vr-inc.com | www.vr-inc.com

 

Optimizing the contact center experience

 

 

-----Original Message-----
From: echi-co...@googlegroups.com [mailto:echi-co...@googlegroups.com] On Behalf Of JasonGoecke
Sent: Friday, December 05, 2008 9:56 AM
To: ECHI Converter
Subject: Re: Database Insert Error

 

 

I used this utility to parse the file:

> data that also insert successfully.  Can anyone provide any assistance

JasonGoecke

unread,
Dec 5, 2008, 1:05:17 PM12/5/08
to ECHI Converter
You would still be using ActiveRecord, as this is the only access
method ECHI-Converter has to the database. ActiveRecord may access
databases through ODBC, see here:

http://odbc-rails.rubyforge.org/

This would mean configuring ODBC on the server to connect to SQL
Server and then seeing if ODBC will let that Null pass to the
database. Not guaranteed, but might be a work around.

Now, it does appear there is a bug in the ActiveRecord Adapter for SQL
Server handling Nulls:

http://dev.rubyonrails.org/ticket/8886

I can not guarantee this is the exact problem you are having, but it
is specific enough to your situation that it might be. Few more
details here:

http://www.ruby-forum.com/topic/134949

So, you have a couple of things you may look into. Now, ticket #8886
may already be built into the latest release of ActiveRecord you might
be using, so you may check that. Like I said, this is only
speculation.

Lastly, you could take that script I wrote to parse the file and
simply generate a CSV that could then be loaded by another process:

http://groups.google.com/group/echi-converter/t/c0a3a313dcf9c0ee?hl=en

On Dec 5, 9:27 am, "Karen Belyea" <kbel...@vr-inc.com> wrote:
> The customer is sending a null after the '5180' through a CTI
> application for which they don't have the source.
>
> Can you explain further on your recommendation:
>
> You might try going the ODBC route to connect to SQL Server and see if
> that accepts the special character.  
>
> This is the first time I've used the echi converter tool, primarily
> because the customer did not opt to have Avaya convert the binary to
> ASCII.  Can the echi converter tool be configured to connect to SQL via
> ODBC vs. using ActiveRecord library of Ruby/Rails?
>
> Karen Belyea
>
> Senior Systems Engineer | Phone 502.225.0692 | kbel...@vr-inc.com |www.vr-inc.com

Karen VR

unread,
Dec 19, 2008, 5:48:23 PM12/19/08
to ECHI Converter
Latest update: using ODBC did not work; customer is not able to change
code of the CTI app that populates UUI. Thanks for your offer to see
if there is a quick fix.
> > > Tue Dec 02 14:13:42 -0500 2008 (35940) ECHI-Converter service stopped- Hide quoted text -
>
> - Show quoted text -

JasonGoecke

unread,
Dec 20, 2008, 6:04:05 AM12/20/08
to ECHI Converter
Using the test utility I will if there is a way to strip out those
'special' characters being inserted. If there is, I may then add an
option to strip those characters out in the configuration file. Of
course, this presumes that the customer does not need those characters
for any existing reporting/details.

Will let you know, and you may want to check that it is okay to strip
that portion of the data.

JasonGoecke

unread,
Dec 20, 2008, 7:12:32 AM12/20/08
to ECHI Converter
Alright, I have done two things:

===
1. Added the ability to test the stripping of characters to the test
script here (simply toggle the constant 'STRIP' to TRUE/FALSE to see):

http://github.com/jsgoecke/echi-file-eval/tree/master/echi_fileeval.rb

It does work.

2. I have added the feature to strip the characters to the trunk here:

http://rubyforge.org/projects/echi-converter

Based on this feature request:

http://rubyforge.org/tracker/index.php?func=detail&aid=23293&group_id=4110&atid=15805
===

Right now the default is set to not strip characters so you will need
to set the config/application.yml setting 'strip_characters' to true:

http://echi-converter.rubyforge.org/svn/trunk/config/application.yml

I have not released a gem yet, so please follow the instructions here:

http://groups.google.com/group/echi-converter/t/a6de2dfc748922ac

To roll your own gem to test. While I have tested with the echi-eval-
file script and it works, I have not had a chance to test echi-
converter given I do not have my environ entirely set due to travel
and being remote. Therefore please test and report back with success/
or issues and I will release, modify based on that.

Good luck!

mattfitzwater

unread,
Jan 5, 2009, 2:57:11 PM1/5/09
to ECHI Converter
I am experiencing the following error when trying to rake package.
Any suggestions?:


C:\temp\Trunk>rake package --trace
(in C:/temp/Trunk)
** Invoke package (first_time)
** Invoke pkg/echi-converter-0.4.1.tgz (first_time)
** Invoke pkg/echi-converter-0.4.1 (first_time, not_needed)
** Invoke History.txt (first_time, not_needed)
** Invoke License.txt (first_time, not_needed)
** Invoke Manifest.txt (first_time, not_needed)
** Invoke README.txt (first_time, not_needed)
** Invoke Rakefile (first_time, not_needed)
** Invoke lib/main.rb (first_time, not_needed)
** Invoke lib/echi-converter/version.rb (first_time, not_needed)
** Invoke lib/database.rb (first_time, not_needed)
** Invoke lib/database_presence.rb (first_time, not_needed)
** Invoke lib/main_win32.rb (first_time, not_needed)
** Invoke lib/echi-converter.rb (first_time, not_needed)
** Invoke lib/ftp_fetcher.rb (first_time, not_needed)
** Invoke scripts/txt2html (first_time, not_needed)
** Invoke setup.rb (first_time, not_needed)
** Invoke test/test_echi-converter.rb (first_time, not_needed)
** Invoke test/test_helper.rb (first_time, not_needed)
** Invoke website/index.html (first_time, not_needed)
** Invoke website/index.txt (first_time, not_needed)
** Invoke website/javascripts/rounded_corners_lite.inc.js (first_time,
not_neede
d)
** Invoke website/stylesheets/screen.css (first_time, not_needed)
** Invoke website/template.rhtml (first_time, not_needed)
** Invoke config/application.yml (first_time, not_needed)
** Invoke config/database.yml (first_time, not_needed)
** Invoke config/extended_version12.yml (first_time, not_needed)
** Invoke config/extended_version13.yml (first_time, not_needed)
** Invoke config/extended_version14.yml (first_time, not_needed)
** Invoke config/standard_version12.yml (first_time, not_needed)
** Invoke config/standard_version13.yml (first_time, not_needed)
** Invoke config/standard_version14.yml (first_time, not_needed)
** Invoke config/install_files.yml (first_time, not_needed)
** Invoke db/migrate/001_create_echi_records.rb (first_time,
not_needed)
** Invoke db/migrate/002_create_echi_logs.rb (first_time, not_needed)
** Invoke db/migrate/003_create_echi_agents.rb (first_time,
not_needed)
** Invoke db/migrate/004_change_log_name_size.rb (first_time,
not_needed)
** Invoke db/migrate/005_change_log_processedat_name.rb (first_time,
not_needed)

** Invoke db/migrate/006_create_echi_reasons.rb (first_time,
not_needed)
** Invoke db/migrate/007_create_echi_cwcs.rb (first_time, not_needed)
** Invoke db/migrate/008_create_echi_vdns.rb (first_time, not_needed)
** Invoke db/migrate/009_create_echi_acds.rb (first_time, not_needed)
** Invoke db/migrate/010_create_echi_splits.rb (first_time,
not_needed)
** Invoke db/migrate/011_create_echi_trunks.rb (first_time,
not_needed)
** Invoke db/migrate/012_create_echi_vectors.rb (first_time,
not_needed)
** Invoke bin/echi-converter (first_time, not_needed)
** Invoke examples/extended_version12/chr0003 (first_time, not_needed)
** Invoke examples/extended_version12/chr0003.txt (first_time,
not_needed)
** Invoke examples/schemas/oracle_echi.sql (first_time, not_needed)
** Invoke examples/ascii_csv/chr5500.123 (first_time, not_needed)
** Invoke examples/db_connect_test.rb (first_time, not_needed)
** Invoke History.txt (not_needed)
** Invoke License.txt (not_needed)
** Invoke Manifest.txt (not_needed)
** Invoke README.txt (not_needed)
** Invoke Rakefile (not_needed)
** Invoke lib/main.rb (not_needed)
** Invoke lib/echi-converter/version.rb (not_needed)
** Invoke lib/database.rb (not_needed)
** Invoke lib/database_presence.rb (not_needed)
** Invoke lib/main_win32.rb (not_needed)
** Invoke lib/echi-converter.rb (not_needed)
** Invoke lib/ftp_fetcher.rb (not_needed)
** Invoke scripts/txt2html (not_needed)
** Invoke setup.rb (not_needed)
** Invoke test/test_echi-converter.rb (not_needed)
** Invoke test/test_helper.rb (not_needed)
** Invoke website/index.html (not_needed)
** Invoke website/index.txt (not_needed)
** Invoke website/javascripts/rounded_corners_lite.inc.js (not_needed)
** Invoke website/stylesheets/screen.css (not_needed)
** Invoke website/template.rhtml (not_needed)
** Invoke config/application.yml (not_needed)
** Invoke config/database.yml (not_needed)
** Invoke config/extended_version12.yml (not_needed)
** Invoke config/extended_version13.yml (not_needed)
** Invoke config/extended_version14.yml (not_needed)
** Invoke config/standard_version12.yml (not_needed)
** Invoke config/standard_version13.yml (not_needed)
** Invoke config/standard_version14.yml (not_needed)
** Invoke config/install_files.yml (not_needed)
** Invoke db/migrate/001_create_echi_records.rb (not_needed)
** Invoke db/migrate/002_create_echi_logs.rb (not_needed)
** Invoke db/migrate/003_create_echi_agents.rb (not_needed)
** Invoke db/migrate/004_change_log_name_size.rb (not_needed)
** Invoke db/migrate/005_change_log_processedat_name.rb (not_needed)
** Invoke db/migrate/006_create_echi_reasons.rb (not_needed)
** Invoke db/migrate/007_create_echi_cwcs.rb (not_needed)
** Invoke db/migrate/008_create_echi_vdns.rb (not_needed)
** Invoke db/migrate/009_create_echi_acds.rb (not_needed)
** Invoke db/migrate/010_create_echi_splits.rb (not_needed)
** Invoke db/migrate/011_create_echi_trunks.rb (not_needed)
** Invoke db/migrate/012_create_echi_vectors.rb (not_needed)
** Invoke bin/echi-converter (not_needed)
** Invoke examples/extended_version12/chr0003 (not_needed)
** Invoke examples/extended_version12/chr0003.txt (not_needed)
** Invoke examples/schemas/oracle_echi.sql (not_needed)
** Invoke examples/ascii_csv/chr5500.123 (not_needed)
** Invoke examples/db_connect_test.rb (not_needed)
** Execute pkg/echi-converter-0.4.1.tgz
tar zcvf echi-converter-0.4.1.tgz echi-converter-0.4.1
rake aborted!
undefined method `exitstatus' for nil:NilClass
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
719:in `sh'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
726:in `call
'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
726:in `sh'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
805:in `sh'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/
packagetask.rb:
125:in `define'
c:/Program Files/Ruby/lib/ruby/1.8/fileutils.rb:121:in `chdir'
c:/Program Files/Ruby/lib/ruby/1.8/fileutils.rb:121:in `chdir'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/
packagetask.rb:
124:in `define'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
392:in `call
'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
392:in `exec
ute'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
392:in `each
'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
392:in `exec
ute'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
362:in `invo
ke'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
355:in `sync
hronize'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
355:in `invo
ke'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
369:in `invo
ke_prerequisites'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1003:in `eac
h'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1003:in `sen
d'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1003:in `eac
h'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
368:in `invo
ke_prerequisites'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
361:in `invo
ke'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
355:in `sync
hronize'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
355:in `invo
ke'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1739:in `top
_level'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1739:in `eac
h'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1739:in `top
_level'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1761:in `sta
ndard_exception_handling'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1733:in `top
_level'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1711:in `run
'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1761:in `sta
ndard_exception_handling'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:
1708:in `run
'
c:/Program Files/Ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
c:/Program Files/Ruby/bin/rake.bat:20:in `load'
c:/Program Files/Ruby/bin/rake.bat:20

JasonGoecke

unread,
Jan 5, 2009, 5:04:45 PM1/5/09
to ECHI Converter
I have created a quick screencast showing the full process here:

http://rubyurl.com/TBqZ (requires Quicktime)

And have posted the resulting gem (temporarily) here:

http://dl.getdropbox.com/u/25511/Ruby/echi-converter-0.4.1.gem

As to the problem you are having building the gem, I have a feeling it
is because you are doing this on Windows where there is no 'tar'
http://en.wikipedia.org/wiki/Tar_(file_format) installed. Better to
use a POSIX OS (ie - Linux / OSX) to build the gems.

mattfitzwater

unread,
Jan 7, 2009, 2:56:36 PM1/7/09
to ECHI Converter

JasonGoecke

unread,
Jan 7, 2009, 6:21:58 PM1/7/09
to ECHI Converter
The file you attached is not the same file as the one that caused the
MS-SQL insert error in the gist below. I have attached, and you may
see that all records have no value in the 'asaiuui' which is where the
offending data derives from:

http://groups.google.com/group/echi-converter/web/chr2603.txt

Also, if you look at line 148 on this gist:

http://gist.github.com/44387

You will see that this line has a 'space' between the 5458 and the |
NPB. This is most likely where the offending character is at, but
without the original file I cannot see what that character is. So
either one of two things is happening:

1. The patch I did is not working
2. There is more than one type of special character being inserted
into the ASAIUUI field by the external component generating that data,
and that you need to add to the array of characters to strip in the
config.yml here:

http://gist.github.com/44374

If it is number two, then the issue is that there could be a whole set
of characters that need to be stripped out. Either you would need to
figure out which characters could be there by a process of
elimination, or a bit of work would have to be done to validate what
is an acceptable character or not.

Let me know if you could post the binary file actually generating this
error.

On Jan 7, 11:56 am, mattfitzwater <matthewfitzwa...@gmail.com> wrote:
> I am experiencing the same problem below is the links to the
> application.log and the database.log.  I also posted the file link
> below.
>
> http://gist.github.com/44387
>
> http://gist.github.com/44388
>
> http://echi-converter.googlegroups.com/web/chr2603.zip?hl=en&gda=lPDm...

mattfitzwater

unread,
Jan 8, 2009, 9:56:09 AM1/8/09
to ECHI Converter
I uploaded the application.log file and the chr file. Below is the
log indicating the file number.

http://gist.github.com/44744

JasonGoecke

unread,
Jan 8, 2009, 11:53:53 AM1/8/09
to ECHI Converter
Could you please attach your project directory's config/
application.yml as well, of course without relevant username/
passwords.

mattfitzwater

unread,
Jan 8, 2009, 2:03:52 PM1/8/09
to ECHI Converter
I have uploaded the application.yml file.

JasonGoecke

unread,
Jan 8, 2009, 2:24:03 PM1/8/09
to ECHI Converter
As I suspected, you do not have a special character in the first
element of your array 'characters_to_strip'. You have asked it to
strip a nil, when you really need it to strip a 'diamond', which is
what the other app is inserting in ASAIUUI, you may actually see this
character in the file you attached here:

http://echi-converter.googlegroups.com/web/application.zip?gda=mA93-EEAAACAIQcJA7PuhkZKgRtrNjVj86ysTtUv2QLOWYidDtL6JdhgSjLh7Iv8JznTAdZwwgpTCT_pCLcFTwcI3Sro5jAzlXFeCn-cdYleF-vtiGpWAA

Search for '5458', which is the beginning of the ASAIUUI field right
at the end that causes the insert problem and you may see the special
character. Remember, you need a text editor that may allow you to see
and manipulate those characters. In my case I use TextMate on OSX.

mattfitzwater

unread,
Jan 8, 2009, 2:32:05 PM1/8/09
to ECHI Converter
I posted a new application.yml file because the original one did not
have the special character in the file.

JasonGoecke

unread,
Jan 8, 2009, 2:54:22 PM1/8/09
to ECHI Converter
This one does not either (application_yml_new.zip). Here is your file
as viewed with TextMate:

http://groups.google.com/group/echi-converter/web/YourFileWithoutChar.png

Here is the default one included with the patched version 0.4.1:

http://groups.google.com/group/echi-converter/web/DefaultWithChar.png

You need to get that character in there or of course it will not strip
it out. BTW, the copyright character is there as an example, only
strip that if you really need to.

mattfitzwater

unread,
Jan 8, 2009, 3:48:47 PM1/8/09
to ECHI Converter
I assumed that the example that was provided in the application.yml
was the special character that we were trying to strip. Do you have
an example application.yml with the diamond character in the
configuration?

JasonGoecke

unread,
Jan 8, 2009, 4:18:32 PM1/8/09
to ECHI Converter
Of course it will be up to you to determine which characters will need
to be stripped from your custom data in the ASAIUUI field to work with
MS-SQL. As for the example, it is in the file you posted here and
linked above:

http://echi-converter.googlegroups.com/web/application.zip?gda=mA93-EEAAACAIQcJA7PuhkZKgRtrNjVj86ysTtUv2QLOWYidDtL6JdhgSjLh7Iv8JznTAdZwwgpTCT_pCLcFTwcI3Sro5jAzlXFeCn-cdYleF-vtiGpWAA

Also, the default config file installed by the patched gem you are
using has it in the application.yml as well.

mattfitzwater

unread,
Jan 8, 2009, 6:10:32 PM1/8/09
to ECHI Converter
I have modified the configuration file in textmate on an apple running
OSX, the file is called application.yml.zip. I moved the file over to
a windows server 2003 instance and the service will not start. If I
open the application.yml file in notepad on the server and remove the
invisible space where the diamond character is, the service starts.

JasonGoecke

unread,
Jan 8, 2009, 6:14:01 PM1/8/09
to ECHI Converter
Please try starting manually, as opposed to as a service, to see what
error message you get back. You may enter something like:

echi-converter run path_to_your_project

Once you do this please post a gist. In the meantime I will try the
same on a Windows instance I have on my side.

JasonGoecke

unread,
Jan 8, 2009, 7:24:33 PM1/8/09
to ECHI Converter
Okay, I have taken a slightly different tack, although what I had
worked on OSX not sure on Windows. So, I have created a new gem:

http://dl.getdropbox.com/u/25511/Ruby/echi-converter-0.4.1.gem

This gem now allows you to put the Decimal values of the control/
special characters in the configuration instead of the actual
character itself, as follows:

http://gist.github.com/44955 (where 0 is a null)

The code that does this is as follows:

http://gist.github.com/44956

Now, what you want to do is:

1. gem uninstall echi-converter
2. gem install echi-converter-0.4.1.gem
3. Re-install your project
4. Copy over config files
5. Update with the above in consideration

Let me know if you have any questions.

On Jan 8, 3:10 pm, mattfitzwater <matthewfitzwa...@gmail.com> wrote:

mattfitzwater

unread,
Jan 8, 2009, 7:48:48 PM1/8/09
to ECHI Converter
I have tried the echi-converter start and I have tried starting the
service under windows services. Both said that the service could not
start. As soon as I removed the special character the service starts
fine.

mattfitzwater

unread,
Jan 8, 2009, 7:49:26 PM1/8/09
to ECHI Converter
what value will I put in the configuration for the diamond?

JasonGoecke

unread,
Jan 8, 2009, 7:57:21 PM1/8/09
to ECHI Converter
Based on the analysis I did, the diamond appears to be representing a
null which is a 0 in decimal ASCII terms. When I took this file
originally submitted by Karen:

http://echi-converter.googlegroups.com/web/chr0002.97?hl=en&gda=4sX4kDwAAACAIQcJA7PuhkZKgRtrNjVjUkas-gnToRVOrG66k6qnUzBe4Mbt8Z0q7bjrlKPjQBD9Wm-ajmzVoAFUlE7c_fAt&gsc=g_g3pwsAAADxwx2SoisX_QLTFYprGev0

I was able to get the following hash data out with no stripping:

http://gist.github.com/44971

You may see the '\000' after the 5180. When I apply the stripping
method using 0 as the decimal representation I get:

http://gist.github.com/44972

With the null now removed.

mattfitzwater

unread,
Jan 9, 2009, 11:31:45 AM1/9/09
to ECHI Converter
still no luck with this version. I have uploaded all the files for
this install called ECHI-Converter Files.zip. I did some research and
found that the Diamond is actually #169 of ascii extended values. I
tried this in my configuration also with no luck. Below is the link
to the article:

http://newsgroups.derkeiler.com/Archive/Comp/comp.lang.basic.visual.misc/2007-04/msg00108.html

Do you think that we can do a SQL replace on the Chr #169 in the
insert statement. Below is a rough example of how to do this:


http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=75816

JasonGoecke

unread,
Jan 9, 2009, 12:12:05 PM1/9/09
to ECHI Converter
There was a bug that I fixed in this gem:

http://dl.getdropbox.com/u/25511/Ruby/echi-converter-0.4.1.gem

Where I was evaluating a boolean as a string so the method was not
being invoked. You may see what I changed here:

http://gist.github.com/45182

Also, I think it is 0 in this case that needs to be replaced, but feel
free to try with both. Also, for the SQL customization you will have
to provide the SQL code that you might want to try, but this will take
time.

On Jan 8, 4:57 pm, JasonGoecke <jsgoe...@gmail.com> wrote:
> Based on the analysis I did, the diamond appears to be representing a
> null which is a 0 in decimal ASCII terms. When I took this file
> originally submitted by Karen:
>
> http://echi-converter.googlegroups.com/web/chr0002.97?hl=en&gda=4sX4k...

mattfitzwater

unread,
Jan 9, 2009, 12:41:50 PM1/9/09
to ECHI Converter
YOU ARE THE MAN, IT WORKS!!!!!!!!!!!!!!!!!!!

JasonGoecke

unread,
Jan 9, 2009, 2:19:57 PM1/9/09
to ECHI Converter
Glad it works, I have released the gem based on this.

zakkiarsad

unread,
Feb 2, 2009, 3:18:39 AM2/2/09
to ECHI Converter
Dear Jason,
could u explain wich encoding that i should use? or i shouldn't
my problem is echi_records still empty athouhgt echi_log recieve data.
This is strange, becouse thre is NO PROBLEM when i run manually insert
into echi_records sql (from database.log) file.

So Please help me, i use 0.4.1 version


On Jan 9, 7:24 am, JasonGoecke <jsgoe...@gmail.com> wrote:
> Okay, I have taken a slightly different tack, although what I had
> worked on OSX not sure on Windows. So, I have created a new gem:
>
> http://dl.getdropbox.com/u/25511/Ruby/echi-converter-0.4.1.gem
>
> This gem now allows you to put the Decimal values of the control/
> special characters in the configuration instead of the actual
> character itself, as follows:
>
> http://gist.github.com/44955(where 0 is a null)

JasonGoecke

unread,
Feb 2, 2009, 9:21:33 AM2/2/09
to ECHI Converter
The encoding you should use depends on what data you are trying to
process. ActiveRecord supports UTF8 and that may be set in the
database.yml configuration file.

Also, you do not provide the information needed to be able to evaluate
the problem below. You would need to post your database and
application logs, my recommenation is dropping them in a Gist here
(http://gist.github.com) and posting them to a new thread, as this one
is getting a bit long and this is not related.

On Feb 2, 12:18 am, zakkiarsad <zakkiar...@gmail.com> wrote:
> Dear Jason,
> could u explain wich encoding that i should use? or i shouldn't
> my problem is echi_records still empty athouhgt echi_log recieve data.
> This is strange, becouse thre is NO PROBLEM when i run manually insert
> into echi_records sql (from database.log) file.
>
> So Please help me, i use 0.4.1 version
>
> On Jan 9, 7:24 am, JasonGoecke <jsgoe...@gmail.com> wrote:
>
> > Okay, I have taken a slightly different tack, although what I had
> > worked on OSX not sure on Windows. So, I have created a new gem:
>
> >http://dl.getdropbox.com/u/25511/Ruby/echi-converter-0.4.1.gem
>
> > This gem now allows you to put the Decimal values of the control/
> > special characters in the configuration instead of the actual
> > character itself, as follows:
>
> >http://gist.github.com/44955(where0 is a null)
Reply all
Reply to author
Forward
0 new messages