Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-11

Problem about TMysqlDataset

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

mili

Hello,

Can anybody tell me why the following codes can't work?

>>>>>
var
  Data : TMysqldataset;
begin
  Data:=TMysqlDataset.Create(nil);
  With Data do begin
    Host:='localhost';
    Database:='mysql';
    User:='root';
    PassWord := '******';
    SQL.text := 'select * from user';
    Open;//Here an error "Internal error." occurs
    Close;
    Free;
  end;//with Data do
<<<<<<

How to use TMysqldataset correctly?
(The test program $fpc-1.0.7-src/packages/base/mysql/testdb.pp can work well.)

Yours,
mili

Reply by email

Michael Van Canneyt
to mili
mili wrote 22 lines
Hello, Can anybody tell me why the following codes can't work? >>>>>> var Data : TMysqldataset; begin Data:=TMysqlDataset.Create(nil); With Data do begin Host:='localhost'; Database:='mysql'; User:='root'; PassWord := '******'; SQL.text := 'select * from user'; Open;//Here an error "Internal error." occurs Close; Free; end;//with Data do <<<<<< How to use TMysqldataset correctly?

This problem has been identified and will be fixed soon. Basically, an Int64 result is being stored in an integer field. A fix will be put in CVS soon.

Michael.

Reply by email

Sebastian Günther
to Michael Van Canneyt
This problem has been identified and will be fixed soon. Basically, an Int64 result is being stored in an integer field. A fix will be put in CVS soon.

I've committed my patches. Two other issues are resolved as well. But, there are still some strange problems; for example, it doesn't seem to be possible to reuse a single TMySQLDataset object for several queries.

- Sebastian

Reply by email

Unknown author

Hi,

This problem has been identified and will be fixed soon. Basically, an Int64 result is being stored in an integer field. A fix will be put in CVS soon.

similar problem is with float fields, in dataset method MySQLDataSize result of float fields is SizeOf(double), but returning value of TFloatField is extended.

Regards, Pavel

Reply by email