command class : AddNull(string) method
Description
Sets a null value for the parameter.
Syntax
instance.AddNull(string name)
Arguments
Class | Name | Description |
string | name | Name. |
Return value
None.
Sample code
1: | connection cnn = new connection("Data Source=c:\somedirectory\somedatabase.sqlite3;Version=3;"); |
2: | cnn.Open(); |
3: | command cmm = new command("create table sometable (id int, name text);", cnn); |
4: | cmm.NonQuery(); // Creates the "sometable". |
5: | cmm.CommandText = "insert into sometable values(@id, @name);"; |
6: | cmm.Add("@id", 1); // Sets 1 to the "@id". |
7: | cmm.AddNull("@name"); // Sets null to the "@name". |
8: | cmm.NonQuery(); // Data inserting is done. |
9: | cmm.Release(); |
10: | cnn.Close(); |
11: | cnn.Release(); |
Notes
None.
Links for reference
None.