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 I still
have some problems with basics in C#/ADO.net myself, this one I think
is quite clear.

Check the OLH maybe on "Fill method".
There you will find:
"The Fill method retrieves rows from the data source using the SELECT
statement specified by an associated SelectCommand property."


  
  
-- 
Mit freundlichen Grüssen,

André Knappstein, EDV und Controlling
Verwaltungs- und Erlebniszentrum Marina Rünthe
beta Eigenheim GmbH
Hafenweg 4
59192 Bergkamen-Rünthe

Durchwahl: +49 2389 9240 140

~~~Ihre Nachricht~~~

PD> Thank you André!!!!

PD> Works perfectly!

PD> I don't really understand your explanation.

PD> I suppose I really don't understand why it is possible to retrieve data from
PD> the database when the query has no parameters without the addition of your
PD> below suggestion.

PD> And why I need the extra line when the query uses parameters.

PD> If possible could you give me some more information to improve my
PD> understanding of this?

PD> Thanks for your time,

PD> Peter.

PD> -----Original Message-----
PD> From: [EMAIL PROTECTED]
PD> [mailto:[EMAIL PROTECTED] On Behalf Of
PD> André Knappstein, Controlling
PD> Sent: Thursday, 19 April 2007 6:15 PM
PD> To: firebird-net-provider@lists.sourceforge.net
PD> Subject: Re: [Firebird-net-provider] Parameterized Query

PD> Peter,

PD> not an expert myself, but in your code I am missing a statement like:

PD> daDuePacks.SelectCommand = FbCmdDuePacks;

PD> so far you are setting the parameter to the command-object, and to the
PD> adapter-object you are just "copying" the select command text.

PD> Don't know if that is the culprit in your case, but does it get
PD> better, if you add the above command line??

PD> ciao,
PD> André

>> Hi,
>> 
>> I am trying to use a parameter in one of my queries but consistently get
PD> the
>> following error:

>>         'Prepare adapter to retrieve information from db.
>>         Dim daDuePacks As New FbDataAdapter(sDuePackSelect, conn)

>>         'Add table to the Module based dataset.
>>         daDuePacks.Fill(m_dsDocoInfo, "DuePacks")

>> Can someone please tell me what I'm doing wrong?






PD> -------------------------------------------------------------------------
PD> This SF.net email is sponsored by DB2 Express
PD> Download DB2 Express C - the FREE version of DB2 express and take
PD> control of your XML. No limits. Just data. Click to get it now.
PD> http://sourceforge.net/powerbar/db2/
PD> _______________________________________________
PD> Firebird-net-provider mailing list
PD> Firebird-net-provider@lists.sourceforge.net
PD> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to