101

(2 replies, posted in General)

Not sure if I understand what you want to do or even why you would want to do it that way, but in its simplest form see attached. I did not define or save anything to a database table because I am not sure what exactly is suppose to be stored.

102

(1 replies, posted in Script)

Form1.btnSave.click;

103

(5 replies, posted in FAQ)

javeriya1695,
As tcoton mentioned, is there any data in the database table being imported. In other words, is there any data present in the physical table after the import. I'm not talking about the tablegrid, but the actual table. You may need to parcel out some of the script to see where the breakdown is.


It is very difficult to debug a project without the project. It would be beneficial if you could attach your project.

104

(5 replies, posted in Script)

unforgettable,
Just place the word OR in between.

sales.id_Category= 6 or sales.id_Category= 2 or sales.id_Category = 8

105

(1 replies, posted in General)

Hedan,
I haven't had the problem.

106

(3 replies, posted in General)

Frank,
I am not aware of being able to use aliases. I probably wouldn't use it anyway. I like seeing which table a field comes from so not to get it mixed up with another field with the same name in another table. But that's just my preference.

107

(10 replies, posted in SQL queries)

rbknathan,
Just curious. What is wrong with Derek's solution? Why do you need row number?


I am attaching another way, but I really do not understand the necessity of having a number in the combobox. I added onto Derek's example (Thank you Derek).

108

(2 replies, posted in General)

Frank,
In the Object Inspector for your SAVE button, uncheck the DEFAULT checkbox.

109

(5 replies, posted in Script)

You can also you use SQLQUERY on a button action.

110

(20 replies, posted in General)

Derek,
I cannot replicate your problem with both rtf and images. I added records with rtf's. Then go back and added images. I did various combinations and the scrolling shows both the image and rtf just fine. I'm on version 6.3. Don't know if that has anything to do with it.

111

(7 replies, posted in General)

Frank,
You need to include the cboState field in the SAVE RECORD action of your SAVE button. It's an easy oversight even for veteran developers.

112

(3 replies, posted in General)

I resolved this issue. I emptied the tables and it worked fine. There was something in the import which must have caused the error. It was only test data that was imported and I didn't have the time to try to figure out why MVD didn't like the imported data. Everything is good now and the production version is working fine.

113

(1 replies, posted in General)

dan.hdez.rdez,

1.- That the import from an excel that is in the form1 can have it in the forminicio page tab colima

Not sure what you mean here. But since we don't have access to your MySql database we'll have to try to test with Sqlite. Do you have a copy of your Excel spreadsheet that you can upload for us to use.


2.-My project does not request the connection data to mysql, every time I try to test it asks for the connection data.

You can connect through script by doing the following:

procedure Form1_OnShow (Sender: string; Action: string);
begin
     frmWait.Show;
     Application.ProcessMessages;

     {$MySQL disable_connectdialog}
     Form1.MySQLConnection.Server := '127.0.0.1';
     Form1.MySQLConnection.Port := 3306;
     Form1.MySQLConnection.Username := 'root';
     Form1.MySQLConnection.Password := 'root';
     Form1.MySQLConnection.Database := 'mvd';

     try
         Form1.MySQLConnection.Connect;
     except                                                                    
         frmWait.Close;
         ShowMessage('Can''t connect to database.');
         Form1.Close;
     end;

     if Form1.MySQLConnection.Connected then
     begin
         UpdateDatabase(''); // to fill ComboBoxes
         Form1.GridEmployees.dbUpdate; // if you have TableGrid on first form with option "Enable auto execution", you should call method dbUpdate manually
     end;
     frmWait.Close;
end;

3.- know if it is possible to eliminate the start menu or remove the about and other menus at the top.

To remove the standard menus in MVD you can use the following script:

Form1.mniFile.visible := false;
Form1.mniClose.visible := false;
Form1.mniOptions.visible := false;
Form1.mniSettings.visible := false;
Form1.mniReport.visible := false;
Form1.mniExportData.visible := false;
Form1.mniImportData.visible := false;
Form1.mniAbout.visible := false;

114

(7 replies, posted in General)

Frank,
A relationship needs to be established between contacts and states so the combobox can be used as a lookup. Also, the tablegrid needed to bring in the state name from the state table. Fixed project is attached.

115

(2 replies, posted in General)

agusecc,
According to Dimitry the new versions of Windows does not allow you to change the color of buttons and checkboxes. For checkboxes what I do is clear the caption in the checkbox properties and then insert a label next to the checkbox. Then you can make it any color you want. Doing it this way, you can place the label on either side of the checkbox.

116

(12 replies, posted in SQL queries)

My apology. I see two errors in my statement. Change the second formatter to 'YYYY-MM-DD'. I was missing the 4th Y and it should be single quotes around it.

117

(12 replies, posted in SQL queries)

unforgettable,
Dates in databases are stored in the YYYY-MM-DD format so you need to reformat your datetimepickers in that format.


