Home Notices Documents Classes Download Others Rice
Classes  >  command  >  NonQuery()
command class : NonQuery() method

Description

Executes the SQL statement.

Syntax

commandInstance.NonQuery()

Arguments

None.

Return value

ClassDescription
intThe number of rows affected.

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:

int aff = cmm.NonQuery(); // Command execution. Create a table. The return value is 0.

5:

cmm.Release();

6:

cnn.Close();

7:

cnn.Release();

Notes

None.

Links for reference

None.

Copyright © Rice All rights reserved.