odbc-query ( dsn string -- result )


Vocabulary
odbc

Inputs
dsna DSN string
stringa string containing SQL


Outputs
resulta sequence


Word description
This word initializes odbc, connects to the database with the given DSN, executes the query string and returns the result as a sequence. It cleans up all resources it uses. It is an inefficient way of running multiple queries but is useful for the occasional query, testing at the REPL, or as an example of how to do it.

Examples
"DSN=snowflake; UID=sheeple; PWD=sekrit" "select 1" odbc-query


See also
odbc-init, odbc-connect, odbc-disconnect, odbc-prepare, odbc-free-statement, odbc-execute, odbc-next-row, odbc-number-of-columns, odbc-describe-column, odbc-get-field, odbc-get-row-fields, odbc-get-all-rows, odbc-query

Definition