tag:blogger.com,1999:blog-5285970135510371565.post2747136078919007455..comments2024-03-23T07:53:50.523-04:00Comments on The Dynamics GP Blogster: IM - Retrieving document numbers assigned by Microsoft Dynamics GP when field rule is set to Use Default in Integration Manager - Part 2Mariano Gomezhttp://www.blogger.com/profile/13267738662239812289noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5285970135510371565.post-15655322324645264482012-01-11T14:40:05.218-05:002012-01-11T14:40:05.218-05:00Got past my first issue..with a simple oCn.State i...Got past my first issue..with a simple oCn.State instead of oCn.Status.<br /><br />Now on 2nd step I have this error.<br />Error on line 11 - Expected end of statement.<br /><br />No idea what is wrong.<br /><br />sSQL = "SELECT COUNT(RCPTNMBR) as sCOUNT FROM " & GPConnection.GPConnIntercompanyID & ".dbo.CM20300 WHERE RCPTNMBR = '" & DestinationFields("Number").Value & "' and RCPTAMT = " & SourceFields("DSR.Debit")<br />SetVariable "error", 0<br />Set oCmd = CreateObject("ADODB.Command")<br />Set oRst = CreateObject("ADODB.Recordset")<br />With oCmd<br /> .ActiveConnection = GetVariable("gblConn")<br /> .CommandType = adCmdText<br /> .CommandText = sSQL<br /> Set oRst = .Execute()<br />If oRst.EOF Then <br />sCount = oRst!sCOUNT<br />End If <br />oRst.Close<br />End With<br />If sCounter >= 1 Then<br />sErrMsg = DestinationFields("Number").Value & " is a duplicate."<br />SetVariable "error", 1<br />End IfRobyn Evansnoreply@blogger.comtag:blogger.com,1999:blog-5285970135510371565.post-76400221258305035752012-01-11T13:46:17.468-05:002012-01-11T13:46:17.468-05:00I am getting the error message using the before in...I am getting the error message using the before integration piece.<br /><br /> ERROR: Error Executing Script 'Before Integration' Line 13: - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<br />Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<br />Error Executing Script 'Before Integration' Line 13: - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<br />Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<br /><br /><br />If i take out the adUserClient and cursor stuff and the if I get a good call to the db. Not sure what is going on with the cursor peiceAnonymousnoreply@blogger.com