ODBC Driver for CloudSign

Build 23.0.8839

パラメータ化されたステートメント

次のコード例は、パラメータをバインドしてパラメータ化されたステートメントを作成する方法を示します。

シングルユース ステートメント

RODBCext のsqlExecute 関数は、クエリパラメータを値にバインドするための追加のデータフレームを受け入れます。

sqlExecute(
    cnx,
    query = "SELECT DocumentId, Title FROM Documents WHERE Status = ?",
    data = data.frame("0")
)

results <- sqlGetResults(cnx, max = 1000)
while (is.data.frame(results)) {
    for (row in 1:nrow(results)) {
        cat(paste("DocumentId = ", results[row,]$DocumentId, "\n"))
        cat(paste("Title = ", results[row,]$Title, "\n"))
    }
    results <- sqlGetResults(cnx, max = 1000)
}

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839