background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Best WinDev :WM 16 : Triggers ?"

input logo icon
Video tags
|

Video tags

windev
trigger
procédure stockée
Webdev
sql
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:00
hello friends I hope you are
00:00:02
well
00:00:03
I suggest to you today a
00:00:06
very very important subject
00:00:08
a functionality which uses
00:00:11
coders using databases
00:00:13
if you do not know the concept of
00:00:16
trigger like me use triggers
00:00:19
and what are they it's time to
00:00:21
watch this video because it's
00:00:22
extremely interesting you're going to have
00:00:24
this problem in my coding one day
00:00:27
or another
00:00:28
for that I'm going to pose a
00:00:31
concrete problem and imagine how we
00:00:33
can solve it
00:00:35
here
00:00:38
I imagine that I am in the
00:00:40
banking application that of my bank that of
00:00:42
your voucher in which you have an
00:00:45
account and I will present to you the
00:00:48
files that I imagined the
00:00:51
blue file so customer files in which
00:00:53
I supposed to have so a client
00:00:56
called dupont emilie in blue after a
00:00:59
bank account file in which
00:01:01
emilie because we took a year and
00:01:03
clients so you see clients here
00:01:05
in orange they will thus put a lot of
00:01:07
point humiliating her allie more
00:01:09
account 1 2 3 4
00:01:10
and then we green each time
00:01:14
something happens on
00:01:16
Emilie's bank account we call it
00:01:19
financial operations good stocks
00:01:21
in the file to here and I
00:01:24
showed you some examples here ml goes to
00:01:27
restaurant lp by credit card 30 euros
00:01:30
eon but that it is a debit d in the
00:01:34
diby sense mean for her to withdraw
00:01:37
money from her account after an example
00:01:39
she lies at the cinema with someone she does
00:01:42
not pay credit card he ya we withdraw them
00:01:44
so money it's still 1.18
00:01:46
third example she received salaries
00:01:49
by transfer so it happens between
00:01:52
her company her employer and the bank
00:01:55
which are connected I don't know how
00:01:57
but still useful it's that 'she receives
00:02:00
2500 euros this time it's with her
00:02:03
knowledge as credit so we
00:02:05
put the money in her so to keys of the rock
00:02:08
on her account the third example the
00:02:10
taxes for example I withdraw 180
00:02:12
euros so if it is to withdraw
00:02:14
money if it is a debit and at 6.8 and
00:02:17
I liked you arrows in Loire
00:02:19
up there to show that this table is
00:02:21
not filled only with the application that
00:02:24
you make for example for the bank
00:02:26
j I marked here that there is a bank like
00:02:28
this will be the application made by the
00:02:29
bank and the poem it is for example
00:02:31
uses his smartphone to
00:02:34
look at these camps and then his
00:02:36
credit card to therefore pay but there is also
00:02:39
the employer of emile and dupont which has an
00:02:42
application which can pay
00:02:44
transfers into the operating table
00:02:47
I have planned that the tax services can
00:02:49
be connected to the database
00:02:51
to also collect tax and three
00:02:54
small points it can be full of
00:02:56
things it is for example you are a
00:02:58
professional it can be the payments
00:03:00
of the invoices that you say that you
00:03:02
address to your customers and cerexhe so
00:03:04
what is the problem the cl problem
00:03:06
of yesterday we would like to do right
00:03:09
now t immediately know what
00:03:11
ml has left in his account
00:03:14
and we call that the balance the first
00:03:17
solution that comes to mind if I do
00:03:19
n't know the concept of the sorter is to
00:03:22
say well I go through the
00:03:24
operations file from a to z and I starts to
00:03:27
tell in a digital variable
00:03:30
in a digital string
00:03:32
variable data aymeric sorry I will
00:03:34
add the motorcycles which are credit and I
00:03:37
will subtract the amounts which are
00:03:39
said yes at the end I will display what
00:03:41
remains in positive or negative but
00:03:44
this solution you can't imagine, the
00:03:46
big flaw is that it can take
00:03:48
a lot of time because this file
00:03:51
can contain emilie's financial transactions
00:03:53
for years in this
00:03:57
solution it is therefore to be ruled out
00:03:59
so I will show you now
00:04:02
here the diagram of the database that
00:04:05
I had planned for the demonstration you
00:04:08
see on the left customer files with a
00:04:11
heidi customers which the unique key the first
00:04:13
and last name in the middle an accounts file
00:04:15
with the heidi code which is unique we
00:04:17
imagine that a number account
00:04:19
cannot be the same for several customers
00:04:20
and we recall Heidi customers so the
00:04:23
water account file on the right is the
00:04:26
operations file you see an
00:04:29
operation number which will
00:04:31
automatically raise the Heidi customers
00:04:33
it is for remember that the operation
00:04:34
also for Emilie and on behalf of the
00:04:36
milli the date of the operation during
00:04:39
the operation the wording there we will mark
00:04:41
restaurants cinemas theaters and will remain the
00:04:44
type of operation to say it was paid
00:04:47
by credit card by check we also have a
00:04:49
transfer after Léman the word time so
00:04:51
it is d euros the meaning of the operation
00:04:53
this is where I put it is for credit and
00:04:56
for balls and I therefore imagine
00:04:58
displayed here alone which his key will be
00:05:02
the account number because one
00:05:04
bit on the unique side so the unique key
00:05:07
will be the heidi account and
00:05:09
you see here I still call back
00:05:11
as a precaution or customer mode I put the
00:05:14
sales coat which is to be calculated and we
00:05:17
put the date and time at which we
00:05:19
calculated this balance is there so that we know
00:05:21
at any time the balance is
00:05:23
what they current and the reasons or did he
00:05:25
see j I looked at the
00:05:27
two operations that I noted here in
00:05:29
red and black.
00:05:30
The ideal is that each time we
00:05:33
add in in the operation file
00:05:37
because something happened and
00:05:39
emilie spent something or ml
00:05:42
joined the money we would like that immediately
00:05:44
moreover there is a second
00:05:45
operation which adds that which calculates
00:05:49
that it would go therefore modifies the balance and if
00:05:52
in the file jump this is where arises the
00:05:55
rom question ruled out the solution of
00:05:57
browsing any hockey operations file
00:05:59
because if it can be too long
00:06:02
the other solution is that through windev I
00:06:04
know how to do it when I add elin
00:06:08
through the jousting purchases function in the
00:06:11
operation file I just have to
00:06:13
search for the balance with the nimrod
00:06:16
gmail accounts is there I modify yes it
00:06:19
will work very well
00:06:21
because it would be simple there is no
00:06:24
need for this notion of trigger so
00:06:27
there we trigger the valve at to say this
00:06:29
solution is not very suitable is that
00:06:31
the problem does not care about the operation on the right
00:06:35
I show them and here it is not
00:06:37
only fulfilled by an application that I
00:06:39
will code myself
00:06:41
when you see if the arrows in Loire
00:06:43
it is several applications the
00:06:44
tax services the employers
00:06:46
the suppliers who can fill its
00:06:48
table and at this moment I must
00:06:50
be sure that each time an
00:06:52
application adds
00:06:54
elina a record in the file
00:06:57
operation increase ensures that it it
00:06:59
modifies the balance is here in the
00:07:02
balance file this is not the case so at that moment
00:07:04
what we would like is that
00:07:06
whatever the application which is
00:07:10
therefore adds to the recording a
00:07:13
financial operation to inflict operation we
00:07:15
would like the second bone to be
00:07:17
automatically a unique code which is
00:07:20
done and which calculates the click care and at
00:07:23
that moment I will not be doing it
00:07:25
because if I do not know and strictly
00:07:27
the other applications it is not me
00:07:29
who has an effect then we will resort to
00:07:31
this notion of prayer which I will
00:07:33
first show in some
00:07:35
theoretical explanations but very little and
00:07:38
with coding so what is a
00:07:41
trigger to have any trigger in
00:07:43
English it means triggered ire
00:07:45
start something intrigue art so
00:07:48
what is it is a procedure that you
00:07:50
will create in your application which
00:07:53
will be triggered automatically as soon
00:07:56
as we add we modify we delete it when
00:07:58
saving in a database file
00:08:01
so I say that differently
00:08:05
intrigues art it is necessarily associated
00:08:07
with a database file so if
00:08:09
we do not have a database have made
00:08:11
an application without a database
00:08:12
drop the sorters we leave it
00:08:14
don't worry
00:08:15
now how do you
00:08:17
sort war bats you declare in your
00:08:20
application or elsewhere I'm going to
00:08:22
show you that there are two ways to do it
00:08:24
but roughly speaking declares plot
00:08:26
hours and when declaring trigger you
00:08:28
have to specify lots of things you must
00:08:30
first say what is the procedure that
00:08:33
you will have created which will be executed
00:08:35
automatically
00:08:37
noble on which files we will
00:08:40
trigger this procedure that is to say
00:08:42
execute it
00:08:44
and we will say yes my intrigues r it is
00:08:47
not triggered as soon as 'we do
00:08:48
something on a file its specialized r&d intrigues
00:08:51
to trigger either on
00:08:53
the addition of a record or on the
00:08:56
modification of a record or
00:08:58
on the deletion of a record
00:09:00
and obviously it is intriguing we can
00:09:02
say you can dedicate yourself
00:09:05
triggered so I address rigor it
00:09:07
can be triggered or the procedure
00:09:08
associated with sorting hardly weighed leave
00:09:11
it can be on the two operations
00:09:13
add modify or on the three
00:09:15
add modify deletion at that moment
00:09:18
the specifies an action the place for an
00:09:21
action where the 2 euros the three and then
00:09:23
last thing we tell him that the
00:09:25
procedure which will be executed what
00:09:28
it will be executed even before we
00:09:30
add that we modify that we delete
00:09:32
the recording in the file
00:09:34
operation or does it first wait for us to
00:09:37
add that we modify that we
00:09:39
delete in the file and after the
00:09:41
procedure is executed
00:09:43
it is it is an ease for the
00:09:45
developer can do things either
00:09:47
before or after is what we did on
00:09:50
the file so now what you
00:09:52
also need to know
00:09:54
is that there are two types of rigor
00:09:57
and two types of trigger windev does not
00:09:59
give possibilities in other
00:10:01
platforms there are only what we call
00:10:03
trigger servers so let's see
00:10:04
the difference on the left towards an application trigger
00:10:09
you are going to create a procedure you
00:10:10
are going to create declared a trigger and
00:10:13
each time you do
00:10:15
something on the file on which you
00:10:17
have my intrigues hours at that moment
00:10:19
the procedure which you also have hot
00:10:21
rigor will be triggered and you
00:10:23
do it but this trigger that you do
00:10:26
in an application it will only work as
00:10:28
possible this app if there is a another
00:10:30
application which comes after and which
00:10:32
itself uses the same file of the
00:10:35
same milk base if it does not declare
00:10:37
rigor the trigger will not be triggered
00:10:40
for 6 applications in this case
00:10:42
application trigger it's really when
00:10:45
you want to do it that for an
00:10:47
application and not carry all the
00:10:48
applications which access the
00:10:50
database it is a possibility it is very
00:10:52
rare but it happens and then there is
00:10:55
what we call the rigorous servers
00:10:57
this time concrete the procedure not
00:11:00
in the application not so much your code
00:11:02
anchor the procedure on the database server
00:11:05
so there is a way of
00:11:07
the creg the different and the procedure we
00:11:09
call it not simply procedure we
00:11:11
call it stored procedures there so in
00:11:13
blue and in glass and in black the trigger
00:11:17
it is also declared on the server so
00:11:19
if they do not handle do I want to show
00:11:21
earlier and this time fact that
00:11:23
the stored procedure and them in the
00:11:25
database when we say on the server
00:11:27
it is stored with the database
00:11:28
the trigger and declare them on the
00:11:31
database server at that
00:11:32
time all the applications that
00:11:34
you know or crowned do not know
00:11:36
but which have the right to access the
00:11:37
database as soon as it adds
00:11:39
modifies deletes things the
00:11:42
records in the file on
00:11:44
which the mildt rigor the trigger will be
00:11:46
triggered so this is the
00:11:48
top solution for remote databases
00:11:50
we must do automatic processing
00:11:53
whatever the number of applications
00:11:56
which intervene on the file
00:11:58
so we are going to do a demo with
00:11:59
plot hours applications for you
00:12:02
to see a little how it works if you
00:12:03
want to sort guys only for an
00:12:05
app and then I will show you but
00:12:08
this time if you do not have no
00:12:10
remote databases we won't be able to
00:12:11
do it I show you how to do it
00:12:12
by manipulating windev if you want to
00:12:15
make a brain trigger
00:12:18
so here is the example that we are going to
00:12:20
do together that I have already prepared
00:12:22
I me I want do it on a
00:12:25
local milk basis because I know that among
00:12:27
you there are many people who do
00:12:28
not necessarily have remote databases
00:12:30
so I will do the demo
00:12:32
acquired a local database but
00:12:34
if you have a database remote
00:12:36
with the explanations that I will give
00:12:38
after you can replace for example
00:12:40
there a base we are remote and to
00:12:42
show that it works not only to
00:12:44
print them for two I will
00:12:45
show you and therefore a windows application
00:12:48
with wind and and on the right a
00:12:50
mobile application with windev you
00:12:51
will see that we will do the same thing we
00:12:54
will calculate the seal in the same way
00:12:55
so let's go I will first
00:12:59
show you I launched windev times
00:13:00
the windows application I launched the
00:13:03
windev mobile for the mobile application
00:13:05
I'm going to have demonstrated
00:13:07
what we want and we're going to
00:13:09
look at the hays code so let's go
00:13:11
I'm going to show you here I'm
00:13:15
in the application that I call
00:13:18
trigger test windows without the base of
00:13:21
the excuse shown earlier so I'm going
00:13:24
here in the sol file
00:13:26
I'm going to go see it in wma and I
00:13:29
'm going to put it by hand here for the demo
00:13:31
I say that weight emilie and the 2000
00:13:35
euros in his account so here in the
00:13:38
balance currently 2000 euros there is
00:13:40
no date comes no time it will be
00:13:41
added perhaps later and I leave this
00:13:44
file there like that so two thousand
00:13:45
euros that the operations I will go and
00:13:48
see the operations on
00:13:50
which I do demos and I
00:13:52
mean awd map the tool for manipulating
00:13:55
deleted files month all
00:13:57
saves them so here again with an
00:13:59
operation file which is completely
00:14:01
empty the client file I show it to you
00:14:04
with two places maps here and
00:14:07
completely in which adjusts to
00:14:08
the recording recording 1 of the pot
00:14:11
and there I liked Alex I can put ml
00:14:13
to remain correct with the example of
00:14:17
refusing to speak
00:14:19
here of to emulate so we have a single
00:14:22
client only one customer I leave I
00:14:24
close and I fall asleep files when here
00:14:27
of you come my here I marked
00:14:30
some customers worried about the promoted at
00:14:32
noon she has the code 1 2 3 4 up to 0 ok
00:14:37
so what we are going to do now so
00:14:40
I'm going to close all that because we're going to
00:14:43
see it by demonstration inflect
00:14:44
operation I leave it why we see
00:14:46
what they in and gide and nothing else
00:14:48
so I'm going to execute the
00:14:51
windows application I test by l
00:14:54
windows application and there I do the same thing so
00:14:57
here with a mobile application so I
00:15:00
leave the window of the
00:15:01
windows application here I am going to look for a
00:15:04
mobile application I created an
00:15:06
android ios type mobile application
00:15:09
and when it gave me given is what he
00:15:11
asked me do I want to create a
00:15:13
database I tell him no because
00:15:16
I tell him I share a
00:15:17
database with local with ours
00:15:19
applications so I tell him no and I
00:15:21
showed him the path for them
00:15:24
to go and see the analysis that I did
00:15:25
with the Windows application and I see it
00:15:27
here when I see the description of
00:15:30
the analysis project I showed him
00:15:33
the analysis here the path
00:15:35
is not not a new database the
00:15:38
windows application database you see here in blue and I
00:15:41
tell it for the files you do not use the
00:15:44
mobile application directory because
00:15:47
otherwise the files will quickly be used and they
00:15:49
use the directories and I
00:15:51
show them and the exe file of
00:15:52
the windows application like that in my
00:15:55
example the windows application and the steel
00:15:58
files in the
00:16:00
windows application folder and more exactly
00:16:02
exe folder and the mobile application
00:16:04
use it the analysis of the
00:16:06
windows application it uses the files of
00:16:09
the news application which falls asleep
00:16:11
exe folder here is hockey so I launch
00:16:13
the mobile application too
00:16:17
and you see I liked it side by side
00:16:18
both will add
00:16:20
operations I will d 'first in
00:16:22
the mobile application on the right click
00:16:24
on sun you see I marked there at
00:16:26
two thousand euros this is what I
00:16:28
showed you here I am going in July to
00:16:31
modify it in the file operation
00:16:33
is not here in the
00:16:36
balance file we have two thousand euros at the
00:16:39
smallest here
00:16:41
ok we leave like that I come back in the
00:16:44
demonstration so
00:16:48
side by side I go with the
00:16:50
mobile application say for example in the month of
00:16:53
June so we are going to increase there I take
00:16:56
anything I leave the RERS Thursday
00:16:58
six restaurants
00:17:01
managed thousands to pay by credit card
00:17:04
she spent 30 euros for the rest
00:17:07
it's a dba withdraw money from her I
00:17:10
add the operation
00:17:11
nothing will happen so we lives 2000 and spends
00:17:14
30 euros I click see the ground and you
00:17:17
see it was crémants t2 1960 I
00:17:21
will have a mobile application which on the
00:17:22
left I click on twenty sound
00:17:24
look have poured mac and 1970
00:17:28
the windows application will add again
00:17:30
something else we're going to say this time
00:17:34
for example at 9 a.m.
00:17:39
here I'm going to go home
00:17:43
allam a here I don't want to use the
00:17:46
return 09 00
00:17:49
he doesn't want to name to go quickly
00:17:52
choose 9 a.m. at the foot here
00:17:55
the bel and I want mark therefore
00:18:01
salary salary and this time it is on
00:18:05
the employer so the boss of Ms. Emilie
00:18:07
who makes a transfer to her and I mean
00:18:11
that touches that she receives 2500 euros and
00:18:13
this time it is a credit that therefore
00:18:16
we puts money in her account
00:18:17
so 1970 more than 1500 it will
00:18:21
fetch law I adjust the operation I
00:18:23
ask law the care she now has
00:18:25
4470 in the mobile application on the left
00:18:28
asks to see the ground it is up to date
00:18:30
now the mobile application for
00:18:32
example julie will only pay for her
00:18:35
application or something else here I put on
00:18:38
another date or randomly I leave the
00:18:40
date like that and I mean that's it so
00:18:44
emilie buys shoes
00:18:53
by credit card she pays for shoes for
00:18:57
example 40 euros
00:19:00
is a debit we are going to withdraw
00:19:02
the money added operations
00:19:05
and in the mobile application here in I
00:19:09
am going to click on the ground it went to
00:19:11
4430 I come into the windows application
00:19:14
on the right I ask to see the ground he
00:19:16
also thinks of 4 4400 too there I am doing a
00:19:20
demonstration with
00:19:22
local milk base files as if we are sharing and
00:19:25
you imagine that with a
00:19:27
remote database it will be the same thing
00:19:28
because there the two applications will
00:19:30
connect and declared the same base or
00:19:33
how I did that to go see it's
00:19:36
quite simple for
00:19:38
application triggers so I'm doing tests on
00:19:41
the two apps and I'll first see
00:19:43
the Windows application here
00:19:47
and I'll show you first I
00:19:50
created a procedure here no, first of all I'm
00:19:52
sorry we will first look at the
00:19:54
operation code of the blue button so here
00:19:58
I just entered input fields
00:19:59
which correspond to what needs to be added
00:20:01
in the operation file I'm going to go
00:20:03
see this blue button add their
00:20:05
operations I'm doing code and look at what
00:20:08
I'm doing there I haven't done a test to
00:20:12
know if we're entering it or not I'm preparing
00:20:14
the operations file here to
00:20:17
reset a recording in bed
00:20:18
I fill in all the fields all the
00:20:21
sections of the file by the hard count
00:20:24
so the cipa demonstration I say that
00:20:26
it is always the ivy lee code and the
00:20:28
date of operation during operations all
00:20:30
they have six beds the wording so
00:20:32
restaurant shoes which will be here in
00:20:35
the combe alongside chosen this type
00:20:38
of operation lacombe bullish if the one
00:20:40
where there is credit card and it is therefore
00:20:43
this combo there I have here entered by
00:20:46
hand on the initial side credit card checkbook
00:20:49
virmals will access as long as I take the
00:20:53
value that they have with which is displayed
00:20:54
to put it to the hard ones directly
00:20:57
to display the amount that the 6th' and
00:21:00
the shadow of the same meaning I enter and
00:21:03
there it is only at the good 206 if I see it
00:21:06
that it is this one the
00:21:07
age has entered debit credit we are going to
00:21:10
put hard debit credit in place of
00:21:13
his ideas as I say them in the and
00:21:15
after what do I do in this
00:21:17
this blue button and well I say that if
00:21:21
we display diby I will just put
00:21:23
also in the operation direction section and
00:21:26
I add
00:21:27
the recording in the
00:21:29
operation file and then I put back the
00:21:31
prompt fields to enter another time but
00:21:33
a call at no time I will not go
00:21:37
put something more or less
00:21:39
incremented decree voted the file which
00:21:42
is called balance file this file there
00:21:44
I could have absolutely here after
00:21:48
adding an operation option
00:21:50
I could have completely here behind on
00:21:52
line 21 started to search for the balance
00:21:56
therefore with the ivy lee code numbers
00:21:58
in the balance file is said according to as we
00:22:01
know we tell him I add I
00:22:03
subtract from the ground I did not do
00:22:05
why because these intrigues which will
00:22:08
do that to me and that would allow all
00:22:10
the applications which do the same against
00:22:12
me here add an operation and
00:22:15
trigger the trigger so you see
00:22:18
here when we make a trigger it takes care of
00:22:22
filling the table in which it if
00:22:25
we add the things for example salars
00:22:27
operation we do not take care of what
00:22:30
the trigger will do on the other files
00:22:32
in the jo so now we have to
00:22:35
do that I will show you how I
00:22:37
prepared the trigger price bike trigger
00:22:39
we said that we must first create
00:22:41
a procedure which triggers when
00:22:43
you look with me on the left here in
00:22:46
the file explorer I was creating
00:22:49
a procedure first happy done
00:22:51
procedure new elodie to create a
00:22:53
folder which is called July after I
00:22:56
left it called global precision and
00:22:58
there I I created a procedure that I
00:23:00
called modified alone
00:23:02
so difficult words so it is
00:23:05
the application which will be triggered by
00:23:07
the trio we will see how but what
00:23:11
does it do well then it searches
00:23:13
which is very nice with a procedure
00:23:15
which is triggered by a trigger it is
00:23:18
that as lra will be triggered by
00:23:20
the addition of an operation the procedure
00:23:23
it only
00:23:25
really has to use the the last record
00:23:29
because I am going to
00:23:30
demonstrate with an addition
00:23:32
of recording the procedure which is
00:23:34
triggered by plot time there that to
00:23:36
use the last recorded to the word
00:23:38
which was added or if I had
00:23:40
done a sort war to modify modify
00:23:42
or delete
00:23:43
so it says to itself that it is the
00:23:45
account number and I'm going to search in the
00:23:47
sol file this the sol of these Nîmes coast
00:23:50
there and it really uses the last
00:23:54
record which was added so
00:23:55
normally the
00:23:58
operating system gives it its walls there
00:24:00
and then I say to myself according to is -what does
00:24:04
a debit say, that is to say withdraw
00:24:06
money from Emilie if he has at that moment
00:24:08
what do I do the current balance
00:24:11
in the sol file the current balance
00:24:13
what do I do first here the
00:24:16
current balance I subtract the water
00:24:19
motors from the operation she for example
00:24:21
made a restaurant for 30 euros we will
00:24:23
remove too much current and
00:24:25
coat everything with a measles the ground if
00:24:28
it was a cry said it's someone
00:24:29
receives money for example a
00:24:31
salary the current balance we add
00:24:35
the engine of the salary here by more
00:24:40
and coat everything in the ground and then
00:24:43
we must not forget to modify it therefore the
00:24:45
procedure good game but summarizes the
00:24:47
procedure which will be triggered by a
00:24:49
trigger it will work it does what it
00:24:51
wants but it has access what you
00:24:53
have to remember is that it has access to the
00:24:55
information of the recording add
00:24:57
or modify delete it acts as if
00:25:00
it had added m now that I have
00:25:03
the procedure remember what I
00:25:05
said here
00:25:08
I said here that a trigger you need the
00:25:11
procedure which executes summarily
00:25:13
that's what I'm going to do again shown
00:25:14
that the creation and we work it is
00:25:17
now it must be said that as
00:25:19
declares the trigger and what file that
00:25:21
the action and how execute it and well
00:25:25
there I am going to make an
00:25:27
application trigger I will come back
00:25:33
here an application trigger is
00:25:36
the application that uses it in
00:25:38
this case it is the
00:25:39
windows application it is the application which must declare it
00:25:43
then at this moment the correct
00:25:44
windows application must declare it I come back in
00:25:46
my windows code and we are told in the
00:25:49
pc documentation sort out
00:25:53
intrigua receives itself declared not in a
00:25:55
button not in a window it must be
00:25:57
declared in the project code so
00:26:00
you go to the country which suits the
00:26:03
yellow ones right-click code d 'one the element
00:26:05
and it's a king stand there that you are going to
00:26:08
declare the trigger then that's
00:26:12
what I put all the time in all
00:26:13
my videos this instruction
00:26:16
I remind you is that when you create
00:26:18
an application for the first time
00:26:20
a database it is a certain
00:26:22
struction will create the files quickly
00:26:24
if they are not already created I added
00:26:27
this little instruction h mode h
00:26:30
multi mode it is an instruction which allows you
00:26:33
not to hang if several
00:26:35
applications use the same
00:26:37
database like this I will do the demo
00:26:39
with windows a mobile application if
00:26:41
one and the other axis head of modifies
00:26:43
chisholm I would like that there is not one
00:26:45
which blocks the recording so we do
00:26:47
h mode and we tell it multi mode that
00:26:51
means that we don't block the
00:26:52
recordings and now the
00:26:54
new thing if and how to create a trigger
00:26:56
is the first thing we use one
00:26:59
and only one winder h function
00:27:03
described rigorously so we is not
00:27:05
concrete intriguing but we describe it
00:27:07
then I 2h describes rigor and we say it
00:27:11
on which file so I do it on it is
00:27:14
triggered on the operation files
00:27:15
when we add by modifying surprised
00:27:17
but I tell him oh but I want to do it
00:27:19
so that an operation which to the action we
00:27:22
add here in capital letters between quotation marks
00:27:25
gmi h adds if you want which are
00:27:28
also triggered in addition to modify
00:27:31
you complain or add after adds
00:27:33
comma h modify close the quotation marks
00:27:36
if you want to do it on the three it
00:27:38
will be enough add to the capital letters comma
00:27:40
h let's modify capital letter via clouds also gets lost
00:27:43
I make a trigger on
00:27:45
the displayed operations only on the
00:27:48
additions and I give it in quotation marks
00:27:50
the name of the procedure that I created that
00:27:52
I showed you warmth and here I
00:27:56
tell him is
00:27:58
the procedure phase executed before
00:28:03
I add
00:28:04
the operation must files operations or
00:28:06
after once we have added to
00:28:08
the recording of operations after
00:28:10
the procedure or modify ground if
00:28:12
I listen there I tell it with a key word
00:28:14
here when I do that see I can
00:28:18
choose astrig hours before h league 1
00:28:20
afterwards so I want it to be
00:28:22
done we first add the recording
00:28:25
of viger operation and after we trigger
00:28:27
the execution of the modification I am told
00:28:30
in the doc that I know described rigor
00:28:32
see a nice link so I prepared
00:28:35
a variable here and then I test if it
00:28:38
makes the wafou also that we had a
00:28:39
problem I make a game displayed a
00:28:42
message that says oh my god you
00:28:43
triga could not be done
00:28:46
and there is a problem so that the coder
00:28:49
knows that if all these would have capitulated
00:28:51
we declare in the projects file in
00:28:54
the project code this function to
00:28:57
declare the trigger we have
00:28:59
previously created a procedure which will be
00:29:01
triggered here if all and afterwards in the
00:29:05
rest of the application what we are
00:29:07
doing is good to the code we add and it is
00:29:11
at this moment the window
00:29:13
the crowd is here when she adds
00:29:16
she takes care I call back she only
00:29:17
takes care of adding
00:29:19
the recording of operation sheets
00:29:21
she no longer takes care of the trailer which is
00:29:23
opposite my part what is necessary know
00:29:25
is that as soon as we exit
00:29:27
the application
00:29:29
it was at midnight the trigger no
00:29:31
longer exists because it is a price war
00:29:32
of application and after the other
00:29:34
applications you will create for it
00:29:36
as well as it declares the same thing
00:29:38
that it also declares the trigger in
00:29:41
their projects that's what I'm going to
00:29:42
show you with the noise application if it
00:29:44
was exactly the same thing the same
00:29:46
as in the mobile application I switch
00:29:49
here eh well I 'I also have a window which
00:29:53
is there so I don't close it I'm going to
00:29:56
look in the file in the
00:29:58
mobile application I do a copy and paste so
00:30:00
here in the procedures I'm
00:30:03
looking in the explorer on the left
00:30:05
I' I took the procedure by more copy and
00:30:07
paste in the windows application it
00:30:09
is called where it also modifies 5 it
00:30:12
does the same codes as in
00:30:14
the windows application objects now
00:30:16
two applications which do the same
00:30:18
procedure but each has its procedure
00:30:20
separately because each of the classes
00:30:23
plots applications so unique for
00:30:26
the application there it's the same in the
00:30:28
code of the mobile application
00:30:30
you have the impression that I wander
00:30:32
in the obligations I also create the
00:30:35
trigger but oh there I have a little problem
00:30:37
for a mobile application I create them
00:30:40
saying that it will run and under
00:30:43
android and souzy west except that when
00:30:46
I started to type that yes 9 to say ah
00:30:49
no but there it doesn't work with android
00:30:52
as os I know eh well first of all that my
00:30:54
durable daughter and now I'm going to
00:30:56
put my cursor or in the middle of this
00:30:58
function with my keyboard I'm going to do
00:31:00
f1
00:31:01
to go to the official doc of the PC
00:31:05
soft on this line on this function
00:31:07
so let's do f1
00:31:10
here I I arrive at the function where there are
00:31:12
all the explanations and I look at
00:31:14
the icons up there
00:31:16
and you see here in Windows Mobile
00:31:18
the Android TV icon
00:31:21
apparently and the gray ones and that means
00:31:24
that certain w language functions do
00:31:28
not work with all the
00:31:29
environments so the demonstration will
00:31:31
be done only for ios so that's why
00:31:36
I chose the two
00:31:37
environments and so that it stops
00:31:39
giving me a mistake I tell it everything
00:31:41
that beyond tulle I execute I typed a
00:31:44
fact too and there we did what we
00:31:48
call a conditional test this code
00:31:51
between 6 and end will only run if
00:31:53
I have you are neither os or if I do
00:31:56
the west application I have to
00:31:57
manage to do differently with
00:31:59
Android currently the trials
00:32:02
don't work for that or we do
00:32:05
the trigger servers look there it's
00:32:07
the same thing that I'm doing just now
00:32:08
I'm doing a war sort for the
00:32:11
operation file for the operation h adds the
00:32:13
function the procedure which launches and I
00:32:16
want that after the addition so I
00:32:19
simply did a copy and paste
00:32:21
exactly and to add six
00:32:25
exactly the same the window if the
00:32:28
mobile windows which has the same chances
00:32:29
as the windows application
00:32:32
which did the same thing with
00:32:34
operations added so the code of the
00:32:37
blue button if it is exactly the same
00:32:40
thing as in win win must indicate
00:32:43
on windows it is also the power of
00:32:46
wild with ew language you can
00:32:49
use the same language to go between two
00:32:52
environments without any problem so here it is
00:32:55
for a demo each time you
00:32:57
need something
00:32:58
automatic
00:32:59
after an operation on a file
00:33:01
think about triggers with our creations
00:33:03
now if you have a database
00:33:06
I will talk to you about how to make the
00:33:08
trigger servers if you see a base
00:33:10
and base it is remote and you do
00:33:12
not want to repeat the declaration and
00:33:15
rigor in all the applications at
00:33:17
that time it returns to it in
00:33:18
the application which declared the base here
00:33:21
I put myself in the analysis so imagine
00:33:24
that I have a remote database I
00:33:26
remind you that to create a
00:33:27
resistance base you must have a server either
00:33:30
you have set it up yourself or you
00:33:33
have subscriptions to pc soft with
00:33:35
pcs club or purchases do the drive at that
00:33:39
time you create an empty milk base
00:33:40
or declared here is a collection
00:33:43
the left seeing blue I can
00:33:45
right click new connections and I give
00:33:48
all the information the parameters
00:33:50
the name of the server where the milk base is located
00:33:52
data 1 the access port the
00:33:55
password identifiers etc I connect to
00:33:58
my existence base after if the
00:34:00
files are retouching the files that
00:34:02
I will switch by making description of
00:34:05
data files and I will switch the
00:34:07
files here it would be in client server
00:34:09
instead of classics that's all and
00:34:13
when I create therefore in ja I generate my
00:34:15
base given by a good analysis sorry
00:34:17
the base of istres remotely at that moment
00:34:19
and once you have a base of
00:34:22
the existence and you check that the
00:34:23
goods create or wanted to create the
00:34:25
procedures intrigue a server there will be a
00:34:29
thousand applications you will not have a
00:34:31
thousand triggers to do in the 1000
00:34:33
applications you will have to worry about
00:34:35
adding to modifying the records
00:34:36
and this is the trigger and the procedures
00:34:39
on the server which do the job not
00:34:41
how I do it I put myself here I
00:34:43
put myself drugs the analyzes and there I am going to
00:34:45
look at a list of roles which
00:34:47
is called new and there you see
00:34:49
new I am going to find here a right and
00:34:53
tells me to create a collection of
00:34:55
stored procedures I do that first
00:34:58
I give it a name there I will
00:35:00
leave it like that I will already created
00:35:01
and it gave me here see
00:35:05
stored procedures on the left I put it in blue
00:35:07
once I have done that I am going to click
00:35:09
this time on right click and I
00:35:13
tell it new
00:35:14
stored procedures
00:35:17
and at this moment I have created
00:35:19
stored procedures here and this produce store
00:35:21
well I declare things as I
00:35:23
do them for the procedures just now
00:35:25
in the application it is necessary that the
00:35:28
stored procedure and create and well you come back
00:35:31
in the analysis
00:35:32
worth redoing the euro the English analysis
00:35:36
here logo and there you choose I want to
00:35:40
create a trigger so its plots which
00:35:42
will be described and stored on the
00:35:44
database server is there and
00:35:46
you 10am which file or says for example
00:35:48
operation I pass you to the right I am
00:35:51
ok
00:35:53
it tells me that I must select
00:35:55
the procedure there yes it's true
00:35:57
I have to put myself here in the
00:35:58
general tab I tell it the trigger I'm going to
00:36:01
call it for example trig adding
00:36:03
very pledges to the operations I give it
00:36:06
a name that speaks in I saw to type
00:36:10
it adopt r as trigger underscore one
00:36:13
day
00:36:14
operation
00:36:20
here I choose the procedure here and I
00:36:24
chose the opera the operation that I want
00:36:26
then here and collection here I tell him
00:36:29
I did not create the procedure but gave him
00:36:31
the procedure you have created here
00:36:33
you tell him is the trigger going to
00:36:35
be triggered before or after and you
00:36:37
told him here at the bottom circus the operation a
00:36:41
water 2 or 3 you want to
00:36:43
trigger the procedure must for example
00:36:45
here I call it no and if you
00:36:48
imagine that I added the procedure
00:36:50
normally the procedure that they
00:36:52
judged the physical I did not
00:36:54
add so if I had added a
00:36:56
procedure I would not have added there that's
00:36:58
all and so on I do ok and at
00:37:01
that moment it's there once it's
00:37:02
created you generate the analysis and the
00:37:06
applications they start adding
00:37:09
records don't inflict an operation
00:37:11
and there's also happened it works
00:37:15
so here friends for the two ways
00:37:18
of create trigger think about that so
00:37:20
each time you have
00:37:22
automatic processing on the bases follow up with
00:37:23
updates now what I
00:37:27
'm going to touch you that I'm going to
00:37:29
add you look very well
00:37:31
don't forget to look at the first
00:37:34
comment I'm putting you on the video
00:37:36
because I'm going to provide the
00:37:39
complete doc of the Windows application and
00:37:41
the mobile application but I'm
00:37:43
also going to add the Microsoft doc
00:37:46
from two others sorry from PC soft
00:37:49
sorry there for example this links
00:37:53
official doc point software for
00:37:56
example it rigor here you mark yourself
00:37:58
two three links which you do not
00:38:01
allow you to read the yale son doc on
00:38:03
the triggers in general afterwards I
00:38:06
would put and if you see at the bottom the
00:38:09
link for the sorters applications the
00:38:11
link will protect servers and that will be all
00:38:13
I hope this has brought you some
00:38:16
clarification something new
00:38:19
in your computer knowledge
00:38:22
do not hesitate now here I
00:38:25
tell you do not hesitate to suggest to me
00:38:28
subjects which are important to you heart for
00:38:29
the next videos ciao ciao ciao see you
00:38:31
soon

Description:

Savez-vous ce que c'est le Triggers ? C'est un mécanisme extraordinaire dans la gestion des données dans une BD. Ici, à travers des explications claires et un exemple concret en Windev, vous allez aimer utiliser les triggers. Vos compétences augmentent avec les triggers. Enjoy

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Best WinDev :WM 16 : Triggers ?" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Best WinDev :WM 16 : Triggers ?" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Best WinDev :WM 16 : Triggers ?" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Best WinDev :WM 16 : Triggers ?" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Best WinDev :WM 16 : Triggers ?"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Best WinDev :WM 16 : Triggers ?"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.