76

(5 replies, posted in Database applications)

jrga wrote:

I'm sorry it doesn't work in MVD 5.6....


Supports versions 5.6 and higher

Hi Derek.

The first question from the program can be easily solved. For example, like this:

  for i := 0 to Screen.formCount - 1 do
  begin
    if (TAForm(Screen.Forms[i]).KeyPreview) and
       (SQLExecute('SELECT COUNT(id) FROM tbl_forms WHERE nome_form = '''+TAForm(Screen.Forms[i]).name+'''') = 0) then
          SQLExecute('INSERT INTO tbl_forms (nome_form, cor_form, cor_lbl_form, cor_textbox, cor_fore_textbox, cor_fore_memo, cor_memo, cor_panel) '+
          'VALUES('''+TAForm(Screen.Forms[i]).name+''', 15790320, 0, 16777215, 0, 16777215, 0, 15790320)');
  end;

But I haven’t checked the second one and it’s an interesting question to look into.

Hi Roberto,

Let's simplify the script a little.
Something like this

79

(5 replies, posted in Database applications)

Hi Jean


It's easier to do this without adding columns using

Form1.TreeView1.Row[i].Level

.


I'm using this function in a script.


The function will return 0, 1, 2 or 3 for the string.
0 - root
1 - musician
2 - album
3 - extra disks

Good luck in expanding the project. If you have any questions, write.

80

(5 replies, posted in Database applications)

Something like this

проблема в том, что SQLExecute не может вернуть более одной записи.

82

(11 replies, posted in General)

... wrote:

It's all about the formula for checking the correctness of entering the account relative to the control amount. It is necessary to operate with all symbols (31).


I will repeat to you once again that checking in DELPHI and other languages that cannot operate with very large numbers (in our case up to 31 digits) does not require converting the entire number and is performed on a string of characters.


Your code in DELPHI will not work.
How to do this in DELPHI is described in the article at the link I gave you above. In addition, this non-working code also contains a calculation error.

83

(11 replies, posted in General)

1. Your input mask does not match the IBAN input format. The first two characters must be letters.
2. Checksum verification does not require converting the entire string to a number.
You can read all the information on IBAN, verification and how to get around the problem of large numbers at the link
https://en.wikipedia.org/wiki/Internati … unt_Number

84

(11 replies, posted in General)

Step-in wrote:
sparrow wrote:

I don’t know what’s on the forums, but in the DELPHI Basic Tutorial it says:

  Min int64 value = -9223372036854775808
  Max int64 value = 9223372036854775807

http://www.delphibasics.co.uk/RTL.php?Name=Int64

Oh, only 19 characters up to 9223372036854775807. What can be done in my case? Will MVD not be able to handle this situation?


Why do you need to convert all the characters into numbers and what type of IBAN verification do you want to do?

85

(11 replies, posted in General)

I don’t know what’s on the forums, but in the DELPHI Basic Tutorial it says:

  Min int64 value = -9223372036854775808
  Max int64 value = 9223372036854775807

http://www.delphibasics.co.uk/RTL.php?Name=Int64

Hi  Jean, Frank.

Jean,
Sorry, I just got this mixed up.
I have corrected the text below.


We used Image in this project.
As for DBImage, the main obstacle was its functionality, which is different from other components.
For example, correct interception of image loading for recording in the database, similar to Edit and Memo.
Essentially, the DBImage component is an enhanced Image. Therefore, we used Image and attached some functions to it in the script.
If you need a Save button to save a picture from a storage location to another location you need, adding it is no problem.
In any case, there is room for creativity in a test project. Add Tree Search, ComboBox for Styles. Apply the color as Derek suggested.
A picture for a musician. It is possible to download and view multiple images for an album (requires database modification).
I think that at this stage it is necessary to divide this topic into two so as not to disturb Frank with other conversations. If you have any new questions or help, please create a new topic.
If any difficulties arise, I will try to help.


Frank,
You can find a description of the base structure for the tree and an example at this link. http://myvisualdatabase.com/help_en/pro … ings1.html
As far as I understand you, you want to make some kind of analogue of Persona.
You don't have enough database knowledge yet.
You have taken on a rather large project.
Start small. Don't try to do everything at once.
Let what you drew remain. Start first with the main tree in your project. Get the output to work.
Then Enable One Edit field. Let's say Name (its output in Edit , its editing and saving to the database).
At this stage, through trial and error, you will begin to understand how the components interact with each other.
The next step is to connect the ComboBox. Etc..
And of course read the forum, books, websites. Use examples of solutions from forum members.
Persona uses XML in its work. It stores reference books, saved characters, and projects in this format.
As you gradually expand your program, you will add data from XML to SQLite tables. Now your database is all in one pile.

Hi all,


New mod, Drag and drop images are now supported.

Version of the program with image support.
Something like this.

Hi Frank

The best tutorial on MVD is this forum.
You are using the "SQLQuery" function and not the "SQLExecute" function. Each of these functions has its own syntax and return data.
The SQL language in MVD is standard for SQLite and MYSQL.

The SQLExecute function is quite simple and is only needed to retrieve one field and one record.
The SQLQuery function allows you to retrieve multiple fields and records.

Hello Jean

For images you need to use a different path.


I'll try to make an example

Something like this

Hi,

You can try it like this.


Thanks to Derek for starting this.

93

(15 replies, posted in General)

Hi Roberto.
It needs to be a little different...
It is necessary that the deletion of the table, its creation and filling be done in the "atualiza_overview" procedure. I'll attach the script.

94

(15 replies, posted in General)

Sorry Roberto)

that's exactly what I meant). "Lost"


One more thing. Table "bar_data".
This table is used once to form a chart and is erased to form a new chart.
At the same time, the size of the database is constantly increasing.
Pay attention to this feature of SQLITE as a temporary table.

    SQLExecute('DROP TABLE IF EXISTS bar_data_temp');
    SQLExecute('CREATE TEMP TABLE bar_data_temp (eixo_x TEXT, eixo_y REAL)');
    SQLExecute('INSERT INTO bar_data_temp (eixo_x, eixo_y) ...  '+

Technically, SQLite stores temporary tables in a separate temp database.
It keeps that database in a separate file on disk, visible only to the current database connection.
The temporary database is deleted automatically as soon as the connection is closed.


Such a table does not need to be registered in MVD.
I offer it just for information. Perhaps it will be useful in future projects, and perhaps in this one too.

95

(4 replies, posted in General)

The simplest solution in a calculated field is to use the SQLITE function ROUND (,)


Show the code of the calculated field or, better yet, an example of a table in the example program.

MySQL 8.0 supports a new authentication based on improved, stronger SHA256-based password methods.

Unfortunately, MVD does not support new authentication, and FreeDB does not support legacy authentication.

97

(15 replies, posted in General)

Hi Roberto,


good job.


"frmOverview.TableGrid1.beginUpdate" was lost in the atualiza_overview procedure.
Adding the lost one will speed up the output of data to the table.

Hi Roberto


procedure Form1_OnKeyDown (Sender: TObject; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
  if (Ctrl) and (key=107) then showmessage('You press "+"');   // PLUS on NumPad
  if (Ctrl) and (key=109) then showmessage('You press "-"');   // MINUS on NumPad
end;

99

(2 replies, posted in General)

jrga wrote:
sparrow wrote:

Something like this.

Thankyou

You're welcome.
This version works with TDateTime
There is also a JulianDay version for MVD.

100

(2 replies, posted in General)

Something like this.