Page 1 of 1

Insert-Problem with MS ACCESS

Posted: 21.08.2006, 09:34
by nayamda
Hi,

I try to access a MS-ACCESS-DB with Zeos.

My table "Tabelle1" has 3 fields ID, TEXT, BOOL. (I know, TEXT is a reserved word, but with other fieldnames it's the same prob)

ID is an AutoInc-field, TEXT a string- and BOOL an integerfield.

To get the datasets and show them in a grid is no prob. This works fine, but when i try to insert some data i allways get an error:

"Für mindestens einen erforderlichen Parameter wurde kein Wert angegeben."
"For at least one necessary parameter no value was given." (?!?)

With Firebird 1.5 everything works fine, when I call the AutoInc-trigger with TZSequence.
I use Microsoft.Jet.OLEDB.4.0 as provider for the MS-ACCESS-connection.

Is there any known problem with MS-ACCESS?
Do I have to consider something special when using MS-ACCESS?
Or do you know a tutorial for Zeos and MS-ACCESS?

For testing purpose you can download a testprogram:
testprogram


Edit:
With

Code: Select all

TZQuery.SQL.Text := 'INSERT INTO TABELLE1 ([TEXT], BOOL) VALUES (''FooBar'', 1)
it works!

Posted: 21.08.2006, 18:50
by kmr
Hm, hab mir Dein Programm mal runtergeladen und auch ein neues mit 6.1.5 gebaut.
Das scheint irgendwas an Deiner Access-Datenbank zu sein.
Bist Du sicher, daß mit der mdb alles OK ist? Habe kein Access auf dem PC und daher versucht mit MDBPLus an die MDB zu kommen: keine Tabelle zu sehen. Ist das Access 2003? Dann dürfte doch auch OLE 4.0 nicht mehr gehen oder? Aus der Access-Ecke bin ich allerdings schon ein paar raus.
Bau ich das Ding mit SQLite scheints zu laufen.
Hab auch einiges mit der Feldeditorliste ausprobiert (required, readonly etc.) aber es führt mich nicht zum Ergebnis.

Also für mich scheint es an der MDB zu liegen. Forsch doch da mal nach.

Posted: 22.08.2006, 07:24
by nayamda
hi,

danke für deinen Hinweis, werd da mal weiter suchen. Ja, es ist Access 2003.
Die Tabelle sollte es auf jeden Fall geben und wg. SQLite: mit Firebird geht's auch *g*

Allerdings muss ich leider auch Access unterstützen.
Aber ich schau mal.

Posted: 22.08.2006, 07:37
by nayamda
Hm, liegt wohl doch nicht am Jet.OLEDB - Provider:
Access-Version/Jet-Format
-------------- ----------
Access 2.0/Jet 2.0
Access 95/Jet 3.0
Access 97/Jet 3.0
Access 2000/Jet 4.0
Access 2002/Jet 4.0
Access 2003/Jet 4.0
Laut Microsoft zumindest.

Posted: 28.08.2006, 14:15
by nayamda
I've searched the sources for this prob and in ZDbcAdoStatement on Line 471 there is a comment: "Please fix"??

Is it possible that the function TZAdoCallableStatement.GetOutParam causes my prob?


(Sorry, for my english, sounds cruel)

Posted: 12.04.2008, 00:00
by theprawn
Has this issue be fixed or is there a work around?

I can read MS Access tables (Jet 4) with zeos ADO connection.
But I can't update,insert,delete fields/records back to the database.

I was hoping to use MySQL, but their licensing is not free for commerical use :( Seems to be a double standard?

So either Firebird(no Fees) or PostgreSQL (BSD) seem to be the way to go.

But until the IT dept. get their act together, I will be limited to MS Access (Great not) at one site, the other I can install what ever I need.

So Zeos would be great, if I could get it to work with MS Access. Otherwise I have to use dbGo, currently using BDS2006 on XP Pro.

Thanks

Posted: 13.04.2008, 14:55
by mdaems
This problem should be fixed since SVN rev. 352. (Testing Branch, now also in trunk.) See http://zeos.firmos.at/viewtopic.php?t=1769

So you'll need to download a snapshot revision.

Mark