Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Databases / Re: Step-into the field setter
« Last post by ginoo on Today at 09:28:40 am »
Resolved.
Now what I do is try to find the bug I found zeos 8 with the calculated fields (I try). For those interested in trying to solve it I also wrote an example that reports the problem.

https://zeoslib.sourceforge.io/viewtopic.php?t=199037
2
Databases / Re: Database standards OR Am I doing this right?
« Last post by egsuh on Today at 08:56:31 am »
I think the program should be designed not to try to edit the same record and field by two or more users simultaneously. Let's assume that user A and user B have opened the same record, and they change the same record and update. Even after user A updated the record and committed, user B is looking at the old data (because it is under different transaction), which is before changed by A. And if the user B update it again, then A's modification would be lost. This is nonsense. So, once A opened a record, B should not permitted to view or at least change the record. If two or more users HAVE to access the same data and modify them (e.g. one person edits unit cost for a product, while another person edit production volume for sales), the two fields should be in different tables. Users can see the whole record combined, but do not edit the same field at the same time.
3
Debugger / Re: FpDebug unexpected Assembly window upon 32bit program start.
« Last post by Marc on Today at 08:46:38 am »
There already is a command that does exactly this "focused behaviour"

Any user can go to there keymap, and reassign F7/F8 to the focus sensitive command.

https://wiki.freepascal.org/IDE_Window:_Assembler#Using_the_same_or_different_keys_for_Pascal_and_ASM_stepping

Assign F7/F8 to the marked entries of the keymap

Aahhh.... thanks
4
Networking and Web Programming / Who is Indy mattias?
« Last post by jollytall on Today at 08:26:24 am »
I have just installed first the OnlinePackageManager and then from there I installed indylaz. I added it as a requirement to my project and tried to compile a program that worked before I totally reinstalled Lazarus. Now I get many errors, like

Error: /home/mattias/tmp/lazarus-project3.0.0/lazarus-project-build/usr/share/lazarus/3.0.0/lcl/comctrls.pp... and specific details.
and a lot of Liner warnings.

Is it possible that in the package the developer's folder remained as a hard coded name, or I do something wrong?
5
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by KodeZwerg on Today at 08:17:30 am »
@440bx, okay since you are not stopping to blame my code, you have my full working testcode, make it crash boom bang, can you?
If you managed to make it crash, show what you modified that it can crash.
6
Databases / Re: Step-into the field setter
« Last post by ginoo on Today at 08:11:29 am »
It works.
Other problem, however, it fails step into with a standard tfield (i.e., that of the standard LCL "fields.inc"). I have compiled Lazarus in Debug IDE but it does not work F7 and breakpoint. Should I do something else?
7
Did you mean you need an icon picture? I draw them using Inkscape 1.3, the source svg file is included so anyone can make any necessary modifications.
8
Databases / Re: Database standards OR Am I doing this right?
« Last post by paweld on Today at 07:52:10 am »
The Zeos as of version 8 has a TZTransaction component. But also in SQL itself you can combine several queries into one, for example:
Code: SQL  [Select][+][-]
  1. BEGIN tran
  2. UPDATE tableA SET col1='aaa' WHERE id=1
  3. UPDATE tableB SET [DATE]=getdate() WHERE ida=1
  4. INSERT INTO history (ida, changes_date)
  5. SELECT 1, getdate()
  6. commit tran
Of course, the query can be more compiled and have some additional functions/procedures which can significantly increase the transaction time.   
   
In addition, MSSQL itself runs implicit transaction queries if you do, for example, UPDATE without explicitly starting a transaction
9
Databases / Re: Database standards OR Am I doing this right?
« Last post by cdbc on Today at 07:40:30 am »
Hi
I seem to remember, that Zeos uses (can use) 'automatic transactions', so he might run into a *snafu* there...
The /Select-hint/ is kind of what I was thinking about...
Regards Benny
10
Databases / Re: Database standards OR Am I doing this right?
« Last post by paweld on Today at 07:21:12 am »
It is normal that you can't write one record in two separate queries at the same time.
In general, the idea is that you should not keep the transactions open for a long time, but immediately after adding/modifying/deleting data close the transaction, then the record lock will be released and the second job will perform another data modification without any problem.
You can also set in MSSQL the amount of time the queries will wait for the lock to be released (LOCK_TIMEOUT https://learn.microsoft.com/en-us/sql/t-sql/statements/set-lock-timeout-transact-sql?view=sql-server-ver16), then if two programs call UPDATE of the same record, the application that did it second will wait the specified time, and if still the record locked then return an error.
But to start with, check if the database has indexes you can use. Because the lack of suitable indexes can strongly increase the execution time of each query.
And remember that each SELECT also waits for the release of the lock on the records it has to retrieve, but here you can use the WITH(NOLOCK) table hint ( https://www.sqlshack.com/understanding-impact-clr-strict-security-configuration-setting-sql-server-2017/ ), the use of which will not wait for the release of locks, but will retrieve the data immediately, and for the locked records the state of the data will be from before the transaction.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018