我正在使用Invantive Query Tool大规模更新Exact Online中供应商的地址数据。我编写了一些VBA代码,生成SQL代码以放入Invantive Query Tool。我之前使用过它并且工作正常,我在大约1或2个月前更新了数百个Exact Online表值。现在我想使用相同的代码来运行新的更新,但是我得到了以前没有得到的错误。
让我们从以前的代码开始:
use 1091919
UPDATE exactonlinerest..Accounts
SET AddressLine1='Nieuw Walden 56-64'
WHERE code like '% 500053'
AND AddressLine1 != 'Nieuw Walden 56-64'
AND division = 1091919
当我运行时,我收到错误:
Unknown identifier: 'AddressLine1'."
并获得使用“AddressLine1 _”的建议。
所以我添加了下划线,它确实消除了查找AddressLine1
时的错误,但是我得到一个新的错误:
Unknown identifier: 'ID'.
我不知道它来自哪里。这些是错误细节:
UPDATE exactonlinerest..Accounts SET AddressLine1_='Nieuw Walden 56-64' WHERE code like '% 500053' AND AddressLine1_ != 'Nieuw Walden 56-64' AND division = 1091919
Type: Invantive.Configuration.ValidationException
bij Invantive.Configuration.ValidationException..ctor(String errorCode,
String errorMessage, String kindRequest, String localStackTrace,
String nk, Exception innerException)
bij Invantive.Sql.ExpressionParser.<>c__DisplayClass4_0.CreateExpressionParser>b__1(String qualifiedColumnName)
bij Invantive.Data.ExtensionMethods.TryGetValue[TKey,TValue](Dictionary`2dictionary, TKey key, Func`2 customExceptionFunction)
bij Invantive.Sql.ExpressionParser.<>c__DisplayClass4_0.<CreateExpressionParser>b__0(String name)
bij Invantive.Sql.TransformToExpression.GetExpressionForField(String fieldName, Type& type)
bij Invantive.Sql.TransformToExpression.GetProjectionForField(String fieldName, Type& type)
bij Invantive.Sql.UpdateStatementTree.CompileInternal(ParameterList parameters, ExpressionParser expressionParser)
bij Invantive.Sql.QueryTree.Compile(ParameterList parameters,ExpressionParser expressionParser)
bij Invantive.Sql.QueryPlan.ForcePlan()
bij Invantive.Sql.QueryPlan.get_Fields()
bij Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlAction(String actionSql, ParameterList parameters, String& handlingPath)
bij Invantive.Data.ConnectionManager.PassthroughSqlAction(String actionSql, ParameterList parameters)
bij Invantive.Data.ActionProceduresBase.PassthroughSqlAction(String actionSql, ParameterList parameters)
bij Invantive.Producer.Windows.Forms.QueryTool.ExecuteStatement(IProgressNotifier notifier, String statement, ParameterList bindVariables, Boolean showResultsInGrid, Boolean showStatistics, Boolean memorizeStatisticsInSqlHistory, Boolean allowPaging)
bij Invantive.Producer.Windows.Forms.QueryTool.FetchResultsFromSql()
bij Invantive.Producer.Windows.Forms.QueryTool.<>c__DisplayClass135_0.<FetchData>b__0()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()
bij Invantive.Data.ExtensionMethods.TryGetValue[TKey,TValue](Dictionary`2 dictionary, TKey key, Func`2 customExceptionFunction) in File216:regel 1601
bij Invantive.Sql.ExpressionParser.<>c__DisplayClass4_0.<CreateExpressionParser>b__0(String name) in File118:regel 53
bij Invantive.Sql.TransformToExpression.GetExpressionForField(String fieldName, Type& type) in File115:regel 826
bij Invantive.Sql.TransformToExpression.GetProjectionForField(String fieldName, Type& type) in File115:regel 878
bij Invantive.Sql.UpdateStatementTree.CompileInternal(ParameterList parameters, ExpressionParser expressionParser) in File112:regel 132
bij Invantive.Sql.QueryTree.Compile(ParameterList parameters, ExpressionParser expressionParser) in File131:regel 91
bij Invantive.Sql.QueryPlan.ForcePlan() in File130:regel 86
bij Invantive.Sql.QueryPlan.get_Fields() in File130:regel 63
bij Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlAction(String actionSql, ParameterList parameters, String& handlingPath) in File39:regel 3754
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bij Invantive.Data.ConnectionManager.ExecuteProviderPassthroughSqlAction(String actionSql, ParameterList parameters, String& handlingPath) in File39:regel 3789
bij Invantive.Data.ConnectionManager.PassthroughSqlAction(String actionSql, ParameterList parameters) in File39:regel 1928
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
bij System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bij Invantive.Data.ConnectionManager.PassthroughSqlAction(String actionSql, ParameterList parameters) in File39:regel 1940
bij Invantive.Data.ActionProceduresBase.PassthroughSqlAction(String actionSql, ParameterList parameters) in File29:regel 212
bij Invantive.Producer.Windows.Forms.QueryTool.ExecuteStatement(IProgressNotifier notifier, String statement, ParameterList bindVariables, Boolean showResultsInGrid, Boolean showStatistics, Boolean memorizeStatisticsInSqlHistory, Boolean allowPaging) in File934:regel 2876
bij Invantive.Producer.Windows.Forms.QueryTool.FetchResultsFromSql() in File934:regel 2459
如果可以修复此错误,我会非常感激。
答案 0 :(得分:1)
这最终成为SQL引擎评估中的一个错误。
如果您仍然遇到此事,请告诉我。