Question : ring get a list of tables inside the database using the odbc_tables()
Answered by : azzeddine-remmal
odbc_tables(ODBC Handle)
Source : https://ring-lang.github.io/doc1.17/odbc.html | Last Update : Thu, 26 May 22
Question : ring get a list of tables inside the database using the odbc_tables()
Answered by : azzeddine-remmal
See "ODBC test - Get Database Tables" + nl
pODBC = odbc_init()
See "Connect to database" + nl
odbc_connect(pODBC,"DBQ=test.mdb;Driver={Microsoft Access Driver (*.mdb)}") + nl
See "Select data" + nl
odbc_tables(pODBC) + nl
nMax = odbc_colcount(pODBC)
See "Columns Count : " + nMax + nl
while odbc_fetch(pODBC) for x = 1 to nMax see odbc_getdata(pODBC,x) if x != nMax see " - " ok next See nl
end
See "Close database..."
odbc_disconnect(pODBC)
odbc_close(pODBC)
Source : https://ring-lang.github.io/doc1.17/odbc.html | Last Update : Thu, 26 May 22