[Firebird-net-provider] Parameterized Query

2007-04-19 Thread Peter Dennis
Hi, I am trying to use a parameter in one of my queries but consistently get the following error: FbException was unhandled Must declare command parameters. With this statement highlighted: daDuePacks.Fill(m_dsDocoInfo, DuePacks) When I load the following form: Private Sub

Re: [Firebird-net-provider] Parameterized Query

2007-04-19 Thread André Knappstein , Controlling
Peter, not an expert myself, but in your code I am missing a statement like: daDuePacks.SelectCommand = FbCmdDuePacks; so far you are setting the parameter to the command-object, and to the adapter-object you are just copying the select command text. Don't know if that is the culprit in your

Re: [Firebird-net-provider] Parameterized Query

2007-04-19 Thread Peter Dennis
Thank you André Works perfectly! I don't really understand your explanation. I suppose I really don't understand why it is possible to retrieve data from the database when the query has no parameters without the addition of your below suggestion. And why I need the extra line when the

[Firebird-net-provider] Events question

2007-04-19 Thread Christian Nylund
I always get six events every time a trigger in my database is fired. Is that always the case or am I doing something wrong? obviously I only want to respond to one of them. Any ideas on how to achieve that? -- View this message in context:

Re: [Firebird-net-provider] Parameterized Query

2007-04-19 Thread André Knappstein , Controlling
Hello Peter, I'm afraid I can't, because I'm an awfully bad teacher. I can try just this: without that association the adapter does not know of your defined parameter. The need to supply the selectcommand-object to the adapter, I think, is basic knowledge for dealing with ADO.net objects. While

Re: [Firebird-net-provider] Events question

2007-04-19 Thread Jiri Cincura
Christian Nylund wrote: I always get six events every time a trigger in my database is fired. Is that always the case or am I doing something wrong? obviously I only want to respond to one of them. Any ideas on how to achieve that? You're probably doing something wrong. -- Jiri {x2} Cincura

Re: [Firebird-net-provider] Events question

2007-04-19 Thread Christian Nylund
It seems it fires once for every trigger I have added with the line revent.AddEvents(new string[] { OnXXX, OnYYY, OnZZZ, On123}); even if only the OnXXX was actually fired. Is it supposed to do that? It's easy to work around it but it still seems a little odd to me. Christian