Hallo,
bin gerade dabei unsere SAP Business One Datenbank MsSql an die 3cx anzubinden.
Komme aber leider nicht richtig weiter.
Bekomme immer den Fehler: Incorrect syntax near the keyword 'WHERE'.
Vermute, dass es an dem inner join liegt komme aber auf keine Lösung.
Started scenario with empty id
Request text: ConnectionString: Server=91.106.126.68;Database=SAP_VB_DB01;User Id=XXX_RO;Password=XXX;
Statement: SELECT CardCode AS contactid, FirstName AS firstname, LastName AS lastname, CardName AS companyname, E_MailL AS email, Cellolar AS phonemobile, Cellular AS phonemobile2, Tel1 AS phonehome, Tel2 AS phonehome2, Phone1 AS phonebusiness, Phone2 AS phonebusiness2 FROM ocpr inner join ocrd WHERE Cellolar '%488188%' or Cellular like '%488188%' or Tel1 LIKE '%488188%' or Tel2 like '%488188%' or Phone1 like '%488188%' or Phone2 like '%488188%'
System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'WHERE'.
at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__126_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CrmIntegration.SqlDatabaseClient.Execute(String statement, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessSQLDatabaseQuery(ISQLClientFactory sqlClientFactory, ScenarioQuery query, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(List`1 result, IEnumerable`1 scenariosToProcess, IValueManager customManager, Func`2 filterResultsFunctor, Func`1 createContactRecordFunctor, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfo(String contactNumber, InteractionTypes interactionType, CancellationToken token)
ClientConnectionId:30ed0e4c-2d25-49ed-a782-9a151ac2ee35
Error Number:156,State:1,Class:15
bin gerade dabei unsere SAP Business One Datenbank MsSql an die 3cx anzubinden.
Komme aber leider nicht richtig weiter.
Bekomme immer den Fehler: Incorrect syntax near the keyword 'WHERE'.
Vermute, dass es an dem inner join liegt komme aber auf keine Lösung.
Started scenario with empty id
Request text: ConnectionString: Server=91.106.126.68;Database=SAP_VB_DB01;User Id=XXX_RO;Password=XXX;
Statement: SELECT CardCode AS contactid, FirstName AS firstname, LastName AS lastname, CardName AS companyname, E_MailL AS email, Cellolar AS phonemobile, Cellular AS phonemobile2, Tel1 AS phonehome, Tel2 AS phonehome2, Phone1 AS phonebusiness, Phone2 AS phonebusiness2 FROM ocpr inner join ocrd WHERE Cellolar '%488188%' or Cellular like '%488188%' or Tel1 LIKE '%488188%' or Tel2 like '%488188%' or Phone1 like '%488188%' or Phone2 like '%488188%'
System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'WHERE'.
at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__126_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at CrmIntegration.SqlDatabaseClient.Execute(String statement, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessSQLDatabaseQuery(ISQLClientFactory sqlClientFactory, ScenarioQuery query, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(List`1 result, IEnumerable`1 scenariosToProcess, IValueManager customManager, Func`2 filterResultsFunctor, Func`1 createContactRecordFunctor, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfo(String contactNumber, InteractionTypes interactionType, CancellationToken token)
ClientConnectionId:30ed0e4c-2d25-49ed-a782-9a151ac2ee35
Error Number:156,State:1,Class:15