Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / July 2008

Tip: Looking for answers? Try searching our database.

DeriveParameters method fails if UDR parameter defined using LIKE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rich - 25 Jul 2008 15:37 GMT
Ref: http://www-1.ibm.com/support/docview.wss?rs=681&context=SSVT2J&dc=DB550&uid=swg1
IC50772&loc=en_US&cs=UTF-8&lang=en&rss=ct681db2


Apparently upgrading to at last CSDK 3.00 should have fixed the
problems with DeriveParameters but alas I fear not.

I'm using CSDK 3.50.TC1 and I'm still having problems:

1.  DeriveParameters fails with a "Specified cast is not valid"
exception when deriving a parameter from a UDR parameter defined using
LIKE.  Columns defined as int seem fine but columns defined as varchar
fail - I haven't tried other types yet.

2.  A parameter called "RETURN" is always included as the first
parameter in the derived results, this is hard-coded but there's no
explanation as to what it is or why it's there?

3.  A parameter called "Parameter1" is always appended to the list of
parameters, it appears completely spurious!

Although irritating I can work around #2 and #3 but #1 is damn
annoying!

IDS version 9.40.TC2.

Anyone tried using this stuff?

Thanks,

Rich
Rich - 25 Jul 2008 15:51 GMT
> Ref:http://www-1.ibm.com/support/docview.wss?rs=681&context=SSVT2J&dc=DB5...
>
[quoted text clipped - 25 lines]
>
> Rich
Oh and while I'm in a grumbling mood, the coding example given in the
manual wouldn't even compile if you tried it - does anyone check this
stuff?!

---------------
// IfxConnection - con
IfxCommand cmd = new IfxCommand("SP_GETUSERINFO",con);
IfxCommandBuilder cb = new IfxCommandBuilder();
Con.Open();
Cb.DeriveParameters(cmd);
foreach (IfxParameter param in cmd.Parameters)
{
   Console.WriteLine(param.ParameterName);
}
con.Close();
---------------

1.  DeriveParameters is a static method, not an instance method i.e.
you cannot call it from a class instance.

2.  C# is case-sensitive so declaring the variable as "cb" and then
trying to use "Cb" won't work, in fact it wouldn't even compile.
(ditto the con/Con variable)
Rich - 28 Jul 2008 16:04 GMT
> > Ref:http://www-1.ibm.com/support/docview.wss?rs=681&context=SSVT2J&dc=DB5...
>
[quoted text clipped - 51 lines]
>
> - Show quoted text -
...the problems continue:

1.  Why do you ALWAYS get an "Unknown SQL Type - -110" exception if
the final parameter is an INT?

2.  Why is the final parameter not 'derived'?  i.e. it's always
missing from the collection.

3.  Why is lvarchar mapped to IfxType.Clob when there's a perfectly
reasonable IfxType.Lvarchar type?
Rich - 28 Jul 2008 16:43 GMT
> > > Ref:http://www-1.ibm.com/support/docview.wss?rs=681&context=SSVT2J&dc=DB5...
>
[quoted text clipped - 64 lines]
>
> - Show quoted text -
Oh and DateTime doesn't appear to be supported at all - you get the
Uknown SQL Type -110 exception.

(Apologies for the 'flood')
Sheshnarayan Agrawal - 29 Jul 2008 06:25 GMT
>>Oh and while I'm in a grumbling mood, the coding example given in the
>>manual wouldn't even compile if you tried it - does anyone check this
>>stuff?!

Thanks for letting us know. Action has been taken to correct the same.
Also, thanks for sharing some of the issues around DeriveParameters, we
will look into the same at the earliest.

-Shesh

Rich <informix.databases@geos.com>
Sent by: informix-list-bounces@iiug.org
25/07/2008 20:21

To
informix-list@iiug.org
cc

Subject
Re: DeriveParameters method fails if UDR parameter defined using LIKE

> Ref:http://www-1.ibm.com/support/docview.wss?rs=681&context=SSVT2J&dc=DB5...
>
[quoted text clipped - 25 lines]
>
> Rich
Oh and while I'm in a grumbling mood, the coding example given in the
manual wouldn't even compile if you tried it - does anyone check this
stuff?!

---------------
// IfxConnection - con
IfxCommand cmd = new IfxCommand("SP_GETUSERINFO",con);
IfxCommandBuilder cb = new IfxCommandBuilder();
Con.Open();
Cb.DeriveParameters(cmd);
foreach (IfxParameter param in cmd.Parameters)
{
   Console.WriteLine(param.ParameterName);
}
con.Close();
---------------

1.  DeriveParameters is a static method, not an instance method i.e.
you cannot call it from a class instance.

2.  C# is case-sensitive so declaring the variable as "cb" and then
trying to use "Cb" won't work, in fact it wouldn't even compile.
(ditto the con/Con variable)
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.