Hi
I know what "New Record" means. there is a project in Database Application of this forum named "Student Performance Database" and I also attached it for you.
In the form "frmStudent" there is a save button and it also has a Table Grid and the Table Grid has an "Add" Button
could you please write an script that when you press the save button without filling "edLastname" , a message is shown that says "Fill in the last name".
Only when the save button is clicked, this message should be shown not when you press "Add" Button.
thanks
101 2016-01-30 05:03:34
Re: Avoid empty data being recorded (25 replies, posted in Script)
102 2016-01-29 20:57:53
Re: Avoid empty data being recorded (25 replies, posted in Script)
thanks but you did not correct the bug, you just erased it.
The Whole idea was to correct the project without changing it because in form1 of my project there is a save button and without filling the text1 button you can't save it. but there is also a Table Grid in that form and TableGrid has a New Record Button which opens form2.
the error is:
only when you press Save Button the message "Fill in the blank" should appear but when you press the New Record Button the message still appears
I attach a simple version of my project. please do not delete the buttons, just correct the error of the "New Record Button"
103 2016-01-28 18:25:22
Re: [Script] Automatic backup database (12 replies, posted in FAQ)
thank you so much for your help
can I use the CopyTo command for images as well?
I don't want the pictures to be saved in the database but my version does not have LinkFile for the images.
104 2016-01-28 11:45:27
Re: [Script] Automatic backup database (12 replies, posted in FAQ)
hi
I made a backup folder in the same folder as my project and then I insert this script and it works fine.
is there any way that the script make a backup somewhere other than the project folder? for example :
D:\new\backup
105 2016-01-28 09:27:18
Re: [Script] Automatic backup database (12 replies, posted in FAQ)
Hi
I used this script but it does not work for me. I guess it's because I use version 1.45 which does not have copyTo command.
is there any other script to make a backup using version 1.45?
thanks
106 2016-01-27 19:25:39
Re: no such column error (5 replies, posted in General)
Hi jean.brezhonek
I didn't quite get the script. What does it do?
how can I use it? could you give me the whole script and tell me where to place this script?
thanks
107 2016-01-27 18:17:39
Re: no such column error (5 replies, posted in General)
yes I have a very specific reason to do it
the reason is my version of this program is 1.45 and it does not have link file or copy to
now that you know my reason, could you please help me get rid of this error
thanks
108 2016-01-27 16:40:23
Topic: no such column error (5 replies, posted in General)
Hi
Every time I want to edit a record from the table grid this error is shown:
no such column: terminals.id_pictures
as you can understand I have 2 tables: terminals and pictures
I like to save my pictures in a separate table
In the field type section of the table terminals, I defined a relationship to the picture table and I didn't check the not null part.
what am I doing wrong?
by the way, if I save my pictures in a separate table, does it increase the speed of the loading of the project?
thanks
109 2016-01-27 14:18:24
Re: saving images in a new folder (9 replies, posted in Script)
Hi mathmathou
thank you for your help
I have 2 questions in mind?
1) if I make a separate table for the images, will the speed of the database go up or it doesn't matter if the images are stored in the original table or in a separate table only with images?
2) you said (Unless you manually, and by script, attach a second database to your project, everything goes into the sqlite.db file)
how can I use a script to store the images in another file or database? the version I use is 1.45 and it doesn't have linkfile.
is there any script regarding storing images in another file because in my project there are approximately 1000 pictures and the size of the sqlite.db is about 1.5 Gigabyte therefor every time I want to check a record I have to wait a lot.
thank you
110 2016-01-26 16:29:09
Re: password (7 replies, posted in Script)
I tried it but it does not work . the password is still numbers. is this scrip is for the version 1.45?
111 2016-01-26 12:11:02
Re: Running the project in full screen (5 replies, posted in Script)
thank you
I have tried this code but only the window is shown in full screen
what i need to do is that all of the items in the form1 are shown in full screen
your code does the same as when I check the sizeable checkbox in the properties section of the form1
are there any other scripts?
thanks
112 2016-01-26 11:37:41
Re: Running the project in full screen (5 replies, posted in Script)
hi
I use version 1.45 and the for does not have Boderstyle and windowstate
What should I do?
is there any scripts that help me?
thanks
113 2016-01-26 08:00:03
Topic: database is locked (9 replies, posted in General)
Hi
something went wrong with my project.
whatever I do to save a record it says "database is locked"
the version I use is 1.45 which is a freeware
114 2016-01-26 05:21:40
Re: password (7 replies, posted in Script)
Hi derek
could you please tell me the complete scrip of showing stars instead of the password?
My scrip for password is :
procedure frmLogin_bLogin_OnClick (Sender: string; var Cancel: boolean);
begin
if frmLogin.edPassword.Text = '1366' then
begin
frmLogin.Hide;
Form1.Show;
end else ShowMessage('Wrong Password');
end;
115 2016-01-25 20:58:48
Topic: Running the project in full screen (5 replies, posted in Script)
Hi
Is there any way that the project runs in full screen in every computers?
thanks
116 2016-01-25 20:31:20
Re: password (7 replies, posted in Script)
Hi
The Password form is OK
when I insert the password, the numbers are shown, is there any scripts that instead of numbers or letters, some stars are shown?
thanks
117 2016-01-25 08:05:59
Re: searching the checkboxes (5 replies, posted in Script)
thank you so much
I have corrected your query myself. it works fine
SELECT
employees.lastname,
employees.firstname,
employees.id
FROM
employees
WHERE
(CASE WHEN {chbYes} = 1 THEN employees.yes = 1 ELSE 1=0 END) OR
(CASE WHEN {chbNo} = 1 THEN employees.no = 1 ELSE 1=0 END) OR
(CASE WHEN {chbAlmost} = 1 THEN employees.almost = 1 ELSE 1=0 END) OR
(CASE WHEN {chbMaybe} = 1 THEN employees.maybe = 1 ELSE 1=0 END)
118 2016-01-25 05:34:33
Re: searching the checkboxes (5 replies, posted in Script)
thanks for your help
but this query does not work
it just works for "yes" checkbox and when I choose "no" or "almost" or "maybe" it shows all of the records.
what I want to do is that: for example
when I check "yes" the query shows all the "yes" records
when I check "no" the query shows all the "no" records
when I check "yes" and "no" together, the query shows all the "yes" and "no" records
when I check "yes" and "no" and "almost" together, the query shows all the "yes" and "no" and "almost" records
and so on
119 2016-01-24 17:50:20
Re: searching the checkboxes (5 replies, posted in Script)
Thanks for your reply
In the version i use which is 1.45 combobox does not have multiselect value.
Could you please tell how can I use SQL query for search?
Thank you so much
120 2016-01-24 08:55:38
Topic: searching the checkboxes (5 replies, posted in Script)
Hi
In my project there are 4 check-boxes:
1- Yes
2- No
3- Almost
4- Maybe
this project has 100 records and in each record I should choose only one of the checkboxes.
when In the form1 I want to search the records, for example when I choose the "Yes" chockbox or "No"checkbox the records are shown.
But when I choose both of the checkboxes together or sometimes all the checkboxes at the same time, no record is shown.
What is the script that whenever I need to search the records if I click all 4 of these checkboxes or 2 of them, all of the records are shown in the table grid
thank you
121 2016-01-23 04:28:01
Re: Avoid empty data being recorded (25 replies, posted in Script)
Hi tcoton
I have checked my project but button "New Record" name is button2 and button "save" name is button1
the script says that only button 1 should show the message but both of the buttons show the message.
I have attached a simple version of the project which is somehow like my project. can you correct it?
thanks
122 2016-01-22 20:19:02
Re: saving images in a new folder (9 replies, posted in Script)
thanks mathmathou for your reply. I have 2 questions in mind
1)
What do you mean by "make a separate table just for images" ?
If I make a separate table, images are still saved in the file "sqlite.db". Isn't it?
What can I do to make "sqlite.db" smaller in size?
2)
What is the script to VACUUM the image table?
thanks
123 2016-01-22 20:10:56
Re: Avoid empty data being recorded (25 replies, posted in Script)
Hi
your script works fine and thanks for your reply
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
if Form1.Edit1.Text = '' then
begin
Cancel := True;
ShowMessage('Fill in the Blanks.');
end;
end;
but in my project apart form the save button, there is also a button defined as "New Record"
whenever I push the save button, the message ('Fill in the Blanks.') is shown and that's OK
But when I press the "New Record" button, this message is also shown. What should I do to get rid of seeing this message when I press the "New Record" button
thanks
124 2016-01-21 04:30:10
Re: saving images in a new folder (9 replies, posted in Script)
hi
I have made a project which is very important for me, and the version I used for this project is 1.45
Is there any script for the pictures to be saved in a folder in this version?
I know that in the newer version of this program, the linkfile is enabled for the images but I can't upgrade it I don't have enough money to pay for it? I'm so sorry
125 2016-01-20 04:49:32
Re: avoid repeated data (8 replies, posted in Script)
hi
I have found a solution to my first problem which was about seven similar textboxes but the second problem still exist
could you please help me with that
in the script you wrote (duplicate check) it works fine when you enter all of the text boxes unfortunately if for example one of the textboxes is left blank then your script does not show the alert and it saves the entry anyway.
suppose that I have seven textboxes and only some of them should be filled with figures so what I want to do is that :
for example In one entry I fill the text boxes like this:
edit1= 100
edit2= 200
edit3= 300
edit4 and5 and 6 and 7= blank
then I save the first entry
when I open the second entry and fill the edit tabs like my first entry, I want the project to show an alert that says "you have recorded these numbers before"
sometimes I need to fill all of the seven textboxes with numbers and sometimes only 3 or 4 of them should be filled and others should be left blank. Is it possible?
I also want to define a button that checks if the numbers are repeated or not
for example if they are repeated the script says "you have recorded these numbers before"
and if the numbers are new the script says that "you did not record these numbers before"
what is the scrip for this button?
thank you so much