[lazarus] Using SQL Object

hernan.et at pg.com hernan.et at pg.com
Mon Apr 21 20:57:02 EDT 2003


I run into the same problem before, it was access violation error. And my
solution was to remove all users of the mysql database without password.
Such that when you log into mysql console like mysql -u root -h myhost.test.com
-p you will need to enter password. And also check that merely entering mysql at
the console will not allow you to log in.

If this still fails for you, please let me know.

Regards,

Yoyong


                                                                
 Internet Mail Message                                          
 Received from host:                                            
 svcr-216-37-230-2.dsl.svcr.epix.net                            
 [216.37.230.2]                                                 
                                                                


From: SteveG <steveg at nevets.com.au> on 04/16/2003 07:55 PM GMT
                                                                             
                 SteveG           To:   lazarus at miraclec.com                 
 <steveg at nevets.com.au>           Cc:    (bcc: Yoyong Hernan-ET/PGI)         
                          Subject:      Re: [lazarus] Using SQL Object       
                                                                             
    04/17/2003 03:55 AM                                                      
      Please respond to                                                      
   lazarus at miraclec.com                                                      
                                                                             





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
>

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives







More information about the Lazarus mailing list