Hi Dmitry.
Could you please make sure that future versions of MVD will update the Webgrid scripts so that they work properly on current 7.x and future 8.x versions of PHP?
My current web host has recently updated the PHP version to a minimum of PHP 5.6 and even then my current webgrid site no longer worked. They had to revert my site back to PHP 5.3 to get it back working.
Cheers, D.

P.S. The Webgrid scripts I'm currently using were generated from the old version 3.6 veriosn of MVD, if you have already updated the scripts in more recent versions 4.x, 5.x, or 6.x and these work fine with latest PHP versions, then please disregard this post.

2

(0 replies, posted in General)

I have recently migrated to a new web hosting provider and they only have php 7.2+ available.


I have migrated my webgrid folder and have made relevant changes to the mysql connection details, but have found that many of the old mysql functions have been removed and/or updated to now use their mysqli counterparts.


I have tried to make these changes to the scripts, but have only been partially successful.


I subsequently have 2 requests:
1. Could MVD please be updated in the next released version onwards to use the new mysqli (or PDO) functions?
2. Could you please produce update scripts or program to convert scripts using old mysql functions to new scripts?

Thanks Dmitry.
This improves the situation a a fair bit; however the main (and more important problem/issue is with the need to start the external program - plink - and have it running in an unsecure manner at the same time as the main MVD program).
I raised this is a round about way in my opening post - please refer to (b) and (c), as I was really hoping that something could be done to remove this external dependency completely; optimally this would integrate/internalise the SSH tunnelling into the MVD program directly maybe in the form of a new class or extra (or extended) standard MySQL DB login pop-up dialog or something like that.
Any chance of this being implemented in 6.x?

Hi Dimity and Co.

My web hosting service that also allows multiple MySQL databases to be created has blocked direct remote access to these servers. This means that when using the MVD to create a new table for a project or when trying to access an old project or application, the standard MySQL pop-up login box will not connect and will show an error message.


According to their support knowledge base, they present a round about method to access their MySQL server via SSH tunnelling giving an example using PuTTY.


After searching on this forum to see if anyone else has run into this issue and if there are any solutions, I found the following post in the Russian sub-forum: http://myvisualdatabase.com/forum/viewt … 877#p32877


I followed this for my old project and although this works (in that it allows access to my MySQL DB data finally), there seems to be a significant issue with it.


The issue is that the normal MySQL connection login box seems to be displayed before the code in the main begin...end block of the application - which sets up the SSH tunnel by running external program (plink.exe); so an error is always raised on the first run of the application (which has to be closed and rerun).


On the second run onwards (until the plink program is terminated), the program runs as expected and wanted.
This means that the required supporting external plink program is (a) not started before the DB connection process, (b) having this external program running for the main MVD program to connect and run properly is a bit ugly and prone to accidental closure, and (c) this external program is left running after the main MVD program is closed. Which is not very tidy or acceptable looking at it from the security side of things.


This really needs to be looked at as a priority as this will affect more and more people, especially if your MVD program is expected to be used by others.


I hope this will by considered seriously with a suitable solution provided in a suitably short time frame.

I have attached a video of a screen capture that shows some of what I have described above to hopefully make things clearer. Regards. D.

Thanks Dimiry.
I won't be able to test this to test, as I only install final versions to my PC. But I have confidence that you have fixed this as stated. Thanks.
On a side note, have you had a chance to look into the first problem I raised initially with HTTPGetFile in this thread?
Please check it out for a bit to see if there is any solution or if you have any ideas. Cheers. D.

