Hi,
I have one table and two queries:
Trades: TradeID, StrategyID, AssetTypeID, Identifier, Nominal, Shares, Contracts, Currency, ReferencePortfolioCode, Ticker, RedID, Maturity, AverageCleanPrice, CurrentCleanPrice, AverageClosingPrice, ClosingDate, TargetPrice, Coupon, CouponFreq, StopLoss, Rationale, TimeStamp, Description, TotalPerformance, TotalPerformanceEUR, TickValue, TickSize, UploadOpen, UploadClose, BuySellProtection, MarketValueOpen, MarketValueClose, MarketValueCurrent, Position, ILB_Factor, ILB_Factor_AtOpen, TotalPerformanceCP1, TotalPerformanceEURCP1, MarketValueCP1, CP1Price, SecurityDes, EquityTicker, ABSPoolFactorAtOpen, ABSPoolFactorCurrent, ABSPoolFactorCP1, FxAtBuy, CurrentCleanPriceBid, CurrentCleanPriceAsk, CashMsg, CDS_MV_Open_Clean, CDS_MV_Open_Clean_CP1, CDS_MV_Close_Clean, CDS_MV_Current_Clean, Seniority, IlliquidAssetBidAsk
AssetClass03_NotClosed: AssetType, PortfolioCode, Identifier, TradeDate, Contracts, PMCode, TradeID, StrategyID
AssetClass05_NotClosed: AssetType, PortfolioCode, Identifier, Position, Description, Currency, ReferencePortfolioCode, TradeDate, PMCode, TradeID, StrategyID
I try to read (excel 2007 - vba) the db via these sql codes:
and
The first line of code works fine, second line produces an error:
Run-time error '-2147467259 (80004005)':
Method 'Open' of object '_Recordset' failed
I am using ADODB, the error occurs in this line:
Why the second command crashes? The commands structures are similar.
Thanks for any help,
Lloyd
Bookmarks