You are viewing limited content. For full access, please sign in.

Question

Question

DataSourceConnectionError

asked on April 20, 2021 Show version history

I'm having an issue adding ODBC as a datasource.  I have two files one is an excel file with an ID column the other is an Access db.  I can't see what the issue is.  Any suggestions would be appreciated.  

Below is an error I receive when attempting to add ODBC data source to my forms server: 

 

Details:
URL: /Forms/api/datasource/datasource
Error: DataSourceConnectionError
Date: 4/20/2021 10:18:36 AM (Pacific Standard Time)
HTTP Status Code: 400
Business Process ID: 0

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36
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 E_Forms.Controllers.AuthorizationController.DataSourceSaveDatasource(Int32 dbType, String displayName, String server, String db, String user, String pw, Boolean edit, 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 [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
   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)

0 0

Replies

replied on April 21, 2021

Hi Ramika,

https://doc.laserfiche.com/laserfiche.documentation/11/administration/en-us/Default.htm#../Subsystems/Forms/Content/Settings/ODBC-Data-Sources.htm

Could you provide more information on how you configure the ODBC driver on Forms machine? Is it user DSN or System DSN? Is it same 64-bit/32-bit as operating system?

0 0
replied on April 22, 2021

user dsn

32-bit preferred as mdb or xls is not listed under 64-bit.

no username/password set

 

0 0
replied on April 22, 2021

As mentioned in online help,

On an x64 operating system, if you install Forms 64 bit, use 64 bit ODBC. If you install 32 bit, use 32 bit ODBC.

When you configure as a user DSN, the driver is only available when the FormsAppPool identity is set with the user who created the user DSN.

Could you check whether your configuration meet the requirement?

0 0
replied on May 5, 2021

I configured initially for 32-bit odbc.  The message is still the same.  LFF2400

0 0
replied on April 11, 2024

I encountered this same issue and found that the folder permissions needed to be set from the root.  In my configuration, I placed the file on the server local partition at c:\{data folder}\{data subfolder}\data_target.xlsx.

Given my data file was stored in a subfolder (this was done to allow end users to edit the file as needed, but I wanted to restrict them from accessing other sources on the same root folder), I had to use the inherit permissions and then validate the access.   

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.