Hi. Yes, the pop-up doesn't show up if the second parameter is set to True which will handle the File Not Found as an exception and be handles in the except block of the try statement; this is ok (but not optimal as it shouldn't really be an exception, but rather a valid failure condition - that was why I thought you would have this be a actual function that is supposed to return a boolean result).
What is the use of this result if it is handled by the exception handling method?
Here is some more code to check out:

    ShowMessage('Test5 - Try..Except - EnableException=False');
    try
        bResult := HTTPGetFile('https://www.google.com/file/that/does/not/exist/example.txt', ExtractFilePath(Application.ExeName) + 'test.txt', False); // Default EnableException value
        // HTTP1.1/404 Not Found Error Message Popup Is Shown
    finally
        ShowMessage('Test5 - Message Popup'); // With file that does not exist, this pop-up is shown as unexpected and not wanted, instead this should be a False result of the function call.
    end;
 {
    ShowMessage('Test6 - Try..Except - EnableException=True');
    try
        bResult := HTTPGetFile('https://www.google.com/file/that/does/not/exist/example.txt', ExtractFilePath(Application.ExeName) + 'test.txt', True); // EnableException value set to True
        // Exception Error Message Popup Is Shown & Program Crashes
    finally
        ShowMessage('Test6 - Message Popup'); // With file that does not exist, this pop-up is not displayed as expected and wanted as this raises an exception that crashes the program if not handled.
    end;
 }

Does this make sense, or have I completely got this totally fuzzed up?

Hmmmm...OK. I suppose if that's how it is then that's how it is. Thanks for looking into this for me. Cheers.

....That sort of works....but....
if in the new case of no enclosing characters seem to work now, then in the previous case of having enclosing character, why wasn't the TEST1 part that was written to the file have quotes around it?

Hi Dimiry, My mistake in the example I posted as I made that up quickly to try to show the problem without actually testing it properly.  The code given actually works as intended.
The problem can be seen in the new code below:

var
    fLogFile: TCSVWriter;
begin
    fLogFile := TCSVWriter.Create(ExtractFilePath(Application.ExeName) + 'TCSVWriter_Test.ini');
    fLogFile.Write(ExtractFilePath(Application.ExeName) + 'TCSVWriter_Test.ini');
    fLogFile.Write('TEST1');
    fLogFile.NextLine;
    fLogFile.Free;
end.

For me, the output from the  above is:

"C:\users\D\Temp\TCSVWriter_Test (MVD5.6)\TCSVWriter_Test.ini",TEST1

So it looks like it has something to do with the backslashes that are part of the path.

Hi Dimitry,
Hope you've seen my PM to you about the above problem. Any luck in finding the problem and a suitable solution or work around?