form1.Edit1.Text:= SQLExecute('Select Sum(svalue) from Sale Where Date(Date1) >= "' + FormatDateTime('YYYY-MM-DD',Sale.datetimepicker1.DateTime) + '" and Date(Date1) <= "' + FormatDateTime('YYY-MM-DD'',Sale.datetimepicker2.DateTime) + '"');

118

(11 replies, posted in General)

papafrankc,
Welcome aboard. No need to abandon MVD. It can handle most any situation. What you want to do is quite simple. See attached project for an example of what you are trying to do. It is a very simple setup. MVD gives you various ways to show/update info. But as far as the database relationship, you should set the relationship on the child table (addresses) pointing to the parent (users). Click on dbschema button in the database tables tab to see how the relationship is defined.


Hope this helps. If you have any other questions, don't hesitate to ask. There are many people on here to assist.

119

(9 replies, posted in General)

Adam,
Sounds did not work because you didn't have any code to play any sounds. I created a sound folder and put a sound in there. Code was inserted to play a sound when the task reminder time arrives.

120

(9 replies, posted in General)

Adam,
I didn't look into that part of it. I only concentrated on the popup message part. I'll take a look at it. Probably tomorrow sometime.

121

(9 replies, posted in General)

Adam,
Revised project attached. I changed you timer procedure a little. One thing was your date comparison needed to compare date format as 'YY-MM-DD'. You have the option to pick an alternate message so I put in a check for the alt text to be displayed if the checkbox is checked. Also, you need to be able to check for an alert notification for a task if the date/time has passed while the program is not running. So if a date and time has passed when you start the program you will get a notification immediately. And finally, you need a way to shut off the reminder otherwise you will get notified every second. So I put in an update to set the reminder datetime to null after notification.


I also put in a doubleclick procedure for the tasklist tablegrid in order to be able to edit from the tablegrid. This may be needed if you have overlapping tasks.

122

(3 replies, posted in General)

I think this may be a question for Dimitry. I created an MVD project using a MySql database. It works fine on my localhost. I uploaded the database to an online service. My app connects to the online database just fine, but I get the attached error message. It shows that the table does not exist, but it does. PhpMyAdmin shows that the tables are definitely in the online database with all the data. The database name is "sql9353369" and it looks like MVD appends it to the tablename. Any idea what the cause and solution? Thank you in advance.

123

(26 replies, posted in General)

unforgettable,

First we can create more than two field on category table?

Yes you can add any number of fields.


We can add 'service' field?

Yes you can add Service field. I'm not sure what it means or how it is to be used, but you can define it on a table.


how can we add Grand Total, discount

You can add discount to the Sales Ticket and have a calculation to subtract it in the Sales Ticket form.


receivable and balance

The short answer is YES. However, you are getting into more sophistication in your project. It seems like what you were putting together was a simple Point-of-Sale project with the ability to report on profit and losses on sales. But now when you mention "receivables and balance", you will need to incorporate more data tables and processes. If you want to maintain receivables and balances of what is owed, you will now need to define a Customer table and probably an invoice table, at minimum, and of course new forms and reports to take care of the processes. This all can be done in MVD, however my time is limited on the forum. If you can elaborate more on the design of your total application, I will try to put something together for you to at least get you headed in the right direction, but I can't guarantee my time. Piecemealing little bits at a time is not good for an efficient application development. Things like I mentioned in my last post with the dates in two different tables is not good database design. This kind of thing can happen when a design is not totally in place or known. Maybe you do have it all designed and I just do not know it. It just makes it more difficult on this end to come up with good solutions.

124

(26 replies, posted in General)

unforgettable,
In order to group multiple sales items into a single sale I created another table called Sales_Tickets. Each ticket can have one or more items sold. I included a print for each ticket. However, I know nothing about thermal printers, but I would assume that the report can be printed directly onto a thermal printer if it is attached to the computer/network you are using for your project.


As a footnote, since the sales items include a date, I put in script to keep the sales items date in synch with the sales ticket date. The sales items date probably should be removed and only use the sales ticket date. I did not remove it because I didn't want to interfere with the already defined income / expense forms and summaries. Not enough time on my part to redesign it. Hope this helps.

125

(2 replies, posted in General)

v_pozidis,
The timetable tablegrid can only show two overlapping appointments in an hour time slot. You can have more than one appointment at the exact same time (not sure how that is humanly possible - lol, just kidding), but you will only see one in the timetable tablegrid. You can see that there is at least one appointment, but you can't split the cell to show the other ones. You can however see the multiple appointments in the appointment list (tablegrid2). I did modify the project to allow you to maintain the appointments from the appointment list for those situations where you might have multiple same time appointments. You can double-click in the appointment list to edit and right click to delete. I hid your edit and delete buttons because they are only used for the timetable tabelgrid (tablegrid1) and not the appointment list tablegrid (tablegrid2). They are activated by double clicking or right-clicking in the timetable tablegrid. The add button remains as is.