dbTalk Databases Forums  

Cannot convert error

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Cannot convert error in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
 
Posts: n/a

Default Cannot convert error - 08-10-2009 , 08:58 AM






What does this error mean, and where do I start looking? This app has
been running fine for months, and today when I restarted it for the
first time since early June, it started throwing this error.

Cannot convert parameter 13 to a DBTYPE_I4


--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: Cannot convert error - 08-10-2009 , 09:11 AM






I would work out from the understanding that parameter 13
(in you called procedure or prepared statement) cannot be
converted to an Integer (a 4 byte one).

Other than that one might need a little more context.

One possibe guess could be .... Maybe parameter 13 is a
BIGINT and only now you have exceeding the 4 byte
limitations of the design???



<ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com> wrote

Quote:
What does this error mean, and where do I start looking? This app has
been running fine for months, and today when I restarted it for the
first time since early June, it started throwing this error.

Cannot convert parameter 13 to a DBTYPE_I4


--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Re: Cannot convert error - 08-10-2009 , 09:38 AM



In article <4a802aa0$1 (AT) forums-3-dub (DOT) sybase.com>, "Nick Elson [Sybase
iAnywhere]" <@nick@.@elson@@sybase@.@com@> says...
Quote:
I would work out from the understanding that parameter 13
(in you called procedure or prepared statement) cannot be
converted to an Integer (a 4 byte one).

Other than that one might need a little more context.

One possibe guess could be .... Maybe parameter 13 is a
BIGINT and only now you have exceeding the 4 byte
limitations of the design???
A little more info:

ASA 9.0.2.3804 on Win2k3 server (this was a relatively recent update; it
was something like EBF 3456 until a couple of weeks ago, but the app
worked fine after the db upgrade.

The definition line of the SP in question:

create procedure DBA.stp_WRAInsertEvent(
@storeNbr varchar(10),
@productId varchar(8),
@vrChannel integer,
@tankNbr integer,
@eventType integer,
@eventDescription varchar(50),
@statusCode integer,
@lossRate integer,
@cumulativeLossRate integer,
@eventDate datetime,
@observationDate datetime,
@notes varchar(500),
@EventId integer output)

So field 13 is the output value. This is being called from a Delphi
program with ADO, and that field is being initialized to 0 before
calling. The dephi prog hasn't been changed since February, and the OS
has only had high priority windows updates done.

Here is the part of the delphi app that defines the parameters:

procedure SetAlertSpParams(Sp: TAdoStoredProc);
var
pm: TParameters;
begin
pm := Sp.Parameters;
pm.Clear;
pm.CreateParameter('@storeNbr', ftString, pdInput, 10, '');
pm.CreateParameter('@productId', ftString, pdInput, 8, '');
pm.CreateParameter('@vrChannel', ftInteger, pdInput, 10, 0);
pm.CreateParameter('@tankNbr', ftInteger, pdInput, 10, 0);
pm.CreateParameter('@eventType', ftInteger, pdInput, 10, 0);
pm.CreateParameter('@eventDescription', ftString, pdInput, 50, '');
pm.CreateParameter('@statusCode', ftInteger, pdInput, 10, 0);
pm.CreateParameter('@lossRate', ftInteger, pdInput, 10, 0);
pm.CreateParameter('@cumulativeLossRate', ftInteger, pdInput, 10, 0);
pm.CreateParameter('@eventDate', ftString, pdInput, 19, '');
pm.CreateParameter('@observationDate', ftString, pdInput, 19, '');
pm.CreateParameter('@notes', ftString, pdInput, 500, '');
pm.CreateParameter('@EventId', ftInteger, pdOutput, 10, 0);
end;


Quote:


ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com> wrote in message
news:MPG.24e9f194f72453ff989752 (AT) forums (DOT) sybase.com...
What does this error mean, and where do I start looking? This app has
been running fine for months, and today when I restarted it for the
first time since early June, it started throwing this error.

Cannot convert parameter 13 to a DBTYPE_I4


--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).




--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Reply With Quote
  #4  
Old   
 
Posts: n/a

Default Re: Cannot convert error - 08-10-2009 , 11:13 AM



In article <MPG.24e9fadcdfff7cb989753 (AT) forums (DOT) sybase.com>,
ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com says...
Quote:
In article <4a802aa0$1 (AT) forums-3-dub (DOT) sybase.com>, "Nick Elson [Sybase
iAnywhere]" <@nick@.@elson@@sybase@.@com@> says...
I would work out from the understanding that parameter 13
(in you called procedure or prepared statement) cannot be
converted to an Integer (a 4 byte one).

Other than that one might need a little more context.

One possibe guess could be .... Maybe parameter 13 is a
BIGINT and only now you have exceeding the 4 byte
limitations of the design???
It's pretty clear to me that this has something to do with ADO, becasue
another app that does similar (though not identical) communication with
this same db, isn't having any trouble. The major difference is that
the other app uses dao rather than ado.

Dave


Quote:
A little more info:

