Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Create/alter Table Default Empty String #24514
    mhirons
    Member

    MySQL Administrator uses my 2nd suggestion, it forces you to enter the default string enclosed in quotes and escaped.

    It looks like the SQL Server GUI does something similar. Your default value needs to be enclosed in quotes and escaped, but it also allows you to put whatever you want and then when the cell loses focus, it automatically makes sure your value is enclosed in single quotes and does any necessary escaping. So, if you type in don't, it replaces it with 'don''t'. If you type in 'test', it leaves it alone. That's a pretty good idea, it gives you both flexibility and ease of use.

    in reply to: Create/alter Table Default Empty String #24513
    mhirons
    Member
    peterlaursen wrote on Jul 11 2007, 07:51 PM:
    I cannot either 'right out of my head' find a good way to implement. Do you have any good idea?

    I can think of two things, but they each have drawbacks…

    The first would be something similar to how you can right-click on the table data grid and choose “Set to NULL”. The special string (NULL) is put in the cell, and gets sent to the database as NULL. We could have another special string, (EMPTY), that would get sent to the database as an empty string. If you really did want the default to be (EMPTY), you could enclose it with back quotes, `(EMPTY)`.

    The second idea would be to get rid of the automatic quoting/escaping and force the user to enter in exactly what is sent to the database. In other words, to set the default string to test, you would have to enter 'test', including the single quotes. To set the default string to can't, you would have to enter 'can't'. To set the default to an empty string, you specify ''. The downside to this is that it may be confusing to some users.

    I'll try to look at a couple other database GUI programs to see how they handle this situation.

    in reply to: Feat. Req: Cell Movement And Scrolling #21998
    mhirons
    Member

    Using 5.16 Beta 11 and everything works great! Thanks a lot! 😀

Viewing 3 posts - 1 through 3 (of 3 total)