Insert-Problem with MS ACCESS

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
nayamda
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 21.08.2006, 08:45

Insert-Problem with MS ACCESS

Post 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!
kmr
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 12.06.2006, 22:18
Location: Northern Germany (really northern)

Post 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.
nayamda
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 21.08.2006, 08:45

Post 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.
nayamda
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 21.08.2006, 08:45

Post 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.
nayamda
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 21.08.2006, 08:45

Post 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)
theprawn
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 11.04.2008, 23:29

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Post Reply