Topic: Some Questions!

Hi,

I have some simple Questions :

1 - How can I make a new record, from another record! for example we have a record type called OFFER, and another one called INVOICE!
so when customer accept our offer we should make an invoice from that offer!

2 - how can we protect scripts/project in MVDB ?

3 - Is it possible to use 3rd party softwares in MVDB and use those softwares return values in MVDB ? (Normally command line tools)

4 - How can I import from Excel,CSV,XML,etc ... into my project ? or simply how can we have some simple import function (Manually or automatically from source) it is very usefull for softwares that they work with Barcode Scanners ore integration with other softwares smile

5 - Is it possible to have multiple search ? I mean search multiple values in textarea, for example write 5 ID per line and load those 5 items in grid smile

Thanks a lot smile

Re: Some Questions!

any Idea ?

Re: Some Questions!

Hello,


1. Example for you, how to make duplicate record from selected record of TableGrid and on edit form
http://myvisualdatabase.com/forum/misc. … download=1


2. You can remove file script.pas to protect your script against changes by users, for works your project enough file script.dcu


3. Unfortunately I don't know the way to get values from 3rd party software using command line.


4. http://myvisualdatabase.com/forum/viewtopic.php?id=1448


5. Yes, using script you can create any SQL query, including multiple values search, unfortunately I don't have this example.

Dmitry.

Re: Some Questions!

Thanks a lot smile
Dear dimitri,
I dont want to get values from 3rd party softwares using Command line! I just get values from them directly! CMD was an example!
I want something like EXEC function in PHP, is it possible with MVDB ?

and another question is, I want to have a auto search function, when users type in text field with onchage event submit search button! how can I do it ?

and I just need to know how can I change MYSQL database connection informations ?

Thanks a lot and have a lovely day smile

Re: Some Questions!

sonixax wrote:

Thanks a lot smile
Dear dimitri,
I dont want to get values from 3rd party softwares using Command line! I just get values from them directly! CMD was an example!
I want something like EXEC function in PHP, is it possible with MVDB ?

3rd party softwares must have some mechanism to return values outside, MVD can't do nothing if application don't support this.


sonixax wrote:

and another question is, I want to have a auto search function, when users type in text field with onchage event submit search button! how can I do it ?

Components like TextBox, Memo, ComboBox have propertis "Increm. Search" for that, more info:
http://myvisualdatabase.com/help_en/com … earch.html


sonixax wrote:

and I just need to know how can I change MYSQL database connection informations ?

Thanks a lot and have a lovely day smile

Example:

     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
         ShowMessage('Can''t connect to database.');
     end;
Dmitry.

Re: Some Questions!

3rd party softwares must have some mechanism to return values outside, MVD can't do nothing if application don't support this.

Thanks for your answer,
In this case all command line commands and tools print out the results!
for example there are a lot of GUI that run ffmpeg and use ffmpeg print results to show in GUI!
I want to do the same.

and I want to know is it possible to store mysql connect infos in sqlite database and use them to connect to mysql ?
I mean using Sqlit and Mysql in the same time ?!

also, is there any way to populate combobox values without using any table ?

Thanks a lot smile

Re: Some Questions!

sonixax
Unfortunately I don't know which method using ffmpeg for that.



Example, how to connect to MySQL for beta version 2.6
http://myvisualdatabase.com/forum/viewtopic.php?id=2462

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
    MySQL: TMyConnection;
begin
    MySQL := TMyConnection.Create(Form1);
    MySQL.Server := '10.10.10.10'; // ip address of MySQL server
    MySQL.Port := 3306;
    MySQL.Username := 'username';
    MySQL.Password := 'password';
    MySQL.Database := 'databasename';
    MySQL.LoginPromt := False;

    try
        MySQL.Connect;
    except
        ShowMessage('Can''t connect to database.');
    end;

    if MySQL.Connected then
    begin
       Form1.TableGrid2.dbMySQLConnection := MySQL;
       Form1.TableGrid2.dbSQL:='SELECT id, lastname, firstname FROM employees'; // the id field, want to be able to edit or delete the entry from the table component
       Form1.TableGrid2.dbGeneralTable := 'employees';
       Form1.TableGrid2.dbListFieldsNames :='delete_col,Фамилия,Имя';
       Form1.TableGrid2.dbSQLExecute;
       MySQL.Disconnect;
    end;
end;
Dmitry.

Re: Some Questions!

Thanks a lot smile
Dear Dimitri,
is there any way to populate comboboxes without using tables and database ?
Thanks again smile

Re: Some Questions!

sonixax wrote:

Thanks a lot smile
Dear Dimitri,
is there any way to populate comboboxes without using tables and database ?
Thanks again smile

Yes, use method dbAddRecord

Allows you to add value to the list with the specified ID. It is important to understand that the value is not added to the database.

Example:

 Form1.ComboBox1.dbAddRecord (1, 'Item 1'); // adds value to the ComboBox, with ID = 1 and the text "Item 1"
Dmitry.

Re: Some Questions!

Hello Dimitri
I'm developing a project to keep track of the activities carried out by others, but these are in other cities of Venezuela, I can put sqlite.db in a shared folder in DropBox? s is feasible and would place the route Menu Options

Re: Some Questions!

gamalier_ramirez wrote:

Hello Dimitri
I'm developing a project to keep track of the activities carried out by others, but these are in other cities of Venezuela, I can put sqlite.db in a shared folder in DropBox? s is feasible and would place the route Menu Options

Hello,


No, you can't use dropbox for that. In your case you should use MySQL database.
SQLite works only in local network like file server.

Dmitry.

