Re: DeriveParameters method fails if UDR parameter defined using LIKE
Posted in 2008
>>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 On 25 Jul, 15:37, Rich <informix.databa...@geos.com> wrote: > Ref: http://www-1.ibm.com/support/docview.wss?rs=681&context=SSVT2J&dc=DB5... > > 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 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