Form issue with field type nvarchar

Hi,

We are converting our SC7 applicatio to SC8.

We have an MSSQL database.
We had fields with ntext type.
But as it is on MSSQL 2008R2 DB, and we cannot convert to never version, we converted the fields from ntext to nvarchar(4000). This in order to avoid problems on SC8.

Now, on our Scriptcase 8 form, we see the field, but it is cut at 255 characters!

How, can we see, then edit and update the complete length of this field? With 4000 characters.

THX in advance for your help.

Best regards,

Fabrice

Do you mean the field itself, e.g viewing the text you’ve inputted.

If that is the case change the field to a multi-line text field, you can change the number of lines high you want to view.

Also a multi-line field, has a variable text box size. e.g the user can change the size of the field when typing.

Hi,

Yes, it is already set as Multi Lines Text.
Then I also tried to increase the number of lines from 6 to 50, but nothing has changed.

I also updtaed the Field size in database, and in the value format part, the maximum size also, but nothing helps.

Attached, you can see a screenshot of the form field options.

For me, the problem seems more related to the database connection to MSSQL, as if I also try to view the data, with for example the following SQL request, the field is also truncated at 255 characters.
SQL: SELECT id, Description FROM project

THX for your help!

SC8_Text_Issue_20141216.jpg

[QUOTE=ssm_script;30415]Hi,

Yes, it is already set as Multi Lines Text.
Then I also tried to increase the number of lines from 6 to 50, but nothing has changed.

I also updtaed the Field size in database, and in the value format part, the maximum size also, but nothing helps.

Attached, you can see a screenshot of the form field options.

For me, the problem seems more related to the database connection to MSSQL, as if I also try to view the data, with for example the following SQL request, the field is also truncated at 255 characters.
SQL: SELECT id, Description FROM project

THX for your help![/QUOTE]

Ah i see, yea seems like SQL.

I have used LONGTEXT in MySQL before and Scriptcase automatically picked up the field length at 32767.

So maybe the field type your using NVARCHAR(4000), ScriptCase no like?

or try NVARCHAR(MAX) instead?

In fact, before we also tried nvarchar(max) and SC8 does not like this at all!

So, this is reason why we went to nvarchar(4000).

And the length was set to 32767, but this is not helping, so I also tested 4000 to match the MSSQL settings.

In fact, here it is MSSQL, and not MySQL.

Fair enough, i’m sorry i couldn’t help you here! :frowning:

[QUOTE=ssm_script;30406]Hi,

We are converting our SC7 applicatio to SC8.

We have an MSSQL database.
We had fields with ntext type.
But as it is on MSSQL 2008R2 DB, and we cannot convert to never version, we converted the fields from ntext to nvarchar(4000). This in order to avoid problems on SC8.

Now, on our Scriptcase 8 form, we see the field, but it is cut at 255 characters!

How, can we see, then edit and update the complete length of this field? With 4000 characters.

THX in advance for your help.

Best regards,

Fabrice[/QUOTE]

Hello,

In another topic, a user reported a problem with fields of type ntext, and solve your problem by modifying the type of connection to PDO.

Could test resolves?

Thank you!

Hi,

This is not an option as the drivers need to be updated to version 2012, and this cannot be done on this server!

For me, there is clearly a bug somewhere.

So, can someone confirm this?