Recent

Author Topic: Where are the MySQL connections  (Read 13735 times)

cgseymour

  • Newbie
  • Posts: 4
Where are the MySQL connections
« on: April 04, 2006, 06:49:05 pm »
Hello all,
Just getting started with FPC and Lazarus.  Tried to connect to my MySQL db but could not.  Saw in some posts about different MySQL connections.  I only have one in the SQLdb tab.  I looked at my Lazaraus/components directory but do not see a MySQL directory.  I have just downloaded the latest Lazarus build.

Where can I get the MySQL41Connection?

Thanks.

Chris
Chris Seymour
SeyWare Solutions

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: Where are the MySQL connections
« Reply #1 on: April 05, 2006, 12:33:12 pm »
If you're Lazarus version is at least 0.9.12, the MySQL41Connection should be available on the SQLdb tab. You will see three MySQLConnections, for 4.0, 4.1 and 5.0
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

cgseymour

  • Newbie
  • Posts: 4
Where are the MySQL connections
« Reply #2 on: April 05, 2006, 05:36:59 pm »
Thanks mathijs,
I was using 0.9.14.1.  I will delete it and try re-downloading it again.  Which version of FPC should I be using?  I will try 2.0.2a.

Thanks.

Chris
Chris Seymour
SeyWare Solutions

cgseymour

  • Newbie
  • Posts: 4
Where are the MySQL connections
« Reply #3 on: April 05, 2006, 05:55:22 pm »
Hello,
Just downloaded Lazarus-0.9.14.1-20060402-win32.exe and ran the install.

I still don't get the 3 MySQL connections.

Any ideas?

Thanks.

Chris



[/img]
Chris Seymour
SeyWare Solutions

matthijs

  • Hero Member
  • *****
  • Posts: 537
Where are the MySQL connections
« Reply #4 on: April 05, 2006, 06:16:57 pm »
Did you install SQLdb components? I do not think they are installed out of the box. The FPC-version from the win-installer should do nicely.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Where are the MySQL connections
« Reply #5 on: April 05, 2006, 06:35:16 pm »
Lazarus 0.9.14 (just like 0.9.12) has sqldb components pre-installed. If you run the installer and startlazarus, sqldb will be the last tab on the component page. Component 5-7 are the MySQLConnection components.

Anonymous

  • Guest
Where are the MySQL connections
« Reply #6 on: April 07, 2006, 06:19:25 pm »
I just installed 0.9.14-1, it's true that the sqldb components are pre-installed.  However, there are only 6 components on the last tab the 6th one being TPQConnection.  There is only 1 MySQLConnection.  Is there something else I have to do to get it to install with the 3 components you mention?  MySQL 5.0 is installed on my machne.  I'm running on Windows XP SP2.  

I got it to "work" with some creative "borrowing" from Martin Schreiber's components and recompiling Lazarus.  But I don't have distinct icons for the the three connections.

In any event, TMySQLQuery appears to be broken in FP 2.0.2 at least for version 5.0 connections.  In particular "select * from mytable" only populates the fielddef property with some of the field types.

I've download the latest snapshot and will try it, but since the Windows version hasn't been updated since Apr 02, I'm not optimistic.

O.K. there are three Connections all with same icon.  With a connection50, transaction, query, datasource, and dbgrid, on a form in the designer, connecting appears to work.  

The table being selected has fields with the following attributes:

fld1 char(4), fld2 char(2), fld3 char(20), fld4 through fld7 decimal(7,3), fld8 char(1), fld9 decimal(2,0)

select fld1, fld2, fld3, fld8 from mytable order by fld1, fld2 works fine

select * from mytable order by fld1, fld2 causes "list index(7) .." errors and eventually kills lazarus.

johnf

  • New Member
  • *
  • Posts: 18
Where are the MySQL connections
« Reply #7 on: April 07, 2006, 11:08:59 pm »
Does your table contain a BLOB data type?   I found on my Postgres setup that the sqlquery did not support BLOB's.  Also be sure that you are including a Primary Key with any select statment that you intend to update.  

Johnf

Handi

  • Newbie
  • Posts: 1
Where are the MySQL connections
« Reply #8 on: April 27, 2006, 09:44:12 am »
I still don't understand why i don't have the 3 mysql connections, i was using lazarus 0.9.10 and fpc 2.0.2 before. Then i uninstall all of them and installed lazarus 0.9.14 with fpc 2.0.2a but still don't have those 3 connections. I'm using WinXPSP2. Just see my screenshot of my installed lazarus at http://www.poptechs.com/l0914sqldb.jpg . I need to connect to mysql 4.1 . Can anyone help me?

matthijs

  • Hero Member
  • *****
  • Posts: 537
Where are the MySQL connections
« Reply #9 on: April 27, 2006, 11:18:39 am »
You should have fpc 2.0.3 or fpc 2.1.1 to be able to support mySQL
Try to install lazarus snapshot from http://www.de.freepascal.org/lazarus/ or mirrors. The snapsho contains fpc 2.1.1.
You could install the snapshot in another directory, so you would still have your current lazarus version available.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Anonymous

  • Guest
Where are the MySQL connections
« Reply #10 on: April 28, 2006, 06:17:12 pm »
I received notification that FPC bug 5011 was fixed in 2.0.3 on or around April 21.  The bug apparently was introduced since MySQL 4.1.  Bug 5035 is not fixed, although Martin Schreiber posted a fix on his newsgroup and incorporated it in his components.  

I just did the following:
1) ininstalled Lazarus,
2) deleted the directory it was installed in,
3) downloaded and installed the latest snapshot

The bug 5011 does in fact appear to be fixed datetime and timestamp fields work.  
I will attempt again to apply Martin's fix for bug 5035 - add 1 line of code to mysql.inc - and recompile lazarus.

The good news is the latest snapshot is 5Meg smaller than the last three I downloaded.

berghem

  • Jr. Member
  • **
  • Posts: 60
Where are the MySQL connections
« Reply #11 on: June 02, 2006, 10:18:49 pm »
Hi, I have the same problem.... I use Ubuntu Dapper 6.10 with Lazarus 0.9.16 and FPC 2.0.2, but I have one component of MySqlConnection and not three and I use MySql 4.1. I can't work with mysql 4.1.
Sorry for my english

matthijs

  • Hero Member
  • *****
  • Posts: 537
Where are the MySQL connections
« Reply #12 on: June 03, 2006, 06:54:52 pm »
Quote from: "berghem"
Hi, I have the same problem.... I use Ubuntu Dapper 6.10 with Lazarus 0.9.16 and FPC 2.0.2, but I have one component of MySqlConnection

You should have fpc 2.0.3 or fpc 2.1.1.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

berghem

  • Jr. Member
  • **
  • Posts: 60
Where are the MySQL connections
« Reply #13 on: June 04, 2006, 11:05:39 am »
Sorry, but where I Can download FPC 2.0.3 or 2.1.1 in RPM or DEB format?
Tks

matthijs

  • Hero Member
  • *****
  • Posts: 537
Where are the MySQL connections
« Reply #14 on: June 04, 2006, 05:49:10 pm »
From one of the snapshot mirrors.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

 

TinyPortal © 2005-2018