There is another Russian one, which is quite promising in terms of the form and components, but it has three drawbacks.

1. It only works with Access databases.

2. It is really difficult at the moment to make your own form, altering the existing examples is possible.

3. The developer hasn't upgraded it for a year or so.

Dybase  - lucasproject  www.dybase.ru


Now if Dmitry and Lucasprojects got together, they could develop a super RAd database program.

vit007 wrote:

А нельзя через скрипт, чтоб автоматически открывался браузер по умолчанию.

При нажатии на гиперссылку автоматически открывается браузер по умолчанию.

An example

procedure frmMain_lbWebpage_OnClick (Sender: TObject);
var
    webpage:string;
begin
  
  webpage := frmMain.lbWebpage.Caption; 
  OpenURL(webpage);
end;

Здесь у меня есть метка, которая при двойном щелчке по гиперссылке открывает URL-адрес в браузере по умолчанию.

53

(9 replies, posted in Russian)

Here is another way

form1.DatePicker2.DateTime := form1.DatePicker1.DateTime + EncodeTime(1,0,0,0);

As for the Edit text.  Что касается текстового поля редактирования

form1.Edit1.text := TimeToStr(form1.DatePicker1.DateTime);

54

(3 replies, posted in Talks about all)

Looks very snazzy

55

(1 replies, posted in Russian)

There is a

form1.Canvas.Rectangle(X1,Y1,X2,Y2)

56

(6 replies, posted in General)

Hmm, 2020 was a leap year, if you use 2024 do you get the same problem?

57

(5 replies, posted in FAQ)

Hi,

I assume you had the mySQL server running?

58

(6 replies, posted in General)

This error means you have entries in other tables linked to the entry you want to delete.

You need to delete those other entries first and then you can delete the master entry last.

59

(5 replies, posted in FAQ)

What browser and version are you using?

Could you post a picture of the error?

I might have misunderstood, but if Remainder_OnShow is your renamed Form1, you need to change

Возможно, я неправильно понял, но если Remainder_OnShow - это ваша переименованная форма Form1, вам нужно изменить

TTimer.Create(Form1)

To

TTimer.Create(Remainder_OnShow)

61

(3 replies, posted in General)

I don't think it is, because the Pascal script doesn't appear to have direct access to Windows Handles.

Hello Lejoso,


If you are updating a tablegrid you could do the following.

procedure dbUpdateTimer;
var
    indx,cnt : integer;
begin
  {updates any tablegrid no matter what its name onfrmMain}
  cnt := frmMain.ComponentCount -1;
  for indx := 0 to cnt do
  begin
    if frmMain.Components[indx]  is TdbStringGridEx then
        TdbStringGridEx(frmMain.Components[indx]).dbUpdate;
  end;    
{end of frmMain updates}

{manually update other forms}                                                                                          
  frmOrderEntry.grdOrder.dbUpdate;
  frmEditAssemblies.tgMasterPart.dbUpdate;
  frmEditAssemblies.tgSubPart.dbUpdate;
  frmEditPart.grdEditPart.dbUpdate;
{end of manual update other forms}
  //showmessage('databases updated');
end;

This code automatically updates all tablegrids in the program every 30 seconds or so. The timer is set up elsewhere.

If you don't want to do that, all you need to do is add the line

FormName.TableGridName.dbUpdate

in an event such as after_click  etc.

63

(7 replies, posted in Script)

Just a quick question, if you are wanting to save the image to the database, why aren't you using the dbImage component?

Using this would make your life much easier.

64

(12 replies, posted in General)

v_pozidis wrote:

A stupid question. What do you mean WAL???

I can answer your first question easily.  WAL stands for Write Ahead Logging, which allows SQLite to have multiusers access it.

However, these are special cache files that it writes, and won't automatically commit users data changes to the database. It basically will wait until the last user has closed their connection with the DB (with MVD that is just closing the application) and then it updates the database. I believe it commits data to the database as the cache reaches a certain point.


As for your other question, I'll have to think about it and maybe someone else can answer off the top of their head.

65

(12 replies, posted in General)

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.

66

(12 replies, posted in General)

You could try putting SQLite into 'WAL' mode, this might help.


Just a warning, if you intend to have the SQlite database file on a network share drive and an IT department runs a cache clearing program in the background, you will lose data and get locked database messages.


If there is no cache clearing program is running, then there shouldn't be any problems.

To enable WAL mode in sqlite, open your database in a database browser such as DB Browser for SQL Lite and type in under the SQL tab

PRAGMA journal_mode = WAL

