Recent

Author Topic: [SOLVED][SQLite] : i can't see table  (Read 19166 times)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: [SQLite] : i can't see table
« Reply #15 on: May 14, 2017, 03:13:29 am »
Write a log of "recent changes" and/or use version control software. If don't want to use version control software, keep several backups of the working code and use Meld => http://meldmerge.org/

I have just tested Lazarus 1.6.4\Tools\Compare File to Notepad++ 7.3.3 Plugin Compare 2.0.0 and I realized why you suggest Meld, which I didn't know yet.

I thought that Lazarus Compare Tool would be visually similar to Microsoft Visual Studio Diff Windows:
https://www.visualstudio.com/en-us/docs/tfvc/compare-files

When needed I was using TortoiseSVN, TortoiseGIT, Notepadd++ Compare Plugin or WinMerge.
http://winmerge.org/

Is there another compare plugin that I could use inside Lazarus IDE?

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: [SQLite] : i can't see table
« Reply #16 on: May 14, 2017, 07:28:50 am »
@Thaddy,
Can you justify it?
Michal

The code is a mess. There are many (100'ths) of places where during compilation there are unsolved warnings, some of which are very, very nasty to solve afterwards by third party developers that just work with the PPU's. That goes from range checks to string conversions with data loss. If these were just in the visual components as side effect I maybe could live with that but at least the engine and middleware non-visual parts should be completely free of warnings that could be errors. That's because it is database software and I don't want corruption. To summarize: the sourcecode is not very re-assuring to say the least.

Also, the error handling is crude or even missing in places where it matters most: the checks and versioning of some of the third party engines lacks, so everything has the possibility to grind to a halt from which it can not recover. (The above code is a good example if the sqlite dll is wrong 32/64 or 2 vs 3) Causes a permanent hang, even crashed Lazarus during debugging.

Since there is a lot of potential, every now and then I still try it out, but nothing seems to change in the code quality. The authors should start with solving all warnings. Then solve the problems when the third party shared libraries/dll's are not what is expected and make it possible to recover gracefully on the low level side, not my exception handling way up my high-level code.

There's *a lot* more, but these are the most demonstrable and both the main issues have to do with lazy and sloppy coding.
Summary: code quality is bad, exception handling is bad. Ideas are good, execution is sloppy.

And this easy to verify:
By just recompiling the zeos packages. Count the warnings. Count the warnings you don't want to see in database software...
Try to load  a wrong dll in the above code by OP and compile ... (save everything first, it can crash Lazarus as well as the exe)

[edit]
Note those range checks should really be solved and are easy to solve:
Most of them are either a variable of the wrong type, but with the same width: *must* be solved because of the sign bit. Either adapt the variable type, use an intermediate assignment or typecast.
The string types must be examined and when proven harmless also solved with an explicit typecast or the string type should be changed. Or better: the string types should be explicit. Not "string".
All of this won't affect Delphi compatibility.
The exception handling and subsequent recovery probably requires a re-design.

And please do not use unit wide {$rangechecks off} or {$R-}. I'd like to do that myself, thank you, on a program wide basis.
Although I would allow
Code: Pascal  [Select][+][-]
  1. {$ifdef fpc}{$push}{$R-}<the code><{$pop}{$endif}
in some rare but not all cases.

As it stands it is feature rich but poorly written software. I like the features. I don't like the code.
It is poorly written because the programmers most certainly are very good.
They just fall into the "I am a programming God, so I know better than the compiler" trap.
Warnings should be solved. If only to make sure the developer has taken a look at what the compiler thinks could potentially be wrong.
And in this particular case the compiler is right most of the time.

[edit2]
Read my later posting on the component editors...
http://forum.lazarus.freepascal.org/index.php/topic,36869.msg246159.html#msg246159
That's a pretty serious deployment issue!.
« Last Edit: May 14, 2017, 12:29:35 pm by Thaddy »
Specialize a type, not a var.

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: [SQLite] : i can't see table
« Reply #17 on: May 14, 2017, 12:01:05 pm »
Hi
i don't know waht is happen??but i compile it in my laptop with lazarus 1.6.2 and it works corectly.
thanks a lot

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: [SQLite] : i can't see table
« Reply #18 on: May 14, 2017, 12:21:09 pm »
Hi
i don't know waht is happen??but i compile it in my laptop with lazarus 1.6.2 and it works corectly.
thanks a lot
Your problem has also to do with the above critical write-up on Zeos, btw.
You have a problem with hard coded paths or library versions.
One could say that is also the fault of Zeos's component editors.
They cause you to enter a hard-coded full path.

Experienced programmers can work around that. Less experienced programmers like you need help to solve that.

Zeos developers take note! Offer option to use system default path for libraries (32 AND 64 bit). Offer option to make path relative.

« Last Edit: May 14, 2017, 12:28:02 pm by Thaddy »
Specialize a type, not a var.

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: [SQLite] : i can't see table
« Reply #19 on: May 14, 2017, 12:52:22 pm »
i don't know waht is happen??but i compile it in my laptop with lazarus 1.6.2 and it works corectly.

If you just stop here then you learn nothing from this 'auto-solved by itself' issue. I recommend you to inspect the code carefully, check the differences between your recent compilation and the previous compilation. Is it the hardware, software, library, code or configuration problem?!!! This is a good example for you to learn how to debug. Novice programmers are too eager to learn coding but forget debugging is a very important thing in software development.

Seriously, when something not working previously becomes working and you don't know what you have done or what has happened. This is very dangerous, the code may contain a hidden bug that may cause cataclysm in the future.  :'( :'( :'( :'( :'( :'( :'(

Anyway, your project is not commercial program so no serious harm may happen.  :D
« Last Edit: May 14, 2017, 12:55:32 pm by Handoko »

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: [SQLite] : i can't see table
« Reply #20 on: May 14, 2017, 12:59:55 pm »
@Handoko
In his favor is that he is lead to believe - by his components - to produce working code.
Properly written software (in this case even for software development) would have prevented him from making that assumption.
Yes, majid.ebru made not a mistake perse, but made an assumption that can be easily made.

Zeos is highly recommended by some. Even I see its promise. But their code needs cleaning up. Big time.
In my past and current experience it is simply highly unstable. Which is unforgivable for software development libraries.
« Last Edit: May 14, 2017, 01:03:47 pm by Thaddy »
Specialize a type, not a var.

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: [SQLite] : i can't see table
« Reply #21 on: May 14, 2017, 01:14:03 pm »
Zeos is highly recommended by some. Even I see its promise. But their code needs cleaning up.

I agree. It was my first time trying Zeos and maybe the last. It seems easy to use and very feature-rich, but 154 hints and all are z related.  :o

miab3

  • Full Member
  • ***
  • Posts: 145
« Last Edit: May 14, 2017, 01:47:00 pm by miab3 »

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: [SQLite] : i can't see table
« Reply #23 on: May 14, 2017, 02:38:05 pm »
Does that attend the very basic issues I explained?
Specialize a type, not a var.

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: [SQLite] : i can't see table
« Reply #24 on: May 14, 2017, 02:39:06 pm »
Done as what miab3 said.

The development version doesn't seem good. Also, I'm not familiar with Delphi - I may be wrong, but maintaining multiple version packages for Delphi - I don't think it is a good idea.

miab3

  • Full Member
  • ***
  • Posts: 145
Re: [SQLite] : i can't see table
« Reply #25 on: May 14, 2017, 03:09:52 pm »
@Handoko,

This is an idea commonly used in Delphi.

Michal

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: [SQLite] : i can't see table
« Reply #26 on: May 14, 2017, 03:19:35 pm »
@Handoko & Michal
That's also necessary for Lazarus and FPC if you want to maintain older versions of the compiler and the LCL.
It's less of an issue for FPC and Lazarus because users can be pointed to a new and updated FREE compiler and IDE.
This is fine, multiple packages for multiple versions. That's even how it should be.

My critique is more fundamental.
« Last Edit: May 14, 2017, 03:21:49 pm by Thaddy »
Specialize a type, not a var.

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: [SQLite] : i can't see table
« Reply #27 on: May 14, 2017, 07:26:02 pm »
Thanks a lot
.
this is first my program about DataBase.
.
i just see a clip then i create a program.
.
i am beginner about Database and i try to learn more about it.
.
i don't know that the ZEOS is good or not.
.
.
tell(and guide) me ,please,Which component should I use ؟
or
Which component is better?(less bug aand....)
.
Quote

version control software
.
.
 Meld => http://meldmerge.org/


in future i will use Meld .
please Introduction about "version control software"
.
thank you veeeeeeeery much

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: [SQLite] : i can't see table
« Reply #28 on: May 14, 2017, 07:32:48 pm »
valdir.marcos has given you the suggestion, check the previous post.

I do not use version control software, so I let other to answer.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: [SQLite] : i can't see table
« Reply #29 on: May 15, 2017, 04:35:21 am »

 

TinyPortal © 2005-2018