Anyway, while working more with the HTTPGetFile() function, I've run into another issue that I hope you can help me solve.
The problem is that no matter what value I use for the EnableException parameter, whenever this is used to try to get a file that does not exist, it results in a pop-up window to be displayed with an error message (please see attached pic). This is very anoying and impacts the running of a program that will try to download multiple files (both those that exist and those that don't).
Here is some example code for you to use to see the problem for yourself:

begin
    ShowMessage('First Test');
    try
        HTTPGetFile('https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png', ExtractFilePath(Application.ExeName) + 'test.png', False); // Default EnableException value
        HTTPGetFile('https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png', ExtractFilePath(Application.ExeName) + 'test.png', True); // EnableException value set to True
    except
        ShowMessage('With file that exists, this pop-up is not displayed as expected and wanted');
    end;

    ShowMessage('Second Test');
    try
        HTTPGetFile('https://www.google.com/file/that/does/not/exist/example.txt', ExtractFilePath(Application.ExeName) + 'test.txt', False); // Default EnableException value
        HTTPGetFile('https://www.google.com/file/that/does/not/exist/example.txt', ExtractFilePath(Application.ExeName) + 'test.txt', True); // EnableException value set to True
    except
        ShowMessage('This should be the only pop-up window to be shown');
    end;
end.

Note: you need to have the SSL library files in the same directory for the above to work.


Can you please look into this as a higher priority than my last raised problem?
Cheers, D.

EDIT: Been looking furthe\r into this and my new tests seem to work better and sort of more expected to wnat I want, so please stop looking into this for now unless you want to sort out the pop-up anyway (which I don't think should show up either way without explicitly telling it to). Thanks.

Hi. I've tried to use this class in my script and the file created always seem to have the fields enclosed with the field Enclosing Char all the time, even when I have specifically entered False in the Enclosing parameter.

e.g. If I have the following code:

var
    fLogFile: TCSVWriter;
begin
    fLogFile := TCSVWriter.Create(Copy(Application.ExeName, 1, Length(Application.ExeName) - 4) + '.csv', ';', ceCrLf, False, '"');
    fLogFile.Write('Hello There');
end.

then the file contents would be:

"Hello There"

instead of the expected and wanted:

Hello There

Am I doing something wrong or is there a problem with the class functionality?

maybe, but this shouldn't be as the test with google file worked.

Anyway, I have used an alternate method to download the files from the site (spawning wget from MVD with OpenFile), so I am sort of happy enough for now.

Thanks for your time in trying to help with this. Cheers.

Yep. This works for me as well. I think that the difference may be that your site does not have a certificate installed, so even though it says it is using https, there is not the same level of validation as there would be for a certified site (one that has the green padlock) - this is just my guess as there is no problem with downloading the sample file you put up.

EDIT: or maybe not...I just checked with the following, and that worked as well:
https://www.google.com/images/branding/ … 2x92dp.png
maybe it's just the other site I'm trying to get the file from that has this problem...

I'm not using a proxy per se, but I am using a VPN service.
I have tried just now with just HTTP instead of HTTPS to check, but am still getting the exact same error message so this wasn't the cause of the problem.

Thanks for giving me more ideas to try out though; if you have any more, please keep them coming smile

Thanks for the suggestion, but it didn't fix the problem (although a different error is now displayed - please refer to attached pic of error).


I noticed that your library files are from 2008; this looks to be a bit old and there have been many issues with SSL that have been identified and fixed since then, so I would sugget that you use a newer version.
I have been using the OpenSSL version 1.0.2o with success previous to my latest problem and have tried 1.0.2t as well to see if that improved matters (...it didn't).

Hi Dmitri and MVD users,


I've run into a problem that I hope someone can help to resolve.
I am using the HTTPGetFile() function to try to download a file from a website.
I have added the latest OpenSSL DLL file to my application folder as required to connect to an HTTPS URL, but I am getting the following error message:


Error conecting with SSL
error:1408F10B:SSL
routines:SSL3_GET_RECORD:wrong version number


From searching on the web, it seems that this is caused by the client not using the correct version of SSL as the server, and the suggested solution is apparently to set the correct version manually by setting the relevant properties of the library to:


SSLOptions.Method := sslvSSLv3;
SSLOptions.SSLVersions := [sslvSSLv3];


However, this assumes that we are directly using the relevant libraries/objects in the DLL files from our code, but in this case I am using the provided function which I assume wraps the protocol version stuff already which doesn't seem to be able to be changed manually.


How can I overcome or work around this problem?



EDIT: I have just double checked the site info and found that apparently the encryption being used is stated as:
(TLS_AES_128_GCM_SHA256, 128 bit keys, TLS 1.3).
So it may be that it is reversed of what I have above in that MVD is using SSLv3, but the site does not support this so I may have to use TLS instead somehow, Not sure if this helps or makes the problem more confusing...
Again, any help would be great.  Cheers.

Hi Dmitry,
I have a new feature suggestion/request that I hope you can incorporate into a future version of MVD.
It is for the inclusion of an embedded or control/class to implement a webserver and/or REST server.
One of the most useful ability that this would allow would be to allow a truely network connected database using the default SQLite DB implementation with needing to use MySQL (or it's similar alternative like PostgreSQL or MariaDB), and would also eliminate the only alternative of using a mapped network drive for client/server communication.
Anyway, please consider if this can be a likely addition to MVD in the near future.
Cheers, MrD.

Hi there,
Although I've purchased versio 4.0 of MVD, I've only installed version 3.6 on my machine and have been using that for now; so if this is possible in the latest version then please ignore.
My question is: is it possible to copy some table data from say a text file in comma or tab seperated format (as examples) and then paste this into the grid control of MVD and have it insert/overwrite/update the existing data that may already be there like how this can be done in spreadsheet programs like MS Excel (for example)?
If not, then can this feature please be added to a future 4.x release?
Cheers, mr_d.

19

(2 replies, posted in General)

Hi Dmitry,
Before the recent announcement that version 4 of MVD is apparently going to be the next one to be released, I read a few other posts from other forum threads that referred to a version 3.7 beta link, thus suggesting that the next version to be released would be 3.7.
I just wanted to check on this - so do you intend to release one last version of the 3.x series before starting the 4.x one.  Could you please clarify this?
I'm sure you've already thought about it already, but if it is the 4.x one that is upcoming, I hope you can provide an attractive upgrade price for those licensed with the current 3.x minor version.
Regards, mr_d.

Hi All,

FYI - Embarcadero (The makers of the new Delphi products) are running a limited time SPECIAL OFFER which allows people to download a copy of the Object Pascal Handbook by Marco Cantu for FREE!

The link for it is http://forms.embarcadero.com/ObjectPasc … MarcoCantu

Although MVD does not fully support all the classes that the full Delphi product supports, it is nonetheless based on the same the base language structure and format of Object Pascal.

Although I haven't read it myself yet, this looks like a good book to get - and it's free, so why not?

Cheers.

21

(6 replies, posted in General)

Any plans to make this 50% discount generally available to everyone as a Christmas special?
I wouldn't mind picking up another copy (or two - if the price is right). smile

Here it is (attached) without your new "display" field attribute.

It's better that I was able to get, but doesn't really work.

the display shows up as "undefined" in blue and underlined like a hyperlink, but the link itself is "http://undefined/" - it doesn't seem to pick up and display my stored link properly (which already has the http:// part included).
I tried changing it to be:

display: function (data) {return '<a href=\"'+data.record.link+'\">' + data.record.link + '</a>';}},

and similar as well as l trying with "data.value", "data.record.value" and "data" instead of "data.record.link", but no luck with any of these combinations.
I even tried to edit one of my links to remove the leading "http://" text, but that also didn't work...
Any other suggestions?

Hi Dmitry, It's been a while since I've posted, but I have been following the progress and discussions.
Anyway, I've been experimenting a bit with your new web grid option and have created a simple table online for my personal use.  It is working as expected so far, so all good there; however, I wanted to find out if it would be possible to add a new hyper-link type so that links to web pages can be stored such that they can just be clicked on to open a new tab or window to the linked location?  Cheers, Dennis.

25

(15 replies, posted in General)

Hi tcoton, I agree that there are cases that it may be very difficult to get separate related data to display in their own section if the relationships between them is unclear or too complex; I do not believe that it will ever be impossible (again as long as tall the data is related to each other in some way).
With your example picture (which helps a lot, so thanks for providing it), the following would be what I would do:
1. make sure that each grid data source represents either a single simple table or a simple query that has already been identified and created to contain only the data that is specific to the category (of the grid name).
2. make sure that each grid data source contains it's own primary key (which is assumes to be a single index number) for it's own data, as well as a field that represents the foreign key of it's parent data. so for e.g. the "Partners" grid would contain partner data and each row would have a unique partner_id (primary key) and a study_no_id (foreign key) among other data related to partners.  Similarly, the "Product Batch Number" grid would contain product batch data and each row would have a unique product_batch_id (primary key), a study_no_id (foreign key), and an analytical_request_id (foreign key) among other data related to product batches.
3. make sure that each grid shows only the data related to it's parent data which has been filtered recursively back until the initial source data of the "Study Number".
4. so to summarise, the following would be the expected data source queries for each or the data grids you have shown (with "Study Number" being the only known requirement/limiter as is assumed that the id is the same as the actual study number):
"Study Number" Textbox --> study_no
"Study Proto" Grid --> select * from study_proto_table where study_no_id = study_no
"Partners" Grid --> select * from partners_table where study_no_id = study_no
"Study Reports" Grid --> select * from study_reports_table where study_report_id = study_no
"Analytical Requests" Grid --> select * from analytical_requests_table where study_no_id = study_no
"Product Batch Number" Grid --> select * from product_batch_number_table where study_no_id = study_no and analytical_requests_id = analytical_requests_grid.analytical_requests_id
"API Batch Number" Grid --> select * from api_batch_numbers_table where product_batch_number_id = product_batch_number_grid.product_batch_number_id
5. make sure that whenever the "Study Number" textbox is changed, that the child grids will have to be updated in sequence of the relationship chain.
I hope this explains what I was getting at in my previous posts.  It may still be confusing or not explained properly; but I'm happy to help if you run into any problems with trying to implement this.  cheers.