Qt-interest Archive, May 2007
How to connect to sql via odbc?
Message 1 in thread
Hi,
since QT3 I've been wondering, why I have to set a host, user and pw in the
odbc connection dialog of windows, and in QSqlDatabase, too. When they
differ, I cannot connect.
I did not try this yet with Qt4, my question is: do I get access to already
stored connection options? Or do I somethng wrong at all, maybe I can set
ODBC options somewhere else (per QSqlDriver, not per win32.dll commands)?
--
[ signature omitted ]
Message 2 in thread
Hi,
> Hi,
> since QT3 I've been wondering, why I have to set a host, user and pw in the
> odbc connection dialog of windows, and in QSqlDatabase, too. When they
> differ, I cannot connect.
isn't that how passwords are meant to be used?
But of course you could set empty passwords; and (at least in Qt3) you
don't have to set a host for ODBC connections.
> I did not try this yet with Qt4, my question is: do I get access to already
> stored connection options? Or do I somethng wrong at all, maybe I can set
> ODBC options somewhere else (per QSqlDriver, not per win32.dll commands)?
for win32 the odbcconf turned out to be bad documented but ok...
--
[ signature omitted ]
Message 3 in thread
> > since QT3 I've been wondering, why I have to set a host, user and pw in
> > the odbc connection dialog of windows, and in QSqlDatabase, too. When
> > they differ, I cannot connect.
>
> isn't that how passwords are meant to be used?
Yes, ok, enter it 2 times.. but this means 3 times. One in apps config, one in
odbc config, one in the database itself?
> But of course you could set empty passwords; and (at least in Qt3) you
> don't have to set a host for ODBC connections.
With MySql you may have to set a host...
--
[ signature omitted ]