Re: Some Questions!

Hi,
Dear Dimitri,
I just wondering how can I have some login page + special admin page ?

I mean user / admin system!
and I just want to add username to the records that users made!

here is the plan :

we have a company with some employees!
so the CEO is admin and other employees are just users.

CEO define a username for employees and employees can login to the software with their username/password.
and there is a grid which is connected to a table and save every users movement on the rocords on it! , (Example : User 1 - create sample record - User 2 - Edit sample recrod change value 1 to value 2, etc ...)

is it possible at all ?

Thanks a lot smile

Re: Some Questions!

Hi Dimitri

How i can use MySQL whit MVDB

And how Create and configure my Database MySQL in MDV

Thank's

Re: Some Questions!

sonixax wrote:

Hi,
Dear Dimitri,
I just wondering how can I have some login page + special admin page ?

I mean user / admin system!
and I just want to add username to the records that users made!

here is the plan :

we have a company with some employees!
so the CEO is admin and other employees are just users.

CEO define a username for employees and employees can login to the software with their username/password.
and there is a grid which is connected to a table and save every users movement on the rocords on it! , (Example : User 1 - create sample record - User 2 - Edit sample recrod change value 1 to value 2, etc ...)

is it possible at all ?

Thanks a lot smile

Please check out this topic
http://myvisualdatabase.com/forum/viewtopic.php?id=1600


and an example:

Post's attachments

Attachment icon Login with protect own records and admin.zip 41.53 kb, 545 downloads since 2016-05-25 

Dmitry.

Re: Some Questions!

gamalier_ramirez wrote:

Hi Dimitri

How i can use MySQL whit MVDB

And how Create and configure my Database MySQL in MDV

Thank's

You should install MySQL server then switch your project to use MySQL, where you should put info like server, port, user, password and database name.
http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=1622&download=0

Dmitry.

Re: Some Questions!

Hi,
Dear Dimitri,
Ijust need to know how can I automatically connect to MySql instead of that connecting to mysql form when run the app!
But I want to read MySql connect infors from external INI file like MYSQL.INI or Settings.ini!
also want to close software automatically after showing an error message if connecting to mysql is not possible or user click on cancel on that mysql connection form smile

Thanks a lot

Re: Some Questions!

sonixax wrote:

Hi,
Dear Dimitri,
Ijust need to know how can I automatically connect to MySql instead of that connecting to mysql form when run the app!
But I want to read MySql connect infors from external INI file like MYSQL.INI or Settings.ini!
also want to close software automatically after showing an error message if connecting to mysql is not possible or user click on cancel on that mysql connection form smile

Thanks a lot

Example, how to connect to MySQL using script and how to save and load data from ini file:

Post's attachments

Attachment icon Connect to MySQL using script.zip 7.48 kb, 545 downloads since 2016-05-27 

Attachment icon IniFile.zip 3.59 kb, 802 downloads since 2016-05-27 

Dmitry.

Re: Some Questions!

Thanks a lot Dear Dimitri smile
I just wondering, is it possible to play Gif or some sort of animations for loading, etc... in forms ?

Re: Some Questions!

Hello Dimitri

Thanks for the info

I have the following questions:
1. Regarding your response to select MySQL as Database, I'm using version 1.45, for this reason not I select the button appears database that version avilitada have this option ?, and as it is a application for my use if I use a more updated version let me working at the end of 30 days?

2. I want when creating new records, pressing the button again, the format remains visible until I press cancel, and when I select EDIT, the form closes a see you accept.

3. I want to establish in certain TextBox that when type is present in uppercase.

Thank's

Re: Some Questions!

sonixax wrote:

Thanks a lot Dear Dimitri smile
I just wondering, is it possible to play Gif or some sort of animations for loading, etc... in forms ?

In the current version it's not possible.

Dmitry.

Re: Some Questions!

gamalier_ramirez wrote:

Hello Dimitri

Thanks for the info

I have the following questions:
1. Regarding your response to select MySQL as Database, I'm using version 1.45, for this reason not I select the button appears database that version avilitada have this option ?, and as it is a application for my use if I use a more updated version let me working at the end of 30 days?

2. I want when creating new records, pressing the button again, the format remains visible until I press cancel, and when I select EDIT, the form closes a see you accept.

3. I want to establish in certain TextBox that when type is present in uppercase.

Thank's

Hello,

1. After version 2.0 support MySQL, it's commercial version and not working after trial period.
2. Please attach your project with this bug for testing.
3. put this code to event OnShow of main form

Form1.Edit1.CharCase := ecUpperCase;
Dmitry.

Re: Some Questions!

Hi,
Dear dimitri I have a strrange problem!
ComboBoxes in Project are not working!
So I should save a new record to database and after that new record and older records are showing in combobox!
How can I fix this problem ?
I've just sent the project files to you by email!
Please tell me whats the problem and how can I fix it.
Thanks a lot smile

Re: Some Questions!

OK Found The problem but I dont know how can I solve it!

when remove this line :      {$MySQL disable_connectdialog}
everything work correctly!
but without it I should connect to database manually sad

Re: Some Questions!

sonixax wrote:

OK Found The problem but I dont know how can I solve it!

when remove this line :      {$MySQL disable_connectdialog}
everything work correctly!
but without it I should connect to database manually sad

Please attach your project for testing.

Dmitry.

Re: Some Questions!

DriveSoft wrote:
sonixax wrote:

OK Found The problem but I dont know how can I solve it!

when remove this line :      {$MySQL disable_connectdialog}
everything work correctly!
but without it I should connect to database manually sad

Please attach your project for testing.


here it is smile