Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Serviced Component, Excel and OleDbConnection.Open

Serviced Component, Excel and OleDbConnection.Open

Scheduled Pinned Locked Moved COM
helpc++comsysadmintesting
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Turtle Hand
    wrote on last edited by
    #1

    I'm using the OleDbConnection object to retrieve the contents of an Excel Worksheet as a DataSet. This works fine when testing the MyExcel.GetMonthly() method call. When I call MyExcel.GetMonthly() from a Serviced Component, it bombs. Code snippet: OleDbConnection cn = new OleDbConnection(CnString); cn.Open(); <-- Error occurs here In an effort to isolate the problem I created a new class and called MyExcel.GetMonthly() from it. Without ServicedComponent inheritence it works fine. With ServicedComponent inheritence it crashes with: A condition has occurred that indicates this COM+ application is in an unstable state or is not functioning correctly. Assertion Failure: !m_punk Server Application ID: {6E4E5709-D807-46DD-819E-2B3D150FC547} Server Application Instance ID: {C73018C7-1BB0-4DB2-A9DB-4D9E22521507} Server Application Name: MSRBLL The serious nature of this error has caused the process to terminate. COM+ Services Internals Information: File: d:\qxp_slp\com\com1x\src\comsvcs\jit\jit.cpp, Line: 858 Comsvcs.dll file version: ENU 2001.12.4414.258 shp Any thoughts?

    T 1 Reply Last reply
    0
    • T Turtle Hand

      I'm using the OleDbConnection object to retrieve the contents of an Excel Worksheet as a DataSet. This works fine when testing the MyExcel.GetMonthly() method call. When I call MyExcel.GetMonthly() from a Serviced Component, it bombs. Code snippet: OleDbConnection cn = new OleDbConnection(CnString); cn.Open(); <-- Error occurs here In an effort to isolate the problem I created a new class and called MyExcel.GetMonthly() from it. Without ServicedComponent inheritence it works fine. With ServicedComponent inheritence it crashes with: A condition has occurred that indicates this COM+ application is in an unstable state or is not functioning correctly. Assertion Failure: !m_punk Server Application ID: {6E4E5709-D807-46DD-819E-2B3D150FC547} Server Application Instance ID: {C73018C7-1BB0-4DB2-A9DB-4D9E22521507} Server Application Name: MSRBLL The serious nature of this error has caused the process to terminate. COM+ Services Internals Information: File: d:\qxp_slp\com\com1x\src\comsvcs\jit\jit.cpp, Line: 858 Comsvcs.dll file version: ENU 2001.12.4414.258 shp Any thoughts?

      T Offline
      T Offline
      Turtle Hand
      wrote on last edited by
      #2

      Guess I'll answer my own post :) To ways to solve this problem: 1.) Put the assembly in the GAC 2.) Put the class that works directly with Excel in it's own Class Library project. It doesn't need to inherit from ServicedComponent, only the rest of the Data Acess Layer needed COM+. It's good to be alive

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups