Greetings,
I am trying to create new ODBC Data Source connection in Laserfiche Forms.
I already created the 64 bit ODBC Data Source. The source of the data is located in an Excel File saved within the Laserfiche Server.
Once I try to test the connection to the ODBC Data Source from Laserfiche forms, I receive the following error:
An error occurred while testing the data source connection. See the Windows Event Log for details. [LFF2400-DataSourceConnectionError]
Here are the details of the error:
An error occurred while testing the data source connection. See the Windows Event Log for details. [LFF2400-DataSourceConnectionError]
Details:
URL: /Forms/api/datasource/test
Error: DataSourceConnectionError
Date: 2023-12-19 10:57:05 AM (Eastern Standard Time)
HTTP Status Code: 400
Business Process ID: 0
User: ******
IP: ******
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0
Business Process Name:
Stack Trace:
Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: An error occurred while testing the data source connection. See the Windows Event Log for details. [LFF2400-DataSourceConnectionError]
at E_Forms.Controllers.AuthorizationController.TestDatasource(Int32 dbType, String server, String db, String user, String password, Int32 dbId)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_6.<BeginInvokeAction>b__4()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult)
Inner exception: System.Data.Odbc.OdbcException
Message: ERROR [HY000] [Microsoft][ODBC Excel Driver] The Microsoft Access database engine cannot open or write to the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view and write its data.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Excel Driver] The Microsoft Access database engine cannot open or write to the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view and write its data.
at Laserfiche.Forms.EntityModels.Data.ODBCDBConnector.OpenConnection()
at Laserfiche.Forms.CommonUtils.OdbcConnector..ctor(DataBaseType dbType, String server, String database, String uid, String pwd)
at Laserfiche.Forms.CommonUtils.OdbcConnector.GetODBCConnection(WindowsImpersonationContext& ctx, IntPtr& tokenPtr, DataBaseType databaseType, String server, String db, String user, String pw)
at E_Forms.Models.ViewModels.DataSource.TestDatasource(Int32 dbId, Int32 dbType, String server, String db, String user, String password)
at E_Forms.Controllers.AuthorizationController.TestDatasource(Int32 dbType, String server, String db, String user, String password, Int32 dbId)
Please note that the account I am using to connect to the data source have sufficient rights. I use it all the time to connect to other data sources, but I do this from Laserfiche Workflows, not Laserfiche Forms. The account is already added in Laserfiche Forms as an administrator account.
Also, the username and password for the account is correct.
I am running out of ideas to troubleshoot this issue. I would appreciate your support.
Sincerely,
Wissam