Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

ring execute query then print the query result.

See "ODBC test 4" + nl
pODBC = odbc_init()
See "Connect to database" + nl
see odbc_connect(pODBC,"DBQ=test.mdb;Driver={Microsoft Access Driver (*.mdb)}") + nl
See "Select data" + nl
see odbc_execute(pODBC,"select * from person") + nl
nMax = odbc_colcount(pODBC)
See "Columns Count : " + nMax + nl
while odbc_fetch(pODBC)
        See "Row data:" + nl
        for x = 1 to nMax
                see odbc_getdata(pODBC,x) + " - "
        next
end
See "Close database..." + nl
odbc_disconnect(pODBC)
odbc_close(pODBC)
Source by ring-lang.github.io #
 
PREVIOUS NEXT
Tagged: #ring #execute #query #print #query
ADD COMMENT
Topic
Name
1+5 =