Subject RE: [firebird-support] Parameter order to SP
Author Tim Gahnström
-----Original Message-----
>From: Stefan Gustavsson [mailto:stefan.gustavsson@...]

>FbCommand("SELECT * FROM SP_GET_MOVIES_ALL(@ICOUNT,@ISTART)", con)
>fc.CommandType = CommandType.Text
>fc.Parameters.Add("@ICOUNT", FbDbType.BigInt).Value = 10
>fc.Parameters.Add("@ISTART", FbDbType.BigInt)).Value = 2
>Dim fdr As FbDataReader = fc.ExecuteReader()

Named parameters with @ certainly solved most of the problem. It is not exactly what I asked for but instead it is probably better. Thanks a lot!

Regarding the use of

fc.Parameters.Add("@ICOUNT", FbDbType.BigInt).Value = 10

compared to

fc.Parameters.Add("@ICOUNT", 10)

I hope that it is not mandatory because in this case I don't know the type, I am writing a generic VB function for calling SP in the database and I am just passing in a unknown (but correct) object.

Regarding, the Reflection Api, I am not familiar with that so I will leave that for now, I am sure I have bigger problems than a little extra typing at the moment

Thanks

Tim