Re: Parameter value



On Wed, 06 Feb 2008 23:59:17 -0000, Alan T <alanNOSPAMpltse@xxxxxxxxxxxx> wrote:

What would happen if I don't supply value to some of the parameters of a
query?
......
SQL.Add('INSERT INTO employee (ID, Member, Phone ) ' +
'VALUES :ID, :Member, :Phone');

The field 'Phone' is not a required field (Access2003).
Or how do I assigned the parameter value as null?

Although I don't use ParamByName myself, since TParameter.Value is a variant I would guess that the answer is there in your question!

... how do I assigned the parameter value as null?

Parameters.ParamByName('Phone').Value := null ;

--
Paul Scott
Information Management Systems
Macclesfield, UK.
.



Relevant Pages

  • Tables and form design
    ... suggestion. ... category have a check box for the required field and one for enabled field ... selected have it process the query and update the fields on that form. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: How get records not in another table?
    ... Small correction to your example. ... The Join was in the wrong direction, what you posted would probably show no records (assuming that ID is a required field) ... John Spencer ... WHERE NOT IN but it took forever to run and I had to cancel the query. ...
    (microsoft.public.access.queries)
  • Re: remove bad rows to another table
    ... >My table holding the records is named tblvisits. ... An Append query followed by a Delete query will do this. ... apply whatever criteria define a "bad ... required field, on separate rows of the query grid (so that OR logic ...
    (microsoft.public.access.formscoding)
  • Re: Query Results- Incorrect formatting
    ... DesignView of the Query, select the required Field and open the Properties ... There should be a "Format" row in the Properties window for you to ...
    (microsoft.public.access.queries)