The above implementation relies on the garbage collector to close the cursor. Try to find out why by yourself there are a lot of questions about it on SO. While I assume Val is much more qualified that I am, I can’t help thinking he? This example also shows that the driver name not always correspond to the Database name, but to the driver name in the file system. Sign up using Facebook. The numerical indices are the positions of the fields in the SELECT statement; the alphanumerical indices are the names of the fields. In this case it is not possible to load more than one version of the MySQL driver in the luasql table.
|Date Added:||11 February 2014|
|File Size:||9.62 Mb|
|Operating Systems:||Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X|
|Price:||Free* [*Free Regsitration Required]|
Same message all the time. If fetch is called with a table, the results will be copied into the table and the changed table will be returned.
luasql.idbc Besides the basic functionality provided by all drivers, the Postgres driver also offers these extra features:. Improving the question-asking experience. This library can be linked to the application or dynamically loaded. In the PostgreSQL driver, this method adds two optional parameters that indicate the hostname and port to connect.
The implementation is not derived from licensed software. In this case it is not possible to load more than one version of the MySQL driver in the luaqsl.odbc table.
Subscribe to RSS
Any suggestions much appreciated and I’ve googled until my eyes bleed, but all the questions people have appended seem to do with problems accessing any database AFTER they’d installed the relevant LuaSQL driver. It is just a string indicating how the resulting table should be constructed.
This driver is compatible with versions 4. LuaSQL is distributed as a set of C source files: Commits the current transaction. Besides the basic functionality provided by all drivers, the Oracle driver luasql.obdc offers this extra feature:.
These methods are used to create an environment object which is used to create a connection object. Some drivers, luasql.pdbc as the MySQL, have libraries for a number of database versions that use the same file name mysql.
I’m resigning as a moderator from all Stack Exchange sites, effective today. Closes the environment env.
If you are using LuaBinaries http: LuaSQL is a simple interface from Lua to a number of database management systems. While I assume Val is much more qualified that I am, I can’t help thinking he?
The example below require “luasql.
luasql – database interface
luazql.odbc Besides the basic luasql.odbbc provided by all drivers, the Oracle driver also offers this extra feature:. Don’t bet on it!! If fetch is called without parameters, the results will be returned directly to the caller.
The mode string can contain:. Some drivers, such as the MySQL, have libraries for a number of database versions that use the same file name mysql. To use a driver you luasql.idbc to load it in the luasql table. Unicorn Meta Zoo 9: In this case, an optional modestring parameter can be used. If fetch is called with a table, the results will be copied into the table and the changed table will be returned.
Note that you can have more than one driver loaded at the same time doing something like: The optional table parameter is a table that should be used to store the next row.
A cursor object is created by using the connection: LuaSQL defines one single global variable, a table called luasql. An environment object is created by calling the driver’s initialization function that is stored in the luasql table, indexed with the same name as the driver odbc, postgres etc.
There is no guarantee about the types of the results: