Error on highlighted line: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one other
If I modify my recordset string toCode:iconnTrans = CreateObject("ADODB.Connection") Set iconnPromo = CreateObject("ADODB.Connection") Set rsTrans = CreateObject("ADODB.Recordset") Set rsPromoTrans = CreateObject("ADODB.Recordset") iconnTrans.open _ "Provider=SQLOLEDB.1;Data Source = localhost\sqlexpress;Integrated Security = SSPI;Initial Catalog=dw2" iconnPromo.open _ "Provider=SQLOLEDB.1;Data Source = localhost\sqlexpress;Integrated Security = SSPI;Initial Catalog=dw" rsTrans.open "SELECT TransactionID, StockID, Promotion FROM Transactions WHERE OnPromotion='yes'", iconnTrans, adOpenStatic, adLockOptimistic Do Until rsTrans.EOF wscript.echo rstrans.TransactionID rsTrans.Movenext LoopNo records are being returned. rsTrans.RecordCount=-1Code:sTrans.open "SELECT TransactionID, StockID, Promotion FROM Transactions WHERE OnPromotion='yes'", iconnTrans


Reply With Quote

