##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: September, 2016 # Modified: 2016-10-03/22:48-0400 ##+ # # dbtables.icn, ODBC table list # # tectonics: ~/.odbc.ini setup required for [unicon] # assuming the [unicon] ODBC setup, SQLite3 # link ximage procedure main() # mode 'o' open, ODBC SQL, default table and connection at defaults db := open("unicon", "o", "", "") | stop("no ODBC for \"unicon\"") # Information below was created as part of examples/odbc.icn # sql(db, "create table contacts (id integer primary key, name, phone)") # display ODBC table list write("\nODBC table list:") write(ximage(dbtables(db))) # and a direct field access, (hint: "contacts") write("First table name: ", dbtables(db)[1].name) close(db) end