# NOT RUN {
require(SQRL)
# Show (automatic) data sources.
sqrlSources()
# }
# NOT RUN {
# If ratatoskr were one of those sources
# (i.e., if a DSN of that name was found),
# then a query could be submitted like so:
ratatoskr("select messages from vedfolnir ",
"where addressee = 'nidhogg' ",
"limit ", 5)
# }
# NOT RUN {
# Define a new data source.
sqrlSource("mysource",
driver = "MYSQL ODBC 5.3 ANSI Driver",
server = "localhost",
user = "<uid>",
password = "<pwd>")
# }
# NOT RUN {
# Obtain help on usage.
mysource("help")
# Submit a query to the new source.
mysource("select * from database.table")
# Submit a parameterised query from file.
mysource("transactions.sqrl", customerid = 111111)
# }
Run the code above in your browser using DataLab