嗨,任何人都可以告诉我,如何使用 ASP.NET 连接 Navision。这是我在 Web.Config 中设置的连接字符串
<connectionStrings>
<add name="Navision" connectionString="dsn=TEST;uid=user1;pwd=paswd;database=Test;CompanyName=HHT Test;" />
</connectionStrings>
但是当我尝试连接时,我收到了这个错误:
System.Data.Odbc.OdbcException: ERROR [S1000] [Simba][SimbaEngine ODBC Driver]
[DRM File Library] The operating system returned the error (183):Cannot create
a file when that file already exists.
Error: 183
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01S00] [Simba][SimbaEngine ODBC Driver]Invalid connection string attribute.
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the
version of ODBC behavior that the application requested (see SQLSetEnvAttr).
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection,
OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection,
OdbcConnectionString connectionOptions)
at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options,
Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection,
DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,
DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
at Service.Getdataset(String SqlStr)
我正在使用Navision 4.0 SP3和相同的 ODBC 驱动程序。