Michael Van Canneyt wrote:
On Fri, 14 Apr 2006, Jon Foster wrote:

  
Are the SQL DB components supposed to be functional? 
That is because for each query, a new 'native' connection is started.
Probably there is some limitation to your MySQL installation ?
  
no, it works fine for everything else. At the time i tried this the only connection to the db was this one I was trying to create.
I worked with the TMySQLConnection last week, and all went well.
  
That's good it must be something I'm doing here.
I've updated my Lazarus install via SVN today. The problems persist.
    

Did you also upgrade the FPC ? Because that's where the SQLDB component
sources are. There have been some bugfixes in MySQL lately.
  
I've upgraded to FPC 2.0.2 which is the latest stable. Should I be using something else?
I
really would like to ditch Kylix/Delphi but I need functional DB access
to either MySQL or PostgreSQL. I would prefer MySQL. Are there other
components that would allow me to create data driven applications?
    

ZeosLib.
The version in SVN (the link was posted here not so long time ago)
should have good support for PostGres and MySQL.
  
I don't suppose you have that link?
However, using MySQL with pascal applications is not recommended.
At the first MySQL upgrade, you may find that none of your apps
do not work any more because the API has changed; And there will
be nothing you can do about it except wait till someone fixed
the pascal interface.
  
Having written a bare bones MySQL interface that I use in non-GUI apps I know all about this. They should be ashamed. ;-) Every time they release a new client library they alter the API in a non-compatible fashion (reordering of structures mostly). Only company I've ever worked with that did this.
It's recommended to use Postgres or Firebird, they have a more stable API.
  
I would be fine with PostgreSQL if the components worked for it. But I can't get them to work either. Errors were mentioned in my previous post.

johnf wrote:
Yes it works.
First I suggest that you look at the FPC examples for how you should program 
the SQLdb.  You will notice that the components require a set order and 
setup.  Since all my programs require a login screen I set the required 
fields in the "OnCreate" method of the form.

 with pqconnection1 do
      begin
      UserName:=dbuser;
      password:=dbpassword;
      hostname:=dbserver;
      databasename:=dbname;
      connected:=True;
      end; 

Then you have to set the other controls as required.  I have a some what long 
blog "adventures of a newbie" on the wiki that might be of more help.  Also 
there is a MySQL tutorial.  

John
I followed the on-line examples... At least as far as setting up the basic components. I've entered all of the login information in the connection properties. With PostgreSQL it blows when I try to go up records in a grid instead of going down. Probably has more to do with I was going up from a newly inserted record.

In MySQL i never get to a run stage it dies in the IDE when I try to activate the query component.

I've just installed the Firebird 2.0rc1 and tried the same simple form that I've tried to get MySQL & PostgreSQL working in. I get the same results that I had with PostgreSQL. When the application runs it connects shows me data in a data grid I can start to add new records. When I arrow up from a newly inserted record the program blows with an "access violation". Although I'm thinking that I might like to stick with Firebird.

THX - Jon
-- 
Jon Foster
JF Possibilities, Inc.
[EMAIL PROTECTED]
541-410-2760
Making computers work for you!
_________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to