Yes, I tried zero and I get the same error saying that it is a wrong default value for a date. However, removing the non null constraint, then modifying the table with the right parameters within MySQL does the trick. It does work also to create the table directly in MySQL before connecting the app, it is just more cumbersome.

27

(6 replies, posted in General)

Nice one Derek, it is quite a bit of code though smile

28

(6 replies, posted in General)

While this is an easy way to create triggers, it is also a weird one, since they are rebuilt every time the form is shown and the code is exposed in the script file, hence why I prefer to use a database admin tool to create them.

29

(6 replies, posted in General)

I do it with triggers using a database admin tool, there is no tool in MVD to create triggers.

30

(3 replies, posted in Script)

a screenshot maybe?

31

(3 replies, posted in Script)

It is a bit confusing, do you have a sample project you could share here?

32

(27 replies, posted in General)

Thanks Brian.zaballa, it works too!! I was not using the very first concat, only the ones after the ifnull.

33

(27 replies, posted in General)

tcoton wrote:
sparrow wrote:

Derek described everything.

It is advisable to simply replace the space character with an unused character. Then there will be no false positives.
Example:

trim(ifnull(info1||'§','')||ifnull(info2||'§','')) 

Hi all,

Any idea on how to translate this Sqlite version to MySQL? I get a ton of errors while trying to tweak it to fit MySQL and I am not far from the headache.

I got my answer, there is nothing to translate, one must enable the SQL_MODE "PIPES_AS_CONCAT" at the global parameter on the server.

SET GLOBAL sql_mode = (SELECT CONCAT(@@sql_mode,',PIPES_AS_CONCAT'));

I am wondering if it would be possible to push only a session sql_mode when the application connects to the server even after a timeout.

34

(27 replies, posted in General)

sparrow wrote:

Derek described everything.

It is advisable to simply replace the space character with an unused character. Then there will be no false positives.
Example:

trim(ifnull(info1||'§','')||ifnull(info2||'§','')) 

Hi all,

Any idea on how to translate this Sqlite version to MySQL? I get a ton of errors while trying to tweak it to fit MySQL and I am not far from the headache.

Hi all,

I am trying to migrate an application that always was working with Sqlite which contains 2 Date columns that should not be null. While it was working fine with Sqlite which stores dates as text, the creation of these columns is problematic when connecting to a blank MySql database when Myvisualdatabase tries to create the tables. It trows the infamous "Invalid default value for 'Date_Column'.

I have tried to change the default value with "CURRENT_DATE" or "CURRENT_TIMESTAMP" in MyVisualDatabase with no luck, I still get the same error when creating the tables in MySQL. Any experience on anyone side?

36

(1 replies, posted in General)

This is called cascade delete, there is an option in the table management tab. Edit the table column(s) you need to manage to find it.

https://www.techonthenet.com/sqlite/for … delete.php

37

(9 replies, posted in Database applications)

brian.zaballa wrote:

Here's an updated link of the project.

https://www.dropbox.com/s/1dnv5mcv3sqgp … r.zip?dl=1

It would be useful if we could see what the icon is going to look like depending on the theme chosen and if we could actually add more themes. smile

38

(38 replies, posted in Russian)

Do you have an example on how to do these designs? The rounded boxes look nice, how about the special icons next to the window controls?

39

(11 replies, posted in General)

Step-in wrote:
sparrow wrote:

I don’t know what’s on the forums, but in the DELPHI Basic Tutorial it says:

  Min int64 value = -9223372036854775808
  Max int64 value = 9223372036854775807

http://www.delphibasics.co.uk/RTL.php?Name=Int64

Oh, only 19 characters up to 9223372036854775807. What can be done in my case? Will MVD not be able to handle this situation?

Unless you really need some sort of calculation or anything very specific to be done with your very long strings, the best would be to use a text based field and use it as a string. The limitations are the same for SQLite than for Delphi.

Hi jean, where did you find the icons in your attached screenshot?

Youtube reference not working

@jrga
I see in the video that you are running the compiled project with wine on Mac OS, did you develop this project via wine too or did you use a PC/Virtual machine? I have a Mac too and I use virtual machines for Windows stuffs.

43

(10 replies, posted in Script)

Those numbers are anything but time values. Do you have a project you could send?

44

(15 replies, posted in SQL queries)

Twice the same post with 2 different nicknames smells fishy.

45

(10 replies, posted in Script)

what is your formula for the time diff?

46

(10 replies, posted in Script)

You can edit the property of the time picker on the left side, Kind= time, Format= hh:mm for 12 hours, HH:mm for 24 hours so no seconds will be displayed.

The latest version 3.44.2 https://www.sqlite.org/index.html works very well.

I see that you are using an outdated sqlite.dll (2014)  in your project, you would be better of with a newer version which provides new features!!

Hi,

Thank you so much Derek for taking the time despite your busy schedule to explain something that is simple to most of advanced developers but still is a work in progress for most of us. It works great, basic is the best!!

I have read many articles about this solution in other forums but they were all context specific with no clear explanation  and I could not understand how to apply it to My Visual Database since I am not (yet) a Delphi programmer. I bought some Delphi books but I just started them...

But it does not work as I always get the error "Undeclared identifier:'dbFilter'.... " whichever the number.

At the end of the script before the final end.

I put

 frmdbCoreUserForm.components[21].dbFilter:= 'id IS NOT 3';


and it does not compile with the error "Undeclared identifier:'dbFilter'.... "