ODBC Driver for Blackbaud Financial Edge NXT

Build 23.0.8839

Parameterized Statements

The following code example shows how to bind parameters to create parameterized statements.

Single-Use Statements

The sqlExecute function from RODBCext accepts an additional data frame for binding query parameters to values.

sqlExecute(
    cnx,
    query = "SELECT AccountId, AccountNumber FROM Accounts WHERE ModifiedBy = ?",
    data = data.frame("System")
)

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

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