Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi dbExpress und MySql (https://www.delphipraxis.net/146633-dbexpress-und-mysql.html)

Sektalas 24. Jan 2010 03:13

Datenbank: MySql • Version: 4.1.22 • Zugriff über: dbExpress

dbExpress und MySql
 
Hallo,

ich hab gegoogelt wie ein wilder, aber leider nichts passendes zu meinem problem gefunden.

Folgendes Szenario:
Ich Arbeite mit Delphi 2010 und will die dbExpresskomppnente TSQLConnection benutzen.
In dieser stelle ich als "Driver" MySql ein.
Gebe dort die benötigten Daten ein. Die Datenbank liegt nicht local sondern auf einem externen Server.
Setzte ich in der Entwicklungsumgebung Active auf TRUE erscheint ein Popup in dem ich nochmal(?) mein passwort eingeben soll.
Anschließend bekomm ich Folgenden Fehler (mit unterschiedlichen Fehlercodes):
Cannot load LIBMYSQL.dll libary. (error code 6). The LIBMYSQL.dll libary may be missing from the system path or you may have an incompatible version of the libary installed.
http://schichtplan.sc.funpic.de/delphimysqlerror.jpg
Ich habe mir von mysql.com die dort angebotene LIBMYSQL.dll runtergeladen und in den gleichen ordner wie das projekt sowie in den bin ordner von delphi, Windows und system32 ordner kopiert. Jeweils ohne Erfolg.

Jetzt bin ich ratlos. Andere komponenten wie z.B. ZEOS bekomme ich mit delphi2010 nicht zum laufen. (auch nicht die 7.0.0 alpha)

mkinzler 24. Jan 2010 11:27

Re: dbExpress und MySql
 
Wo liegt die Client-Dll? Die IDE scheint diese nicht zu finden

thkerkmann 24. Jan 2010 16:15

Re: dbExpress und MySql
 
Hi,

ich habe grad das gleiche heute probiert, und den gleichen Fehler erhalten.

Wenn man die dll aber in das Embarcaderos Bin Verzeichnis legt, geht es. Allerdings bin ich bei meiner Datenbank Anbindung kein Stück weiter gekommen. Will ich das DBGrid mit der Datasource verbinden erhalte ich die Fehlermeldung, dass diese Operation mit einer uni-directional Datensicht nicht möglich ist. Wenn ich nur die Tabelle auf active setze scheint es zu gehen.
Also es mangelt an der Anbindung an's DBGrid.

Jemand noch ne Idee ?

Gruss

mkinzler 24. Jan 2010 16:18

Re: dbExpress und MySql
 
Auf was weist die DataSource?

thkerkmann 24. Jan 2010 16:36

Re: dbExpress und MySql
 
Ich habs mit ner TSQLQuery und auch mit ner TSQLTable versucht

Also

TDBGrid.Datasource -> TDatasource -> TSQLTable -> TSQLConnection

TSQLConnection: MySQL mit einer joomla Datenbank
TSQLTable.Tablename: jos_content // kann man auch in den active Mode bringen

TDatasource anbinden geht auch noch, aber dann das Grid dranhängen nicht mehr.

beidesmal das selbe Resultat: Diese Operation ist bei einer unidirektionalen Datenmenge nicht gestattet.

mkinzler 24. Jan 2010 17:03

Re: dbExpress und MySql
 
Setzt es mal auf ReadOnly

thkerkmann 24. Jan 2010 17:10

Re: dbExpress und MySql
 
Mit es meinst Du das DBGrid ?

hab ich auch schon versucht und bei den Options [dgEditing] auf false gesetzt.

macht keinen Unterschied.....

Angel4585 9. Feb 2010 08:58

Re: dbExpress und MySql
 
Hallo, ich bekomme die gleiche Meldung:

---------------------------
Sql
---------------------------
Cannot load LIBMYSQL.dll library (error code 0). The LIBMYSQL.dll library may be missing from the system path or you may have an incompatible version of the library installed.
---------------------------
OK
---------------------------

naja der error-code ist anders, aber die Meldung im Prinzip die gleiche.
Arbeite mit Delphi 2010 Prof. MySQL 5.0 und wollte jetzt testen ob ich über dbexpress auf MySQL zugreifen kann. ich hab ein einfaches Formular gemacht und einfach ne TSQLConnection drauf, nur um mal die Verbindung herzustellen, und genau da scheitert es.

Also libmysql.dll hab ich die ausm dem MySQL-Server bin-Verzeichnis genommen.
Wär schön wenns irgendwie klappen würde, weil ich von zeos weg will.

Die Ausgabe von D2010:
Code:
[51BCC99D]{DbxCommonDriver140.bpl} Dbxcommon.TDBXContext.Error + $51
[51BED0EF]{DbxCommonDriver140.bpl} Dbxdynalink.TDBXDynalinkDriverCommonLoader.LoadDriverLibraryAndMethodTable + $FF
[51BECD61]{DbxCommonDriver140.bpl} Dbxdynalink.TDBXDynalinkDriver.LoadDriver + $35
[51BEFB90]{DbxCommonDriver140.bpl} Dbxdynalinknative.TDBXDynalinkDriverNative.CreateConnection + $C
[51BCCD0D]{DbxCommonDriver140.bpl} Dbxcommon.TDBXDelegateDriver.CreateConnection + $5
[51BD2107]{DbxCommonDriver140.bpl} Dbxcommon.TDBXConnectionBuilder.CreateConnection + $A3
[51BC4040]{DbxCommonDriver140.bpl} Dbxcommon.TDBXConnectionFactory.GetConnection + $E8
[51BC3F51]{DbxCommonDriver140.bpl} Dbxcommon.TDBXConnectionFactory.GetConnection + $5
[50F1C69A]{dbexpress140.bpl} SqlExpr.TSQLConnection.DoConnect (Line 2583, "..\..\..\..\..\src\pas\dbx\vcl\SqlExpr.pas" + 53) + $5
[50F1C94C]{dbexpress140.bpl} SqlExpr.TSQLConnection.DoConnect (Line 2643, "..\..\..\..\..\src\pas\dbx\vcl\SqlExpr.pas" + 113) + $84
[5067F09D]{dbrtl140.bpl} DB.TCustomConnection.SetConnected (Line 3158, "DB.pas" + 8) + $4
[5005164A]{rtl140.bpl } TypInfo.SetOrdProp (Line 1723, "TypInfo.pas" + 27) + $0
[20D95FB6]{designide140.bpl} DesignEditors.TPropertyEditor.SetOrdValue (Line 841, "DesignEditors.pas" + 2) + $E
[20DDB035]{designide140.bpl} VCLEditors.TBooleanProperty.MouseUp (Line 1838, "VCLEditors.pas" + 5) + $10
[20EAFF1D]{vclide140.bpl} PropBox.TCustomPropListBox.ItemMouseUp (Line 1625, "propbox.pas" + 16) + $1B
[20EB0113]{vclide140.bpl} PropBox.TCustomPropListBox.MouseUp (Line 1690, "propbox.pas" + 1) + $D
[5029679C]{vcl140.bpl } Controls.TControl.DoMouseUp (Line 7306, "Controls.pas" + 2) + $28
[50296818]{vcl140.bpl } Controls.TControl.WMLButtonUp (Line 7319, "Controls.pas" + 9) + $6
[20EB5758]{vclide140.bpl} IDEInspListBox.TInspListBox.WMLButtonUp (Line 1615, "IDEInspListBox.pas" + 3) + $4
[50295DFC]{vcl140.bpl } Controls.TControl.WndProc (Line 7062, "Controls.pas" + 91) + $6
[50299F53]{vcl140.bpl } Controls.TWinControl.IsControlMouseMsg (Line 9596, "Controls.pas" + 1) + $9
[5029A6C0]{vcl140.bpl } Controls.TWinControl.WndProc (Line 9819, "Controls.pas" + 144) + $6
[501F073C]{vcl140.bpl } StdCtrls.TCustomListBox.WndProc (Line 6130, "StdCtrls.pas" + 37) + $4
[50299D60]{vcl140.bpl } Controls.TWinControl.MainWndProc (Line 9540, "Controls.pas" + 3) + $6
[50076360]{rtl140.bpl } Classes.StdWndProc (Line 13014, "Classes.pas" + 8) + $0
[502C8749]{vcl140.bpl } Forms.TApplication.ProcessMessage (Line 9784, "Forms.pas" + 30) + $1
[502C878E]{vcl140.bpl } Forms.TApplication.HandleMessage (Line 9814, "Forms.pas" + 1) + $4
[502C8AB9]{vcl140.bpl } Forms.TApplication.Run (Line 9951, "Forms.pas" + 26) + $3
[0043094A]{bds.exe    } bds.bds (Line 200, "" + 8) + $12FFB

Delphi-Phil 12. Mai 2010 15:01

Re: dbExpress und MySql
 
ich habe das gleiche Problem:

Zitat:

Diese Operation ist bei einer unidirektionalen Datenmenge nicht gestattet
Ich hatte erst auch ein Problem mit der "LIBMYSQL.dll" dann habe ich Sie in das Programmverzeichnis meiner Anwendung kopiert und das Problem hatte sich erledigt!

Neumann 12. Mai 2010 21:14

Re: dbExpress und MySql
 
DbExpress liefert eine unidirektionale Datenmenge. Die Daten kann man aber in ein Clientdataset laden und als scroll - und editierbare Datenmenge im DBGrid anzeigen.

Dann braucht man die entsprechenden Komponenten, die miteinander verbunden werden müssen - ist in der Hilfe beschrieben, Stichworte Datasetprovider, Clientdataset.

Gruß

Ralf


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:48 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz