Page 1 of 1

Column value stored as lowercase in SQL-DB (v11)

PostPosted: Wed Jan 10, 2018 10:29 pm
by emoffster
Hi,
I've got this ID field (varchar(20)), in a table, which always stores its value in SQL-DB as lowercase, although added as uppercase, from ASPMaker form (11). I can't find any setting, where I've mistakenly added this setting.
Anyone got a clue?

BR,
Emil

Re: Column value stored as lowercase in SQL-DB

PostPosted: Thu Jan 11, 2018 9:38 am
by Webmaster
1. In Row_Inserting / Row_Updating server event, write out the value to check whether the value is actually in lowercase. For example:

Response.Write "current value: " & <FieldName>.CurrentValue & "<br>"
Response.Write "db value: " & <FieldName>.DbValue & "<br>"
Response.Write "value: " & rsnew("<FieldName>") & "<br>"

2. Use database engine tools to check whether the actual value stored in the database are actually in lowercase

Re: Column value stored as lowercase in SQL-DB

PostPosted: Thu Jan 11, 2018 2:08 pm
by emoffster
It is actually stored as lowercase in the database, although its written (inputted) in uppercase.

Re: Column value stored as lowercase in SQL-DB (v11)

PostPosted: Thu Jan 11, 2018 6:26 pm
by Webmaster
As explained:

> In Row_Inserting / Row_Updating server event, write out the value to check whether the value is actually in lowercase. For example:

Response.Write "current value: " & <FieldName>.CurrentValue & "<br>"
Response.Write "db value: " & <FieldName>.DbValue & "<br>"
Response.Write "value: " & rsnew("<FieldName>") & "<br>"

Re: Column value stored as lowercase in SQL-DB (v11)

PostPosted: Fri Jan 12, 2018 5:27 pm
by emoffster
Ended up creating a trigger instead, which converts to Ucase.