Jump to content

stim100986

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by stim100986

  1. OK, I give. I am trying to do something simpler than this, took the code that seems to have worked here and made my minor changes to it: #include <array.au3> #include <file.au3> Global Const $iCursorType = 0 ; adOpenForwardOnly Global Const $iLockType = 1 ; adLockReadOnly Global Const $iOptions = 2 ; adCmdTable Global $oConnection = ObjCreate("ADODB.Connection") ; Create a connection object Global $oRecordset = ObjCreate("ADODB.Recordset") ; Create a recordset object Global $sConnectionString = "DSN=myDSN;uid=myuserid;pwd=mypassword" $oConnection.Open($sConnectionString) ; Open the connection Global $sSQL = "select stuff from table where things" $oRecordset = $oConnection.Execute ($sSQL) $oRecordset.cursortype = 3 With $oRecordset While Not .EOF ; repeat until End-Of-File (EOF) is reached ConsoleWrite("Process the fields collection: ") For $oField In .Fields ConsoleWrite($oField.Value & "|") Next ConsoleWrite(@CR) ConsoleWrite("Process the fields by item number: " & .Fields(0).Value & "|" & .Fields(1).Value & "|" & .Fields(2).Value & "|" & @CR) .MoveNext ; Move To the Next record WEnd EndWith $oRecordset.Close ; Close the recordset $oRecordset = 0 ; Release the connection object $oConnection.Close ; Close the connection $oConnection = 0 ; Release the connection object and after what appears to be enough time for the select statement to complete, I get: (My Directory) (13) : ==> The requested action with this object has failed.: $oRecordset = $oConnection.Execute ($sSQL) $oRecordset = $oConnection.Execute ($sSQL)^ ERROR What am I missing???
  2. Hello, I currently have a script that runs multiple SQL BIDS solutions throughout the day. The packages are et to run at approximately 1/2 hour intervals, as data sources are updated with data for previous day at different times of the day. Unfortunately, there is currently an issue with data delays at one of the data sources, causing a few packages to fail dut to table lockout (restricted user). We have a simple verification query that scheks last updated date from the source, and we are capturing and sending an email when this occurs. Our current woraround is to kill the script and run those packages manually later in the day, but this then has us playing catch up as the entire schedule falls behind even further. It is highly preferable for this data to be loaded at the time we currently have it scheduled, and our hope is the delay is only temporary. But in the meantime, we are hoping someone knows of a way to loop back and re-attempt an upload for a failed package without going manual the rest of the day. I hope this all makes sense to someone out there
×
×
  • Create New...