Is there someone who can give me with a small example which connect to mysql using wxDBA and map some fields.
Many regards
Nico Heiligers
Connecting tio Mysql with wxDBA
-
- In need of some credit
- Posts: 5
- Joined: Thu Aug 17, 2006 3:39 am
- Location: Shelton,CT USA
- Contact:
Re: Connecting tio Mysql with wxDBA
Hi Nico,
Did you get this working?
Thx
Did you get this working?
Thx
Re: Connecting tio Mysql with wxDBA
Hi,
I've done that using the ODBC pluging:
I'm on Win7 64bits, but I'm expecting it to work the same on Linux with iODBC. I'm due to test that sooner or later, but please tell me should you test it on Linux.
BR,
Max.
I've done that using the ODBC pluging:
Code: Select all
#include <dba/dba.h>
try {
dba::SQLArchive ar;
ar.open("dbaodbc", "DSN=<your_DSN_name");
std::string strval;
int intval;
std::auto_ptr<dba::DbResult> res(
ar.getIStream().sendQuery(dba::SQL("SELECT ID, Type FROM Table").into(intval).into(strval))
);
while(res->fetchRow()) {
itoa(intval, value, 10);
Result += (std::string)value + " " + strval + "\r\n";
};
wxMessageBox(Result, "Results", wxOK, parent);
} catch (const dba::SQLException& pEx) {
wxMessageBox(pEx.what(), "SQL Error:", wxOK, parent);
} catch (const dba::Exception& pEx) {
wxMessageBox(pEx.what(), "Error:", wxOK, parent);
};
BR,
Max.