ASA 9.0.2.3804 on Win2k3 server (this was a relatively recent update; it
was something like EBF 3456 until a couple of weeks ago, but the app
worked fine after the db upgrade.

The definition line of the SP in question:

create procedure DBA.stp_WRAInsertEvent(
@storeNbr varchar(10),
@productId varchar(8),
@vrChannel integer,
@tankNbr integer,
@eventType integer,
@eventDescription varchar(50),
@statusCode integer,
@lossRate integer,
@cumulativeLossRate integer,
@eventDate datetime,
@observationDate datetime,
@notes varchar(500),
@EventId integer output)

So field 13 is the output value. This is being called from a Delphi
program with ADO, and that field is being initialized to 0 before
calling. The dephi prog hasn't been changed since February, and the OS
has only had high priority windows updates done.

Here is the part of the delphi app that defines the parameters:

procedure SetAlertSpParams(Sp: TAdoStoredProc);
var
pm: TParameters;
begin
pm := Sp.Parameters;
pm.Clear;
pm.CreateParameter('@storeNbr', ftString, pdInput, 10, '');
pm.CreateParameter('@productId', ftString, pdInput, 8, '');
--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Reply With Quote
  #5  
Old   
 
Posts: n/a

Default Re: Cannot convert error - fixed - 08-10-2009 , 11:44 AM



It appears that dboledb9.dll and/or dboledba9.dll had become
unregistered. Reregistering them with regsvr32 brought things back to
normal.

D


In article <MPG.24ea115530768856989754 (AT) forums (DOT) sybase.com>,
ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com says...
Quote:
In article <MPG.24e9fadcdfff7cb989753 (AT) forums (DOT) sybase.com>,
ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com says...
In article <4a802aa0$1 (AT) forums-3-dub (DOT) sybase.com>, "Nick Elson [Sybase
iAnywhere]" <@nick@.@elson@@sybase@.@com@> says...
I would work out from the understanding that parameter 13
(in you called procedure or prepared statement) cannot be
converted to an Integer (a 4 byte one).

Other than that one might need a little more context.

One possibe guess could be .... Maybe parameter 13 is a
BIGINT and only now you have exceeding the 4 byte
limitations of the design???

It's pretty clear to me that this has something to do with ADO, becasue
another app that does similar (though not identical) communication with
this same db, isn't having any trouble. The major difference is that
the other app uses dao rather than ado.

Dave



A little more info:

ASA 9.0.2.3804 on Win2k3 server (this was a relatively recent update; it
was something like EBF 3456 until a couple of weeks ago, but the app
worked fine after the db upgrade.

The definition line of the SP in question:

create procedure DBA.stp_WRAInsertEvent(
@storeNbr varchar(10),
@productId varchar(8),
@vrChannel integer,
@tankNbr integer,
@eventType integer,
@eventDescription varchar(50),
@statusCode integer,
@lossRate integer,
@cumulativeLossRate integer,
@eventDate datetime,
@observationDate datetime,
@notes varchar(500),
@EventId integer output)

So field 13 is the output value. This is being called from a Delphi
program with ADO, and that field is being initialized to 0 before
calling. The dephi prog hasn't been changed since February, and the OS
has only had high priority windows updates done.
--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Reply With Quote
  #6  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: Cannot convert error - fixed - 08-10-2009 , 12:18 PM



Interesting resolution. Not certain how it work &
failed before that change but glad to hear you are
'out of the woods' now.


<ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com> wrote

Quote:
It appears that dboledb9.dll and/or dboledba9.dll had become
unregistered. Reregistering them with regsvr32 brought things back to
normal.

D


In article <MPG.24ea115530768856989754 (AT) forums (DOT) sybase.com>,
ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com says...
In article <MPG.24e9fadcdfff7cb989753 (AT) forums (DOT) sybase.com>,
ns_dkerber (AT) ns_WarrenRogersAssociates (DOT) com says...
In article <4a802aa0$1 (AT) forums-3-dub (DOT) sybase.com>, "Nick Elson [Sybase
iAnywhere]" <@nick@.@elson@@sybase@.@com@> says...
I would work out from the understanding that parameter 13
(in you called procedure or prepared statement) cannot be
converted to an Integer (a 4 byte one).

Other than that one might need a little more context.

One possibe guess could be .... Maybe parameter 13 is a
BIGINT and only now you have exceeding the 4 byte
limitations of the design???

It's pretty clear to me that this has something to do with ADO, becasue
another app that does similar (though not identical) communication with
this same db, isn't having any trouble. The major difference is that
the other app uses dao rather than ado.

Dave



A little more info:

ASA 9.0.2.3804 on Win2k3 server (this was a relatively recent update;
it
was something like EBF 3456 until a couple of weeks ago, but the app
worked fine after the db upgrade.

The definition line of the SP in question:

create procedure DBA.stp_WRAInsertEvent(
@storeNbr varchar(10),
@productId varchar(8),
@vrChannel integer,
@tankNbr integer,
@eventType integer,
@eventDescription varchar(50),
@statusCode integer,
@lossRate integer,
@cumulativeLossRate integer,
@eventDate datetime,
@observationDate datetime,
@notes varchar(500),
@EventId integer output)

So field 13 is the output value. This is being called from a Delphi
program with ADO, and that field is being initialized to 0 before
calling. The dephi prog hasn't been changed since February, and the OS
has only had high priority windows updates done.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Reply With Quote
  #7  
Old   
 
Posts: n/a

Default Re: Cannot convert error - fixed - 08-10-2009 , 12:32 PM



In article <4a805675$3 (AT) forums-3-dub (DOT) sybase.com>, "Nick Elson [Sybase
iAnywhere]" <@nick@.@elson@@sybase@.@com@> says...
Quote:
Interesting resolution. Not certain how it work &
Me neither; maybe a corrupted registry entry.


Quote:
failed before that change but glad to hear you are
'out of the woods' now.
Yeah, me too. I hate it when these things pop up out of the blue,
especially on a system that has been extremely reliable up to now. This
system hadn't been touched since June 2, and had processed well over
300,000,000 transactions in that time (averaging approx 50 per second
around the clock).

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.