[Qt-interest] Using DAO via ActiveX to manipulate MS Access database structure?
André Somers
andre at familiesomers.nl
Thu Apr 1 20:54:57 CEST 2010
Hi,
Thanks for trying to help, but that is the way QAxObject works, at least
according to the documentation...
André
-----Oorspronkelijk bericht-----
Van: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Namens Robert Hairgrove
Verzonden: donderdag 1 april 2010 19:06
Aan: qt-interest at trolltech.com
Onderwerp: Re: [Qt-interest] Using DAO via ActiveX to manipulate MS Access
database structure?
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...
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list