TiNG Cannot Login to Solution

I am attempting to get a TiNG solution running on a new Windows server running the latest support software…

Servoy 2024.6.1
Tomcat 9.0.91
Java 21.0.4
MSSQL Express 16.1.1000
Windows 10 Version 21H2 Build 20348.2582

along with our latest .war file.

The solution runs, but I cannot get past the login screen after entering the proper credentials. The log file shows Unknown errorCode 100 and Incorrect syntax near ’ ’ for the following code…

Can’t get new foundset for: QBSelect(SELECT FROM arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5 WHERE (, : , (UPPER[TRIM[=BOTH*,=’ ',=FROM,arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5.512=user_info_userid<-9,50,0>] null] null)=([=userName])))

We have not altered/updated our login/authenticator code for several years. We do not generate the SQL code as it comes from Query Builder. Our user_info table contains no nulls. Also, this exact same .war file runs on our old server without problems. Perhaps, someone has come across this situation.

Looking for help and/or suggestions. Thanks!

Full Context Error Message

2024-08-10 15:49:42,672 ERROR [Executor,uuid:3E211C4:2, clientid: 02B03142-B1EA-41A0-BFC3-F19A3F1FD0BA] com.servoy.j2db.util.Debug - Unknown errorCode 100
Incorrect syntax near ’ ‘. (Form Context: login_start), JSEvent(type = action, source = Component: <Component:‘button_signin’ of parent FormUI for FormController[form: login_start, fs size:0,visible: true, selected record: null,destroyed], with spec: bootstrapcomponents-button >, formName = login_start, elementName = button_signin, timestamp = 2024-08-10 15:49:42.625,modifiers = 0,x =784,y = 445,data = null)
at ARMTITAN/scopes/LoginSolution/validate_login:99 (validate_login)
at ARMTITAN/scopes/LoginSolution/sign_in:25 (sign_in)
at ARMTITAN/forms/login_start/signin_user:106 (signin_user)
at ARMTITAN/forms/login_start/onAction_signin:38 (onAction_signin)
[02B03142-B1EA-41A0-BFC3-F19A3F1FD0BA ARMTITAN]
org.mozilla.javascript.WrappedException: Wrapped java.lang.RuntimeException: Can’t get new foundset for: QBSelect(SELECT FROM arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5 WHERE (, : , (UPPER[TRIM[=BOTH*,=’ ‘,=FROM,arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5.512=user_info_userid<-9,50,0>] null] null)=([=userName]))) (ARMTITAN/scopes/LoginSolution/validate_login#99)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1860) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:248) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:284) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1904) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1078) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:87) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:383) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:4023) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:85) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:725) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.component.EventExecutor.executeEvent(EventExecutor.java:211) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.DataAdapterList.executeEvent(DataAdapterList.java:199) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.WebFormComponent$FormcomponentEventHandler.executeEvent(WebFormComponent.java:267) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at org.sablo.BaseWebObject.doExecuteEvent(BaseWebObject.java:392) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.BaseWebObject.executeEvent(BaseWebObject.java:354) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.services.server.FormServiceHandler.executeEvent(FormServiceHandler.java:132) ~[sablo_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.NGFormServiceHandler.executeEvent(NGFormServiceHandler.java:638) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at org.sablo.services.server.FormServiceHandler.executeMethod(FormServiceHandler.java:83) ~[sablo_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.NGFormServiceHandler.executeMethod(NGFormServiceHandler.java:617) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at org.sablo.websocket.WebsocketEndpoint$5.run(WebsocketEndpoint.java:418) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.Event$1.run(Event.java:97) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.websocket.CurrentWindow.runForWindow(CurrentWindow.java:80) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.Event.execute(Event.java:87) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.EventDispatcher.dispatch(EventDispatcher.java:135) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.EventDispatcher.run(EventDispatcher.java:90) ~[sablo_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.eventthread.NGEventDispatcher.run(NGEventDispatcher.java:60) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.RuntimeException: Can’t get new foundset for: QBSelect(SELECT FROM arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5 WHERE (, : , (UPPER[TRIM[=BOTH*,=’ ',=FROM,arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5.512=user_info_userid<-9,50,0>] null] null)=([=userName])))
at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getFoundSet(JSDatabaseManager.java:3347) ~[servoy_shared_2024.6.1.3983.jar:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:227) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
… 25 more
Caused by: com.servoy.j2db.dataprocessing.DataException: Unknown errorCode 100
Incorrect syntax near ’ '.
at com.servoy.j2db.dblayer.Zb.Za(Zb.java:320) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.persistence.Zn.Za(Zn.java:822) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.buildServoyException(Zv.java:194) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.Za(Zv.java:1396) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.Za(Zv.java:1338) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.performQuery(Zv.java:1497) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.performQuery(FoundSet.java:7695) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.refreshFromDBInternal(FoundSet.java:473) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.browseAllInternal(FoundSet.java:360) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.loadAllRecords(FoundSet.java:341) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSetManager.getFoundSet(FoundSetManager.java:3570) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getFoundSet(JSDatabaseManager.java:3343) ~[servoy_shared_2024.6.1.3983.jar:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:227) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
… 25 more

kwpsd:
I am attempting to get a TiNG solution running on a new Windows server running the latest support software…

Servoy 2024.6.1
Tomcat 9.0.91
Java 21.0.4
MSSQL Express 16.1.1000
Windows 10 Version 21H2 Build 20348.2582

along with our latest .war file.

The solution runs, but I cannot get past the login screen after entering the proper credentials. The log file shows Unknown errorCode 100 and Incorrect syntax near ’ ’ for the following code…

Can’t get new foundset for: QBSelect(SELECT FROM arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5 WHERE (, : , (UPPER[TRIM[=BOTH*,=’ ',=FROM,arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5.512=user_info_userid<-9,50,0>] null] null)=([=userName])))

We have not altered/updated our login/authenticator code for several years. We do not generate the SQL code as it comes from Query Builder. Our user_info table contains no nulls. Also, this exact same .war file runs on our old server without problems. Perhaps, someone has come across this situation.

Looking for help and/or suggestions. Thanks!

Servoy changed something with the password-hashing-implementation, I think, so could you check if you made the fields for the password-hash longer? see 2024.03 (LTS) | Docs

We also upgraded the PBKDF2Hash hashing function from HmacSHA1 to HmacSHA256. This does mean that the length of the hash string that is returned will be bigger, depending on the iterations (default 9999) this will be a now at least 86 chars instead of 63 chars. So if a password hash column was created that is less then 90 please have a look do an alter table on that column and make it at least 200 chars to also support it better in the future. SvySecurity by default had a size of 63, this is changed, but as an existing user its very possible that an alter table needs to be done.

do you also have the sql exception in the log file for this?

also what is the exact query you build up and try todo when calling databaseManager.getFoundset(query)

Hi, Robert. Thank you for your suggestions. The width of our password column is 100.

Hi, Johan.

When I search the Internet for MSSQL and the data exception…

Unknown errorCode 100 Incorrect syntax near ’ '.

the response is typically this…

Such unexpected problems can appear when you copy the code from a web page or email and the text contains unprintable characters like individual CR or LF and non-breaking spaces.

I copied the SELECT statement from the error log and viewed it in a hex editor but did not see any characters below 20 hexadecimal. The trim() in our code should have prevented non-printable characters.

Here is the info you requested…

	var fs_table = databaseManager.getTable( 'arm_data', 'user_info' )
	
	// DOES TABLE USER_INFO EXIST?
	
	if( !fs_table )
	{
		return false 
	}
	
    // Trim and uppercase the entered username and password
    
	UserName = UserName.trim().toUpperCase()

    Password = Password.trim().toUpperCase()
	
	
    // Create SQL query using Query Builder.

    /** @type {QBSelect<db:/arm_data/user_info>} */
    
    var query = datasources.db.arm_data.user_info.createSelect()
    
    query.where
         .add( query.columns.user_info_userid.trim.upper.eq( UserName.trim().toUpperCase() ) )
    
    
    // Get a found set based on the query.
    
    /** @type {JSFoundset<db:/arm_data/user_info>} */
    
    var fs = databaseManager.getFoundSet( query )

Server Log

org.mozilla.javascript.WrappedException: Wrapped java.lang.RuntimeException: Can’t get new foundset for: QBSelect(SELECT FROM arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5 WHERE (, : , (UPPER[TRIM[=BOTH*,=’ ‘,=FROM,arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5.512=user_info_userid<-9,50,0>] null] null)=([=ME]))) (ARMTITAN/scopes/LoginSolution/validate_login#99)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1860) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:248) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:284) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1904) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1078) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:87) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:383) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:4023) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:85) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:725) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.component.EventExecutor.executeEvent(EventExecutor.java:211) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.DataAdapterList.executeEvent(DataAdapterList.java:199) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.WebFormComponent$FormcomponentEventHandler.executeEvent(WebFormComponent.java:267) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at org.sablo.BaseWebObject.doExecuteEvent(BaseWebObject.java:392) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.BaseWebObject.executeEvent(BaseWebObject.java:354) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.services.server.FormServiceHandler.executeEvent(FormServiceHandler.java:132) ~[sablo_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.NGFormServiceHandler.executeEvent(NGFormServiceHandler.java:638) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at org.sablo.services.server.FormServiceHandler.executeMethod(FormServiceHandler.java:83) ~[sablo_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.NGFormServiceHandler.executeMethod(NGFormServiceHandler.java:617) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at org.sablo.websocket.WebsocketEndpoint$5.run(WebsocketEndpoint.java:418) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.Event$1.run(Event.java:97) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.websocket.CurrentWindow.runForWindow(CurrentWindow.java:80) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.Event.execute(Event.java:87) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.EventDispatcher.dispatch(EventDispatcher.java:135) ~[sablo_2024.6.1.3983.jar:?]
at org.sablo.eventthread.EventDispatcher.run(EventDispatcher.java:90) ~[sablo_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.ngclient.eventthread.NGEventDispatcher.run(NGEventDispatcher.java:60) ~[servoy_ngclient_2024.6.1.3983.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.RuntimeException: Can’t get new foundset for: QBSelect(SELECT FROM arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5 WHERE (, : , (UPPER[TRIM[=BOTH*,=’ ',=FROM,arm_data:dbo:user_infodb:/arm_data/user_info#userinfo5.512=user_info_userid<-9,50,0>] null] null)=([=ME])))
at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getFoundSet(JSDatabaseManager.java:3347) ~[servoy_shared_2024.6.1.3983.jar:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:227) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]
… 25 more
Caused by: com.servoy.j2db.dataprocessing.DataException: Unknown errorCode 100
Incorrect syntax near ’ '.
at com.servoy.j2db.dblayer.Zb.Za(Zb.java:320) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.persistence.Zn.Za(Zn.java:822) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.buildServoyException(Zv.java:194) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.Za(Zv.java:1396) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.Za(Zv.java:1338) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.server.dataprocessing.Zv.performQuery(Zv.java:1497) ~[j2db_server_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.performQuery(FoundSet.java:7695) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.refreshFromDBInternal(FoundSet.java:473) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.browseAllInternal(FoundSet.java:360) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSet.loadAllRecords(FoundSet.java:341) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.FoundSetManager.getFoundSet(FoundSetManager.java:3570) ~[servoy_shared_2024.6.1.3983.jar:?]
at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getFoundSet(JSDatabaseManager.java:3343) ~[servoy_shared_2024.6.1.3983.jar:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:227) ~[org.eclipse.dltk.javascript.rhino_1.7.15.s1.jar:?]

and what are the 2 values exactly, those are normal strings? none empty?

on the admin page, what is the exact sql that you see that is being done?

Here is the admin trace log entry for the SQL statement that fails…

select user_info_id, user_info_userid from user_info where upper(trim(BOTH ’ ’ FROM user_info_userid)) = ? order by user_info_id asc, user_info_userid asc offset 0 rows fetch next ? rows only parameters: [‘ME’ ,type: java.lang.String, 201 ,type: java.lang.Integer]
at ARMTITAN/scopes/LoginSolution/validate_login:99 (validate_login)
at ARMTITAN/scopes/LoginSolution/sign_in:25 (sign_in)
at ARMTITAN/forms/login_start/signin_user:106 (signin_user)
at ARMTITAN/forms/login_start/onAction_signin:38 (onAction_signin)

The first parameter (‘ME’) is a string value, the second parameter (201) is an integer value.

The error reported is…

Unknown errorCode 100
Incorrect syntax near ’ '.

It looks like BOTH ’ ’ is the culprit, but why?

I want to point out that the SQL engine is MSSQL Express 16.1.1000. Could this possibly be a driver issue? We use the MSSQL driver that comes with Developer.

Hi Kim,

did some quick tests on my SQL Server developer edition and got the same error.
This is caused by the query builder which translates the trim function in an incompatible way (https://modern-sql.com/caniuse/trim_both_from)

var query = datasources.db.arm_data.user_info.createSelect()
   query.where
         .add( query.columns.user_info_userid.trim.upper.eq( UserName.trim().toUpperCase() ) )

Results in an invalid where clause

upper(trim(BOTH ' ' FROM user_info_userid)) = ?

I would create a support ticket for that.

More important is the question why you need all these functions on your database column.
If you handle the input by using the onDataChange event and then immediately store the user_info_userid value correctly (so trim the value anyway and optionally store it either lower- or uppercase)
You keep your database values sanitised and you don’t need to use the functions in your query.

Not only will this make your query easier to read, but it also allows SQL Server to use the index on the user_info_userid column, making the query execute faster. (assumed you have - and should have - indexed the column)
Currently the index will not be used as SQL Server needs to calculate the trim(upper(user_info_userid)) for each row in your database.

Anyway, assuming that the ‘trim’ is additional security and shouldn’t really be needed, your query can be changed to this:

var query = datasources.db.arm_data.user_info.createSelect()
   query.where
         .add( query.columns.user_info_userid.upper.eq( UserName ) )

Also note that I replaced the “UserName.trim().toUpperCase()” with just “UserName” as your code already stored the trimmed, uppercase value in the variable a couple of lines earlier

In order to sanitise the data in your database, you might want to execute the query below.
To keep values like this, use an onDataChange function as mentioned above.

update user_info set user_info_userid = trim(user_info_userid)

Hope this helps

Hi Kim,

The dialect does not seem to match quite your database.
We will fix that in a new release, as a workaround you can override the dialect in the servoy.properties file (replace the N with the correct server nr).

server.N.dialect=com.servoy.j2db.dialect.SQLServer2016Dialect

As Marc noted it is best practice to store key values like user names in a consistent way so that you don’t have to do any trimming when querying them.

Hope this helps,
Rob

Hi, Marc. Thanks for the feedback and suggestions! Much appreciated!

Hi, Rob. Yesterday, I uninstalled MSSQL 16 and replaced it with MSSQL 15. The login now works. I will keep your work-around handy when I go back to MSSQL 16. Thanks!

Created Support Ticket: SVY-19503

Hi Kim,

It seems the modern TRIM statement in SqlServer is only supported when a certain compability level is set, see https://learn.microsoft.com/en-us/sql/t … rver-ver16.

If you set it to 160, MSSQL v16 should not give errors.

We have fixed this in Servoy to check the compability level.

Rob

Hi, Rob.

Thanks for pointing out the compatibility level. For anyone else having this issue, here are the instructions to change the compatibility level in MSSQL…

I hope this helps!