Recent

Author Topic: calling selectable stored proc for MySQL  (Read 43471 times)

kenpem

  • New Member
  • *
  • Posts: 22
Re: calling selectable stored proc for MySQL
« Reply #45 on: June 11, 2012, 01:23:27 pm »
I wonder... is there any merit in me trying to shim FPC 2.7.1 under Lazarus instead of the default included 2.6?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: calling selectable stored proc for MySQL
« Reply #46 on: June 11, 2012, 01:29:15 pm »
Yes, that certainly can be done.

Have a look at my fpcup program (see third party announcements), which will allow you to set up a separate copy of FPC 2.7.1 + Lazarus (use fpcup --help; you'll need something like fpcup --fpcurl=http://svn.freepascal.org/svn/fpc/trunk; if you already use c:\development (on Windows) or ~/fpc and ~/lazarus (Linux/OSX), suggest you use --binutilsdir, --fpcbootstrapdir, --lazdir and --fpcdir as well).

Alternatively, follow the instructions on the wiki for installing from svn...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

kenpem

  • New Member
  • *
  • Posts: 22
Re: calling selectable stored proc for MySQL
« Reply #47 on: June 11, 2012, 04:47:26 pm »
I might give that a try... have now spent too many hours trying to get Postgre and Firebird behave themselves  >:( 

I'm expert-level at MS-SQL Server, and not bad with mySQL, so a little frustrated that I can't get these other beasts running nicely. Anyway, I'll see if  I can get FPC 2.7.1 playing nicely with Laz. Last resort, really, otherwise I'll just junk the project and switch to Python, can't afford much more time on getting the tools going, need to put some time into the work!

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: calling selectable stored proc for MySQL
« Reply #48 on: June 11, 2012, 04:59:43 pm »
There's also an MS SQL connector in FPC 2.6.1+=> included in Lazarus snapshots.

Getting Firebird to behave itself... should be doable if you don't expect MS SQL like behaviour, but seeing you're also working with MySQL I would imagine you don't.
Glad to help you with Firebird stuff if I can.

If you have to switch to Python, hope you come back to us ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

kenpem

  • New Member
  • *
  • Posts: 22
Re: calling selectable stored proc for MySQL
« Reply #49 on: June 11, 2012, 05:18:52 pm »
I'll always come back ;)

I cut my teeth on Pascal, and it's always my language of choice. Coupled to a good (but not over-complicated) IDE, it is without question the best, fastest, most comfortable and pleasant way to craft code.

But when I'm in a hurry on a very small but incredibly important project, I have to use whatever works. At this time, FPC/Laz is just getting in my way so I might have to go around it for now, then spend the weekend ironing out the mySQL wrinkles and port the project back.

Fear not!

kenpem

  • New Member
  • *
  • Posts: 22
Re: calling selectable stored proc for MySQL
« Reply #50 on: June 11, 2012, 06:50:28 pm »
OK, with thanks to BigChimp and friends in the Third Party tools thread, I've now got a copy of Lazarus reporting:
Quote
Lazarus 1.1 r37618 FPC 2.7.1 x86_64-win64-win32/win64
Unfortunately, I get the same error:
Quote
Project xxxx raised exception class 'EDatabaseError' with message:
qryGP : Cannot open a non-select statement

kenpem

  • New Member
  • *
  • Posts: 22
Re: calling selectable stored proc for MySQL
« Reply #51 on: June 11, 2012, 06:56:31 pm »
ahhh hang on... that was with ODBC connectivity (obviously I was getting desperate!)

Switching over to native mySQL 5.5  ....... works!

MANY thanks for the assist, and sorry to have been such a pain in the ar$e.

Now I can get on with actually coding the project.

== Happy Customer.  :D

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: calling selectable stored proc for MySQL
« Reply #52 on: June 11, 2012, 08:16:28 pm »
Well, it was correctly closed in the bug tracker: it was implemented in FPC version 2.7.1 (current trunk/development version).

You're probably using 2.6.0 (released Lazarus version) or fixes 2.6 (=2.6.1) for a snapshot.... where this fix is indeed not applied

I commented on bug
http://bugs.freepascal.org/view.php?id=22250
that a backport of the fix from 2.7.1 to 2.6.1 might be an idea. Once that is done, the snapshots will pick it up.
Oops. Marco corrected me in the bug tracker: apparently the patch was backported to fixes 2.6 so it would appear in a Lazarus snapshot with fixes 2.6.
Sorry to have lead you to installing FPC 2.7+Lazarus; you could probably just as well have used Laz snapshot.

Note: now that you have a separate FPC 2.7+Lazarus installation with FPCUP, you can install a Lazarus snapshot over your original Lzarus+FPC 2.6 release version - default in c:\lazarus, without problems. However, given Murphy's law and the fact I already steered you wrong once, you might wait until your project is finished.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

kenpem

  • New Member
  • *
  • Posts: 22
Re: calling selectable stored proc for MySQL
« Reply #53 on: June 12, 2012, 06:07:04 pm »
No problem, I'm happily now chugging along with 2.7.1, and Lazarus works just fine. I have in fact now removed the old installation, and I'll carry on with this one.

Unless there's any particular reason why I should install a Laz snapshot?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: calling selectable stored proc for MySQL
« Reply #54 on: June 12, 2012, 06:15:04 pm »
Unless there's any particular reason why I should install a Laz snapshot?
Only if you run into problems due to new bugs in 2.7.1...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018