Recent

Author Topic: LazSqlX  (Read 143653 times)

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: LazSqlX
« Reply #180 on: October 24, 2014, 06:36:05 pm »
Congratulations for the program. I can see it's a lot of work. I've tested in on Oracle and it is simple to connect.

I've noticed a bug: The columns order of a table, shown on the Table Info Form, is not always right (In Oracle).
« Last Edit: October 24, 2014, 06:41:56 pm by Edson »
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

flamer0n

  • Guest
Re: LazSqlX
« Reply #181 on: October 24, 2014, 07:36:58 pm »
Thank you very much Edson.

The columns are retrieved from Zeos' TZMetadata component (by specifying .MetadataType:=mdColumns). There's a TTableInfo object filled with relevant info (fields,pks,fk etc) so the columns are processed in the same order as TZMetadata gives them. Of course there could be errors in the process but those errors who appear only sometimes are pretty hard to catch...at least for me

Btw LazSqlX has a lot of bugs,waiting to be found yet  :-[
Thanks

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: LazSqlX
« Reply #182 on: October 24, 2014, 08:15:15 pm »
Well I haven't worked with Zeos, but I have worked with Oracle and I see that the order the columns appear is a tipical query to the DB dictionary, without consider the order column. It's a typical error.  Maybe a Zeos bug.

Another detail, is that the columns of a Oracle table appear always, like PK. Maybe another Zeos peculiarity.

Oracle is a very special DB. And developing for Oracle is always hard.

I will check your code and see if I can contribute in something. Currently I'm developing some similar but just for Oracle.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

flamer0n

  • Guest
Re: LazSqlX
« Reply #183 on: October 24, 2014, 08:36:17 pm »
Now that you mentioned PKs I just checked and saw that I made an exception for oracle only:

Code: [Select]
if FDBinfo.DatabaseType=dtOracle then
      dsMetaData.MetadataType:= mdBestRowIdentifier;

while for other DBs is
Code: [Select]
dsMetaData.MetadataType:=mdPrimaryKeys;
As far as I can remeber, for Oracle mdPrimaryKeys would return nothing but mdBestRowIdentifier returned PKs (at least for some cases I checked in a DB)

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: LazSqlX
« Reply #184 on: October 24, 2014, 09:11:21 pm »
Definitely it is not working in Oracle, at least not on my Oracle 10g.

I have a table with no Primary Keys, nor indexes, and all the columns appears as PK. The same for other tables.

I don't know if someone else have the same problem.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

flamer0n

  • Guest
Re: LazSqlX
« Reply #185 on: October 24, 2014, 09:20:58 pm »
Well that explains a little why are all columns treated as PKs, because there's not a single pk, and the best identifier for a row is all columns.... Maybe i should get pks another way

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: LazSqlX
« Reply #186 on: October 24, 2014, 10:26:20 pm »
I use querys to the dictionary for to get the table info. I don't know if it's possible for you to do that.

Maybe it would be better, not to show PK, for Oracle tables, until find a better way.

Another observation (always for Oracle): The columns for the indexes, are not shown on the Table Info Form. A little detail.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

flamer0n

  • Guest
Re: LazSqlX
« Reply #187 on: October 29, 2014, 02:37:49 pm »
LazSqlX 4.5.0.1436

-New Feature: Open table as Form (DbInfo\AsDbFormUtils.pas)
-TableInfo is now TOwnedCollection and all items used are of TCollectionItem (removed FGL usage ) (DbInfo\TableInfo.pas)
-Changed TableInfoForm to DesignTableForm (Forms\)

*fixes
-when filling comboBox on CreateIndex dialog (EditIndexForm.pas)
-display message (not grid) when executing query is not of type select (LazSqlXCtrls.pas)
-when using SqlDB, [delete] in dataset wasn't commiting changes to db (LazSqlXCtrls.pas)
-fix an error in autocomplete (IndexOutOfBound when list was empty and enter was pressed)
-fix Unhandled errors were not being shown (MainForm.AppProperties)

source https://github.com/flakron-shkodra/LazSqlX
build https://sourceforge.net/projects/lazsqlx/files/Latest/

flamer0n

  • Guest
Re: LazSqlX
« Reply #188 on: November 13, 2014, 12:02:50 pm »
v4.6.0.1483

GUI:

-Query result printing ability
-AsDbForm printing (with the ability to show/hide grid columns as you want them to appear in lazReport)
-FindReplace dialog
-MainMenu Search item added for Find&Replace dialogs
-RunProcedure dialog now returns text and excecution goes through active tab
-Trigger info can now be viewed in DesignTable


Code:

-A lot of code refactorings all over the project
-Everything should work with either sqldb or zeos depending on main connection
-Metadatas are now retrieved through classes that implement IAsDbMetadata, depending on the database type
-Fix: Find Dialog
-Fix: DataImporter's Import was always true, even if failed
-Other minor fixes

source https://github.com/flakron-shkodra/LazSqlX
build https://sourceforge.net/projects/lazsqlx/files/Latest/

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: LazSqlX
« Reply #189 on: November 13, 2014, 12:21:23 pm »
Thanks, flamer0n!

-Fix: DataImporter's Import was always true, even if failed
*cough* embarrassed grin ;)
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

flamer0n

  • Guest
Re: LazSqlX
« Reply #190 on: November 13, 2014, 02:12:28 pm »
BigChimp, it was just not showing the error if any, the import was functioning normally; not a big deal :)


BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: LazSqlX
« Reply #191 on: November 13, 2014, 02:52:01 pm »
Sure, it's just that I don't like loose ends ;)
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

flamer0n

  • Guest
Re: LazSqlX
« Reply #192 on: November 13, 2014, 04:49:55 pm »
For some reason changes were not committed to git-hub.   I just did that again and checked and sources are up-to-date now. Sorry.

flamer0n

  • Guest
Re: LazSqlX
« Reply #193 on: November 19, 2014, 05:23:01 pm »
v.4.6.2.1494

-Added Load/Save Session (Query History)
-Saves queries of tabs when disconnecting from server or closing LazSqlX and reloads them on connect
-Added Clean Session History on main menu under File
*previous
-Fix QueryDesigner: drag&drop from field of one table to a field in another table was causing app to hang
-Fix Find&Replace Dialogs were accessible even after disconnect thus ‘causing access violation when used because of no activetab was available

Binaries (sf doesn't let lazsqlx to be uploaded so temporary here on box. I guess I'll stop using SourceForge in the near future)
https://app.box.com/s/coxb183sxu4um2edb85z

Sources
https://github.com/flakron-shkodra/LazSqlX/

flamer0n

  • Guest
Re: LazSqlX
« Reply #194 on: November 20, 2014, 04:43:27 pm »
v.4.6.3.1515
-Refactorings; One connection used everywhere (hopefully ::))
-Performance tuning
-Bugfixes

Binary
https://sourceforge.net/projects/lazsqlx/files/Version%204.6.3.1515/

Source
https://github.com/flakron-shkodra/LazSqlX

I'll take a break for a while :)

 

TinyPortal © 2005-2018