[lazarus] Using SQL Object

Tony Maro tony at maro.net
Tue Apr 29 14:29:46 EDT 2003


Is it possible the mysql-devel package doesn't match the version of 
mysql you are running?

SteveG wrote:

> Code remains the same as below, the difference is that it now fails on 
> the close cmd instead of the open
>
> I have installed Mysql server version 3.23.52
>
> The part that could be causing the problem is libmysqlclient.so (where 
> should I have got this from ?) Found my current copy searching on the 
> Net, so may not be correct for this setup (how to tell ?)
>
>
>
> hernan.et at pg.com wrote:
>
>> Kindly elaborate what is the problem, I think it is also wise if you 
>> can send us
>> the code.
>>
>> 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/27/2003 01:42 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/27/2003 09:42 
>> PM                                                            Please 
>> respond to                                                         
>> lazarus at miraclec.com                                                      
>>                                                                             
>>
>>
>>
>>
>> That seems to have cleared the problem with opening a database - Thanks
>>
>> Now code fails at the Close command - as long as I dont use the close
>> (ie just quit the program once done) all works ok (not good, but at
>> least it works)
>>
>>
>> hernan.et at pg.com wrote:
>>
>>> 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
>>>
>>>
>>> _________________________________________________________________
>>>     To unsubscribe: mail lazarus-request at miraclec.com with
>>>                "unsubscribe" as the Subject
>>>   archives at http://www.lazarus.freepascal.org/mailarchives
>>>
>>
>>
>>
>>
>> _________________________________________________________________
>>      To unsubscribe: mail lazarus-request at miraclec.com with
>>                 "unsubscribe" as the Subject
>>    archives at http://www.lazarus.freepascal.org/mailarchives
>>
>>
>> _________________________________________________________________
>>      To unsubscribe: mail lazarus-request at miraclec.com with
>>                 "unsubscribe" as the Subject
>>    archives at http://www.lazarus.freepascal.org/mailarchives
>>
>
>
>
> _________________________________________________________________
>     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