Subject RE: [firebird-support] Firebird stored procedure
Author Lin XG
Hi Alan & Dean

The SP handles the NULL with no problems. Having
VB.NET assign the NULL value was the issue.

Dean's suggestion to use DbNull.Value resolves the
problem.

Thanks for all the help guys.

Lin

--- Alan McDonald <alan@...> wrote:

> > Hi Alan
> >
> > Sorry for the lack of inforamtion. I thought this
> had
> > a trivial answer that I was simply missing. Guess
> not.
> >
> > I'm using VB.NET. Here is what my code looks like.
> >
> > XFER_CONDITION = "A string that can also be NULL"
> >
> > FB_DbCommand = New FbCommand("MY_QUERY",
> > FB_DbConnection)
> > FB_DbCommand.CommandType =
> CommandType.StoredProcedure
> > FB_DbCommand.Parameters.Add("@xfer_condition",
> > XFER_CONDITION)
> >
> > FB_DbCommand.ExecuteNonQuery()
> >
> > It works fine but I am not how to deal with the
> > possibility of my paramater being NULL.
> >
> > Thanks
> > Lin
>
> Now it's unclear as to whether you are referring to
> the SP handling a null
> parameter, or your VB.NET code assigning NULL as the
> value.
> And I'm afraid I can't tell you the syntax for
> vb.net - I don't use it.
> Does XFER_CONDITION = null work? Or nil?
> Alan
>
> >
> > --- Alan McDonald <alan@...> wrote:
> > > > How do pass a NULL when my input parameter is
> > > something
> > > > like... aParm varchar(10)
> > > >
> > >
> > > Umm - in what language?
> > > What interface?
> > > How can anyone answer this?
> > > E.g. in delphi param.clear will do do it.
> > > But who knows what you are doing?
> > > Alan
>
>
>



____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