lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Sep 1, 2011 at 12:29, joao lobato <> wrote:
Hi, list

I'be been trying to use LuaSQL to connect to a PostgreSQL database,

I'm using Lua for Windows and when I try

 require 'luasql.postgres'

I get the usual require error about it not being able to find the module.

I checked the searched directories and there's no postgres.dll (only
mysql.dll, odbc.dll and sqlite3.dll).

I could use some assistance regarding:
 - am I missing something? (besides the dll... ;) )
 - how do I connect to the db using ODBC if that is the only option?
 - what would I have to do to compile the dll myself in a way that is
compatible with LfW?
 - is there an alternative to LuaSQL that I'm overlooking?

To use ODBC you have to setup an ODBC Data Source to the database.   Under windows 7 this is accomplished from the Start Menu/Control Panel/Administrative Tools/Data Sources

This page gives some details on what you need to do:

And this page hosts the official postgressSQL ODBC Driver:

Hope that helps.