Home Notices Documents Classes Download Others Rice
Classes  >  command  >  Connection(connection)
command class : Connection(connection) setter

Description

Sets a connection to the database.

Syntax

commandInstance.Connection = newConnection

Arguments

ClassNameDescription
stringnewConnectionA connection to the database.

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);");

4:

cmm.Connection = cnn;

Notes

None

Links for reference

None

Copyright © Rice All rights reserved.