[lazarus] Using SQL Object

SteveG steveg at nevets.com.au
Wed Apr 16 15:33:19 EDT 2003


Yoyong - do you mean that the sql code wont work if the database has no 
password ?

If my test code is way off track, could you point me to something that 
works using the sql object within lazarus ?

hernan.et at pg.com wrote:
> Make sure that you cannot login into mysql without password. This is very
> important.
> 
> Regards,
> 
> Yoyong
> 
> 
> 
> Could someone pls tell me whats wrong with the following code ?
> I found it on a post on the fpc site (somebody else having this error
> about 2 yrs ago) and decided to use as my 'learner' - still has errors
> 
> I am using latest cvs of lazarus and rpm's of fpc from laz downloads
> The test database exists and data is in FPdev - works ok from shell
> 
> procedure tform1.button1click(sender: tobject);
> var
>    Data : TMysqldataset;
> begin
>    Data:=TMysqlDataset.Create(nil);
>    With Data do begin
>      Host:='localhost';
>      Database:='test';
>      User:='root';
>      PassWord := '******';
>      SQL.text := 'select * from FPdev';
>      Open;//Here an error "Internal error." occurs
>      Close;
>      Free;
>    end;//with Data do
> end;
> 
> suggestions much appreciated
> 






More information about the Lazarus mailing list