Close the browser and when you next open your program you will see 3 extra files appear, these are the caching files.

If this doesn't work for you, then to disable Write Ahead Logging open the DB browser and type into the SQL tab


PRAGMA journal_mode=DELETE

67

(4 replies, posted in General)

Do you want the combobox to be hard coded or get the values from a table?


To hard code use this for example:

procedure frmRelationship_OnShow (Sender: TObject; Action: string);

begin
  

    frmRelationship.cmbRelationship.Items.Add('Sister');
    frmRelationship.cmbRelationship.Items.Add('Brother');
  
end;

Change frmRelationship  to your form name.


Change cmbRelationship to your combobox name.

68

(12 replies, posted in General)

Are you using SQLite or MySQL?

69

(0 replies, posted in General)

I'm unsure if this is expected behaviour, but I decided to change an existing table from a DATE field type to a DATE/TIME one.


This causes the table to be deleted in the database and a table labelled  table_name_tmp1 to be created which of course is empty.  Now this table does contain calculated fields and foreign keys and I wonder if that is why MVD is behaving as it is.

Another table that I made the same alteration to in the same database, accepts the alteration without deleting the table.


Is this expected behaviour by MVD?

Obviously SQLite itself doesn't know about date types and considers them to be text, so I think it strange that MVD should do what it appears to be doing.

70

(3 replies, posted in FAQ)

Thanks EHWagner,


Your code is far more compact than what I was about to write. Though mine was going to include buttons that could be acted upon.

71

(1 replies, posted in Russian)

Assuming the file link is not in a database and you just want to click on a button to open a file or folder, try


var
  fName :string;
 dir : TOpenDialog;

begin

    dir := TOpenDialog.Create(nil); {Creates and instance of TOpenDialog using dir as the variable}

    try
        
        fName := dir.files;   {Get the file name that is selected in the Open Dialog form}
        
        OpenFile(fName);  {This will open the file with whatever the default program is for the file}
     finally
      dir.Free;    {Free all the resources.
      
end;

There are many other options that can be used with both TOpenDialog and OpenFile. For example you can set a default folder to search, or a filter to only search for certain file types.  You can also if needed allow multiple selecting of files, but as the code above stands, the OpenFile function wouldn't work then.


Предполагая, что ссылка на файл отсутствует в базе данных, и вы просто хотите нажать кнопку, чтобы открыть файл или папку, попробуйте.


Есть много других опций, которые можно использовать как с TOpenDialog, так и с OpenFile. Например, вы можете установить папку по умолчанию для поиска или фильтр для поиска только определенных типов файлов. Вы также можете, если необходимо, разрешить множественный выбор файлов, но, как показывает приведенный выше код, функция OpenFile тогда не будет работать.

72

(2 replies, posted in General)

Hi Derek,


What you have suggested was my original idea, and then I thought I'd use the MessageDlgTimeOut  function, which would have been perfect if I hadn't discovered it doesn't return the 'flags' value (http://myvisualdatabase.com/forum/viewt … 199#p40199) .


I'll see how my current incarnation goes using the above function to close the program, and if it turns out the users are even more incapable in using a logout button than just closing the program, I'll institute my own close program timer with code similar to yours.


Thank you for the reply.

I have had to instigate a logout button in my little program and it struck me that when someone has logged out, it  would be a nice touch to allow them to log in again in case they had hit the logout button accidently.


The built in login form can be re-introduced by

frmDBCoreLogin.Show or ShowModal

, however as the main form is still open the login form is not able to work.


Apart from building my own login form, can anyone out there in MVD land think of a way to press the inbuilt login form into service to allow a relogin in?

74

(3 replies, posted in FAQ)

MessageDlgTimeOut(msg,caption,flags, milliseconds).

I think this function is missing an integer return!


As it stands, the buttons that are displayed cannot be interrogated, which makes displaying them pointless.

I have discovered that 'flags' is actually the button type constants to be displayed =.

0 =  OK
1 =  OK, CANCEL
2 =  ABORT, RETRY, CANCEL
3 =  YES, NO, CANCEL
4 =  YES, NO
5 =   RETRY, CANCEL
6 =   CANCEL, TRY AGAIN, CONTINUE

It would also be nice to perhaps have the option of displaying no buttons, in which case the function becomes a timed dialog message box.

I'm using v6.5

75

(72 replies, posted in General)

#13  =  the ASCII instruction to return the printing position to the beginning of the typed line.  This is what was known as a Carriage Return when using typewriters, and for programming can be seen  abbreviated as CR  in some texts.


Remove them from the code and see the difference in text positioning.