unknown MySQL Datatype
Moderators: gto, cipto_kh, EgonHugeist
unknown MySQL Datatype
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 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....
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
What version of the mysql client and server are you using? Try
after you opened the connection.
Mark
Code: Select all
showmessage(ZConnection1.ClientVersionStr + '-'+ZConnection1.ServerVersionStr);
Mark
I have same problem.
When I try
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?
When I try
Code: Select all
showmessage(ZConnection1.ClientVersionStr + '-'+ZConnection1.ServerVersionStr);
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?
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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
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
I'm trying to build a simple application, using Delphi 7 and MySQL 4.1.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....
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.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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
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
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
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
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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
Mark
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
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