Hi Gang, I don't remember anyone posting this before, so I thought I'd
inform you. I am updating my application to use .net 4 with VS 2010.

Using the conversion wizard (opening a 3.5 or 2.0 project in VS2010),
the wizard is doing changes to code using FB provider, which then
leads to stack overflow exceptions.

Here is the problematic structure _BEFORE_ conversion (watch line
wrap!)...

FBCommand1.Parameters.Add(new FbParameter("@PM_IDREP", FbDbType.Char, 4, 
System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "", 
System.Data.DataRowVersion.Current, "\"1002\""));

And here is the same line _AFTER_ conversion (again watch wrap!)...

FBCommand1.Parameters.AddRange(new FbParameter[] {new
FbParameter("@PM_IDREP", FbDbType.Char, 4, 
System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "", 
System.Data.DataRowVersion.Current, "\"1002\"")});

which basically means that the converter is making a collection of
parameters out of each parameter. It does not do so in ALL places of
the project - so far I did not find out what makes these 2 places so
special... well... this is the oldest code snippet I do use which
involves fb provider functionality and I wouldn't do it like this
anyway today... strange enough though, isn't it?

Manually editing the line to the version BEFORE conversion will make
it run fine. But the converted version using AddRange(...) instead of
Add(...) will cause "System.StackOverflowException".

I am still using fb provider 2.0.1.0

please excuse the signature following below...




mit freundlichen Grüßen,

André Knappstein
EDV und Controlling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH
Hafenweg 4
59192 Bergkamen-Rünthe

Telefon: +49 2389 9240 140
Telefax: +49 2389 9240 150
e-mail:  i...@beta-eigenheim.de

Amtsgericht Hamm Nr. B 420
Geschäftsführer: Achim Krähling, Dirk Salewski und Matthias Steinhaus

USt-IDNr.: DE 125215402

---

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to