Parameter value



What would happen if I don't supply value to some of the parameters of a
query?
It seems can execute the query.
eg.
var
strPhone: String;
.......
.......
SQL.Add('INSERT INTO employee (ID, Member, Phone ) ' +
'VALUES :ID, :Member, :Phone');
Parameters.ParamByName('ID').Value := 111;
Parameters.ParamByName('Member').Value := 'Peter Pan';
if strPhone <> '' then
Parameters.ParamByName('Phone').Value := strPhone;
ExecSQL;

The field 'Phone' is not a required field (Access2003).

Or how do I assigned the parameter value as null?


.



Relevant Pages

  • Re: Type Mismatch in dLookup
    ... Dim strAddress1, strAddress2, strCity, strStateID, strState, strZip, ... strPhone As String ... is being Dimmed as a String. ...
    (microsoft.public.access.formscoding)
  • Re: Type Mismatch in dLookup
    ... Dim strAddress1, strAddress2, strCity, strStateID, strState, strZip, ... strPhone As String ... is being Dimmed as a String. ...
    (microsoft.public.access.formscoding)
  • Re: Type Mismatch in dLookup
    ... Dim strAddress1, strAddress2, strCity, strStateID, strState, strZip, ... strPhone As String ...
    (microsoft.public.access.formscoding)
  • Color
    ... I want to put some data of the string in RED color ...
    (microsoft.public.access.formscoding)