Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
データベースサーバで SQL を実行するために必要な SAConnection オブジェクトを提供します。
Public Shared ReadOnly Property Connection As SAConnection
public SAConnection Connection {get;}
サーバとの接続はすでに確立されています。接続を確立するために SAConnection を使用する必要はありません。次のような文を使用して、接続オブジェクトを取得します。
SAConnection _conn = SAServerSideConnection.Connection;
次の例は、SAConnection オブジェクトを取得し、SQL 文を実行してテーブルを作成します。
private static void GetConnection() { SAConnection _conn; _conn = SAServerSideConnection.Connection; SACommand cmd = _conn.CreateCommand(); cmd.CommandText = "CREATE TABLE Tab( c1 int, c2 char(128), c3 smallint, c4 double, c5 numeric(30,6) )"; cmd.ExecuteNonQuery(); cmd.Dispose();