dbreader クラス : HasRows ゲッタ
説明
コマンド実行の結果が存在するかどうかを示す値を返します。
構文
instance.HasRows
引数
無し。
返り値
| クラス | 説明 |
| bool | コマンド実行の結果が存在するかどうかを示す値 |
サンプルコード
| 1: | connection cnn = new connection("Data Source=c:\somedirectory\somedatabase.sqlite3;Version=3;"); |
| 2: | cnn.Open(); |
| 3: | command cmm = new command("select * from sometable where id < 100;", cnn); |
| 4: | dbreader dbr = comm.Reader(); // Command execution. Returns multi-line results. |
| 5: | bool has = dbr.HasRows; |
| 6: | dbr.Release(); |
| 7: | cmm.Release(); |
| 8: | cnn.Close(); |
| 9: | cnn.Release(); |
注意
コマンド実行の結果が存在する場合は true を返します。そうでない場合は、false を返します。
参照リンク
無し。


