WHAT IS WRONG WITH DATATYPES ?

SC8 seems to have very serious bug - I mean very very serious !
unless I’m doing something wrong

I have a column in database declared as TEXT()

[ATTACH=CONFIG]n67761[/ATTACH]

When creating and App (in this case it is FORM) the TEXT field is imported and interpreted as BLOB (image). This is something I discovered in SC7 more than a year ago and reported to NetMake !

When trying to correct the wronf datatype on the form, despite I select TextArea as datatype the SC still shows the datatype in SQL as BLOB (which osf course is WRONG !
I do not know yet how this would affect the App but weather if would or not it is wrong.

[ATTACH=CONFIG]n67762[/ATTACH]

AM I DOING SOMETHING WRONG OR THIS HAS TO BE BROUGHT AS FIRST PRIORITY FIX ?

BTW - the database is MySQL

Arthur

DataTypes_bug2.jpg

DataTypes_bug.png

https://dev.mysql.com/doc/refman/5.6/en/blob.html

Moved to discussion

I think you choosed the wrong data type on mysql. For description you are looking to char or varchar or something like this, not Text

Hello @Giu ,

I want to take part of this topic because of this:

For description you are looking to char or varchar or something like this, not Text

It is completely normal to work with Text datatype for long text storing, naturally. Some people stills using old Mysql version where the max length of a Varchar was 255 characters, as result, the normal behavior is to use TEXT and LONGTEXT to store large amount of text. In fact, most of well-known web applications use this practice:

TEXT / LONGTEXT: It is used to store text like post and article’s content, they allow characters set because its values are stored as non-binary string.
BLOB / LONGBLOB: It is used to store images, because its values are in binary string and not in characters set.

In conclusion, I do not know what SC does, but using TEXT datatype to set a description of something is absolutely correct.:slight_smile:

Not an expert on this datatypes, but what I tried to explain, is that Blob and Text is under the same “block” of datatypes. Don’t know if I’m explaining

Hello @Giu,

I think that I get what you are trying to say, and it looks OK. You are right when you say that both datatypes are equivalent. Indeed you can use them to store the same value. But then the cool question could be… when I need to use one or another?

Take a look to this image:

See how the “description” field has a collation in uft8_bin. If the user needs play with another collation (because he is Arabian or whatever) then a TEXT field meet his needs. With BLOB type you are not allowed to set that setting. So, this is a small difference, but could be import to the end user and because of this I think that @aka is right is his way, because if he needs to play with collations in that column then SC is making a mistake assuming that BLOB is the same as TEXT, when both know that this is not true at all.
This is my opinion as a guy how works with databases, but SC is your field and you could determinate better than me if it is a bug or not.

What I try to explain is that under SQL query, blob/text as treated in the same way I guess

not sure what you trying to say (?)
When you open database properties for the field BLOB() and TEXT() are completely two different animals!

When I have database created and try to build initial Apps based on the existing tables all TEXT() fields are declared on the forms as IMAGE (not TEXT() - as they supposed to so it is a bug that needs to be fixed. Last time it took me few hours to go and modify all such fields manually so this is not really helping in development.

@aka ,
Based in what I have seen in your pictures… yes, there is a bug. SC should not treat BLOB and TEXT as equals, because they have their differences between them exposed in this topic.

Maybe I understood diferently. Moved again to bugs.

YES - the main problem is that I have reported this issue in SC6 - ABOUT 2 YEARS AGO - IT HASN’T BEEN FIXED UNTIL NOW !

BLOB and TEXT are not treated the same way. TEXT undergoes conversion where blob doesnt. Check out here for the details.
So if you use it as text then use TEXT if you use it to store pictures or so then use BLOB

Sorry RR but seems like you did not this post carefully enough, somehow other did get it.

Here is is again.

  • create a TXT() type field in a table then run App wizard to see what happens to the field type. Instead TXT you will see BLOB

are you trying to say this is right ? THIS IS A BUG - PERIOD !
the only workaround is to go to each field like this and manually change it to TEXT() type, but if the project has tens of them it is terrible waste of time and on a next dictionary update (in which by the way the updates are very poorly implemented) it will be reversed to BLOB again and you you repeat the same work over - sounds insane ? yest IT IS!

BLOB() is designed for images or media while TXT() for text - if anybody does not understand the difference and SC makes no difference then somebody needs to go back to school.

ARTHUR

You did not get it. The problem is that ScriptCase has problems to identify the difference, that is all.

Basically yes. So, I agree

I really hate to argue about the terms (weather this should be considered a bug or issue or problem or missing feature or whatever)…
the bottom line is this adds humongus amount of extra time for me to keep track of those fields and changing them manually, so …

YES Manfred PRECISELY - and this should have been fixed 2 years ago !

  • bug or issue is the same crap… the application does something with an unexpected result.
  • a missing feature is when the application does not have a specific functionality, and you can not judge a function that does not exist.

PS: looks so impossible to believe that this little problem is causing troubles since 2 years ago.

Yes Manfred - that is the sad part about NetMake. They pump the SC IDE with commercial asking us to buy another license, but they do not fix bugs for years. That is why my next project would definitely not be in SC. Until then I have to use it because I went to far with what I have started some time ago. I prefer to pay 4 times more $$$ and save time on fixing bugs and dealing with frustration. SC is not an expensive product but we obviously get what we pay for - low quality :frowning:
All this is not about the technical issues but rather about their philosophy of selling, development, marketing. For some people (or nations) the quality equals = long term relation with the customer. For NetMake (I would hate to say - for all Brasilians) this equation is unknown territory. This reminds me Chineese products which flood the markets of this planet, yet they are lowest possible quality. It took 10-15 yeras and not some Chineese companies make top quality products. There are still very few, but they exist. So Chineese people learning pretty fast, because everybody sees their economy grows. As we see Brassilian economy definitely is not thriving and perhaps the mentality is one of the causes (although I’m sure not the only one).