473,382 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 "ActiveConnection" property to "nothing"

Set objCmd.ActiveConnection = Nothing

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

Any pointers on what might have gone wrong???
Jan 23 '07 #1
2 2852
sashi
1,754 Expert 1GB
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 "ActiveConnection" property to "nothing"

Set objCmd.ActiveConnection = Nothing

The application hangs at this stage. The code after this lines are not executed. Also I checked the "ActiveConnection" 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.
Jan 23 '07 #2
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.dll" and "SQLOLEDB.rll" 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???
Jan 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Navin | last post by:
hi, i am using the follwoing code to write a recordset to a csv file 'fcreateFile -file system object Do While Not oRs.EOF fcreateFile.Write(oRs.GetString(,1000,",",vbcrlf,"")) 'Write Login...
2
by: Stefan Berglund | last post by:
I was looking for a general consensus as to whether the ActiveConnection property of the command object should be set to Nothing or whether it's sufficient to set the command object itself to...
6
by: PT | last post by:
I got a form with many text boxes, checkboxes and 3 drop downs. From that 3, 2 are dependant. I can choose one drop down, and the next drop down should display the dependant values of the first...
2
by: Yves Touze | last post by:
Hi All, I'm trying to migrate from SQL Server 7.0 to SQL Server 2000. I've got some ASP page which call VB components that retrieve shaped recordsets from SQL Server using the MSDATASHAPE...
17
by: Gabriel Mejía | last post by:
Services or applications using ActiveX Data Objects (ADO) 2.0 or greater may intermittently return empty recordsets on queries that should be returning valid results. At the time the problem...
4
by: Beetle | last post by:
We are having a problem with XML in SQL Server 2000. When we run a stored procedure that uses FOR XML Explicit from the Query Analyzer, it returns the correct format :...
5
by: Mark | last post by:
Hi All, This maybe a really simple question but I need some help. I have been having problems with security and thanks to the help received from a reply to an earlier post, I have found a...
6
by: Joel Whitehouse | last post by:
Hello all: After the 38th iteration of a loop that calls this code, I get the following error: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in...
12
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.