Page 1 of 1
unknown MySQL Datatype
Posted: 08.03.2008, 10:27
by skepsis
Hi everybody,
i use delphi 2007 and zeoslib 6.6.2, all of then installed on Vista os. I use ZConnection and I connect to a mysql db on my web server. The connection goes fine but when I place a ZTable and trying to make it active I receive a "Unknown mysql data type" error. I've use all the protocols but the same error all the time.
I would very appreciate if you advice me to look at something....
Posted: 10.03.2008, 00:37
by mdaems
What version of the mysql client and server are you using? Try
Code: Select all
showmessage(ZConnection1.ClientVersionStr + '-'+ZConnection1.ServerVersionStr);
after you opened the connection.
Mark
Posted: 23.08.2008, 11:24
by QPRocky
I have same problem.
When I try
Code: Select all
showmessage(ZConnection1.ClientVersionStr + '-'+ZConnection1.ServerVersionStr);
I get access violation error.
But I have MySQL 5.0 and zeos 6.3.3.
This is what I have added to ZQuery.SQL.text:
SELECT * FROM kissa;
and here's table which I added on MySQL
What could be wrong?
Posted: 24.08.2008, 16:27
by mdaems
QPRocky,
Usually these access violations mean you are using a wrong libmysql.dll. Please try putting the libmysql of your server distribution into the same directory as your exe file. This avoids some other libmysql.dll file in your path is used. Normally libmysql versions above 5.0.20 should work well for mysql-5 protocol in zeos.
Mark
Re: unknown MySQL Datatype
Posted: 19.09.2008, 22:27
by alphawiz
skepsis wrote:Hi everybody,
i use delphi 2007 and zeoslib 6.6.2, all of then installed on Vista os. I use ZConnection and I connect to a mysql db on my web server. The connection goes fine but when I place a ZTable and trying to make it active I receive a "Unknown mysql data type" error. I've use all the protocols but the same error all the time.
I would very appreciate if you advice me to look at something....
I'm trying to build a simple application, using Delphi 7 and MySQL 4.1.
Here is what the app consists of.
A ZConnection component to connect to the MySQL database.
1 ZReadOnlyQuery. the query is select str from verifyme;
str field in the database is varchar(30) not null
1 TDataSource (delphi default) so that I can use the components to access the data
1 DBEdit to display the value of str.
But when I try to point anything to the str field, it dies with the error message of Unknown MySQL data type.
How can I use the standard delphi data access tools (or better yet, the Project JEDI tools) to use the data?
An example would be appreciated.
Posted: 20.09.2008, 07:36
by mdaems
Hi Alphawiz,
Is it the error in the ConvertMySQLHandleToSQLType function (ZDbcMysqlUtils.pas) that's showing?
Please put a debug point at the case statement in that function and check what value is returned from PlainDriver.GetFieldType(FieldHandle).
I don't have a mysql 4.1 installation running, so I can't check myself.
Mark
Posted: 30.10.2008, 22:31
by Dr Mac
Hi!
I ran into the same problem.
My 'Music' table is:
- MusicNr int(10)
- MusicTitle varchar(50)
- AlbumNr int(10)
- MusicLength time
- MusicPerformer int(10)
- MusicNote varchar(50)
When I send the query "select * from music" with ZQuery, I get an error "Unknown MySQL Datatype" from the ConvertMySQLTypeToSQLType function.
My system: Debian linux, FreePascal 2.2.2, Lazarus 0.9.26, MySQL 5.0.51
Any idea?
Edit:
I added breakpoint into the ConvertMySQLTypeToSQLType function, before the type selection. The TypeName result was ^char nil
Posted: 31.10.2008, 14:02
by mdaems
Can you file a bug report in the tracker (
http://zeosbugs.firmos.at) and attach your sample project? (Just sources. Don't forget the db creation script.)
Mark
Posted: 31.10.2008, 20:45
by Dr Mac
Report sent.
Posted: 21.10.2009, 15:36
by Dionic
Hi people!
I have same problem.
Please write how that problem decide successfully.
Posted: 30.07.2010, 08:37
by Pitfiend
Hi mates, today I had a similar trouble with unknown MySql data types... after a detailed search, I find the damn cause: I had a dated libmysql.dll inside my delphi bin directory. How this happens, I don't know, but after deleting it, I didn't get any more weird errors again and everything else did what was expected.
So, my recomendation is that you search your paths to find any dated dll and remove it, just keep the fresh ones.
My current environment is:
- Delphi 7
- Zeoslib 6.6.6 stable
- MySql 5.1.38