1

(12 replies, posted in General)

CDB wrote:

vanadu55,


You need to copy the following files to a folder on each client workstation in addition to your EXE file (Don't put them on the desktop).

1. Script folder containing just the dcu file.
2. Forms.xml .
3  sqlite3.dll .
4. Settings.ini
5. Any graphics.dll  if it exists +  image files if they exist.


Now you can either manually change the server path  to the database in the settings.ini file or install on one PC, run the program and then follow the dialogue prompts when your program can't find the database.  Once you have one settings.ini file set up, you can just copy that one to each PC.


Once that is done then you can place a shortcut on the desktops if you so wish.

Thanks for the explanation!

2

(12 replies, posted in General)

ehwagner wrote:

m.alin,,
Try placing the app on the client workstations, but keep the database on the server.

Can you tell us more how to do that? If i move the app to the client workstations how do they link to the database on the server?

Thanks in advance.

CDB wrote:
vanadu55 wrote:

Thanks. I've figure it out by myself.


What did you do to get it to work?

It was quite simple, really and it was in another post here in the forum:

procedure Form1_Button5_OnClick (Sender: string; var Cancel: boolean);
var
id: integer;
begin
 id := Form1.GridEmployees.dbItemID;
 SQLExecute ('DELETE FROM employees WHERE id = ' + IntToStr(id));

Form1.GridEmployees.dbUpdate;
end;

Thanks. I've figure it out by myself.

DriveSoft wrote:

Multiple select records in TableGrid for removing


procedure Form1_Button5_OnClick (Sender: string; var Cancel: boolean);
var
   i,c: integer;
   iColumn: integer;
begin
     iColumn := Form1.GridEmployees.Columns.Count-1; // in last column stored id of record (last column hided)

     c := Form1.GridEmployees.RowCount - 1; // count of records in TableGrid
     for i :=0 to c do
         if Form1.GridEmployees.Selected[i] then // if record selected
            SQLExecute('DELETE FROM employees WHERE id = ' + Form1.GridEmployees.Cells[iColumn, i]); // SQL query for selected record

     Form1.GridEmployees.dbUpdate;
end;

begin
     Form1.GridEmployees.Options := Form1.GridEmployees.Options + goMultiSelect;
end.

This code does not work in MVD version 6.4 in version 6.2 works without any issue. It gives an error message near " ":syntax error on SQLExecute on DELETE FROM employees Where id = .

Can someone help to fix this code for MVD 6.4?

Thanks in advance.