[Qt-interest] Using DAO via ActiveX to manipulate MS Access database structure?
Robert Hairgrove
evorgriahr at hispeed.ch
Thu Apr 1 19:05:48 CEST 2010
Andre Somers wrote:
> Hi,
>
> I am trying to manipulate a MS access database's structure.
> Unfortunately, the ODBC interface has limited capabilities. For
> instance, it does not support the CREATE VIEW statement*. So, I decided
> to try to manipulate my database using ActiveX. I have managed to create
> a new database file, but I have not managed to open an existing one. I
> get a segfault inside qaxbase.cpp (line 2858, to be exact) if I try to
> operate on the QAxObject returned from the call to open the database. My
> code looks like this:
>
[snip]
> //this call also causes a segfault
> QAxObject *query = accDb->querySubObject("CreateQueryDef(QString,
> QString)",
> QString("TestQuery"),
> QString("SELECT * FROM
> Articles"));
It looks like you are sending the string:
"CreateQueryDef(QString, QString) // etc."
to the Access object. It is probably expecting some kind of BSTR COM
object, or perhaps a null (const char) pointer...
More information about the Qt-interest-old
mailing list