Problem while setting ActiveConnection property of ADODB Command object to NOTHING

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vinayaka B L
    New Member
    • Jan 2007
    • 2

    Problem while setting ActiveConnection property of ADODB Command object to NOTHING

    Hi all,

    'm using ADODB.Command object for interactig with database in my application.
    In the code i'm calling "Execute" method to insert a new row into the database. After writing data into the the database the identity key of that row is being returned. I can see that ID is being returned from database successfully, also in the backend i can see the new row which was inserted.

    Immediately after this, i'm setting "ActiveConnecti on" property to "nothing"

    Set objCmd.ActiveCo nnection = Nothing

    The application hangs at this stage. The code after this lines are not executed. Also I checked the "ActiveConnecti on" value, it is showing a valid connection string.

    Any pointers on what might have gone wrong???
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Originally posted by Vinayaka B L
    Hi all,

    'm using ADODB.Command object for interactig with database in my application.
    In the code i'm calling "Execute" method to insert a new row into the database. After writing data into the the database the identity key of that row is being returned. I can see that ID is being returned from database successfully, also in the backend i can see the new row which was inserted.

    Immediately after this, i'm setting "ActiveConnecti on" property to "nothing"

    Set objCmd.ActiveCo nnection = Nothing

    The application hangs at this stage. The code after this lines are not executed. Also I checked the "ActiveConnecti on" value, it is showing a valid connection string.

    Any pointers on what might have gone wrong???

    Hi there,

    More accurate solutions can be provided if you can give us more details such as the database back-end as well as the portion of the code that you are working with. It's much easier to debug your code in that way. Good luck & Take care.

    Comment

    • Vinayaka B L
      New Member
      • Jan 2007
      • 2

      #3
      Originally posted by sashi
      Hi there,

      More accurate solutions can be provided if you can give us more details such as the database back-end as well as the portion of the code that you are working with. It's much easier to debug your code in that way. Good luck & Take care.

      I'm using SQL server as backend. Also in Event viewer i saw this information:
      Event ID: 26 - Application Popup: SQL Server OLEDB provider support error : Unable to load SQL server OLEDB provider resource DLL. The application cannot continue. .

      I checked for the existance of "SQLOLEDB.d ll" and "SQLOLEDB.r ll" files, both are present in the correct folder and both have same version.

      Also i reinstalled MS-SQL and MDAC (version 2.8), Service pack 3 for windows 2003. But nothing worked.

      Can anyone help me resolving this issue???

      Comment

      Working...