Home > Cannot Change > Cannot Change The Activeconnection

Cannot Change The Activeconnection

The function causing the problem is as follows: Public Type SPDataset Name As String 'Name of the stored procedure arrParameters() As String Source As String 'The calling Form bSuccess As Boolean My guess is ADO gets confused by the rowcounts being generated by the statements prior to the actual SELECT that returns data. Join Now For immediate help use Live now! Powered by vBulletinCopyright ©2000 - 2016, Jelsoft Enterprises Ltd.Forum Answers by - Gio~Logist - Vbulletin Solutions & Services Home Register New Posts Advertising Archive Privacy Statement Sitemap Top Hosting and Cloud check over here

Storage of a material that passes through non-living matter How to convert numbers to currency values? Yes, my password is: Forgot your password? Else fight the flow sageer_kazi Starting Member 2 Posts Posted-11/24/2004: 12:46:04 But i need to get the resultset and other related values from the inserted values in the tablePlz If you use a command object, you set the connection on the command then open it with a recordset, or as a recordset. look at this web-site

Reply With Quote 03-03-2003,11:00 AM #2 Rune Bivrin Guest Re: Changing an SP causes a Recordset object error. With sqlCmd .ActiveConnection = sqlConn .CommandText = ExecuteSP.Name .CommandType = adCmdStoredProc .Parameters.Refresh 'Load the parameters If IsArrayAllocated(ExecuteSP.arrParameters) Then For N = LBound(ExecuteSP.arrParameters) To UBound(ExecuteSP.arrParameters) .Parameters("@" & ExecuteSP.arrParameters(N, 0)).Value = ExecuteSP.arrParameters(N, 1) P.S. Is the error mesage that is currently driving me nutty.

Let me explain. Subscribe to our monthly newsletter for tech news and trends Membership How it Works Gigs Live Careers Plans and Pricing For Business Become an Expert Resource Center About Us Who We Rune Bivrin "Keith" wrote: > >I have an SQL7 database and a VB6 app, linked via ADO 2.5 - one particular >stored procedure builds a temp table then returns said This argument is not supported by the OLE DB Provider for AS/400 and VSAM.

Copyright © 2004 Microsoft Corporation.All rights reserved. up vote 4 down vote favorite I've gotten the "Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source" error in my classic asp Let me explain. https://msdn.microsoft.com/en-us/library/ee275490(v=bts.10).aspx To start viewing messages, select the forum that you want to visit from the selection below.

This property sets or returns a String containing the definition for a connection or a Connection object. That hasn't worked unfortunately. wrote: > ...which has a command object as its source. > > Is the error mesage that is currently driving me nutty. The SET NOCOUNT ON worked.

Not the answer you're looking for? http://forums.devx.com/showthread.php?19317-Changing-an-SP-causes-a-Recordset-object-error current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Get yourself a copy of the The Holy Book order has no physical Brett in The meaning of a Kaiser . -database data Reply With Quote 12-23-03,09:55 #3 DavidGrimes View Profile Advanced Search Forum ASP Technology ASP Cannot change the ActiveConnection property of a R If this is your first visit, be sure to check out the FAQ by clicking the link

Can I hint the optimizer by giving the range of an integer? http://electrictricycle.net/cannot-change/cannot-change.html The results set being passed top VB is a select from the temp table. The comments are property of their posters. Join & Ask a Question Need Help in Real-Time?

Sign up now! Set sqlRS = New ADODB.Recordset Set sqlCmd = New ADODB.Command Set sqlConn = New ADODB.Connection 'Make sure the project is connected to the server If (CurrentProject.IsConnected = False) Then 'Stop the To use the OLE DB Provider for AS/400 and VSAM, the Provider string must be set to "SNAOLEDB". this content Please > login and try again.", vbExclamation, "Database Error" > ExecuteSP.bSuccess = False > > Else > > sqlConn.ConnectionString = CurrentProject.Connection > sqlConn.Open > > sqlConn.CursorLocation = adUseClient 'Cache data locally

User IDSpecifies a valid mainframe or AS/400 user name to use when opening the connection. GaryC123 EE Cleanup Volunteer 0 Featured Post How your wiki can always stay up-to-date Promoted by Quip, Inc Quip doubles as a “living” wiki and a project management tool that evolves Newer Than: Search this thread only Search this forum only Display results as threads Useful Searches Recent Posts More...

Contact us.

If you attempt to call the Execute method on a Command object before setting the ActiveConnection property to an open Connection object or valid connection string, an error occurs. The time now is 07:34. PasswordSpecifies a valid mainframe or AS/400 password to use when opening the connection. All rights reserved.

It works 90% of the time, with and without passed parameters but sometimes I get the aforementioned error message. Sign Up Now! For Command objects, the ActiveConnection property is read/write. have a peek at these guys Is the error mesage that is currently driving me nutty.

If so,don't use a Command object! The information needed to establish a connection to a data source can be set in the ActiveConnection property of a Recordset object or passed as part of the Open method on You may have to call it twice, one for each cursor. Join the community of 500,000 technology professionals and ask your questions.

Thanks all. If the Source property of the Recordset object is set to a valid Command object variable, the ActiveConnection property of the Recordset inherits the setting of the Command object's ActiveConnection property. ProviderSpecifies the name of the provider to use for the connection. I'd assumed that the old ActiveConnection property was somehow being held in memory and the workaround was flushing it out.

With sqlCmd .ActiveConnection = sqlConn .CommandText = ExecuteSP.Name .CommandType = adCmdStoredProc .Parameters.Refresh 'Load the parameters If IsArrayAllocated(ExecuteSP.arrParameters) Then For N = LBound(ExecuteSP.arrParameters) To UBound(ExecuteSP.arrParameters) .Parameters("@" & ExecuteSP.arrParameters(N, 0)).Value = ExecuteSP.arrParameters(N, 1) It works 90% of the time, with and without passed parameters but sometimes I get the aforementioned error message. Results 1 to 2 of 2 Thread: Cannot change the ActiveConnection property of a R Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Please login and try again.", vbExclamation, "Database Error" ExecuteSP.bSuccess = False Else sqlConn.ConnectionString = CurrentProject.Connection sqlConn.Open sqlConn.CursorLocation = adUseClient 'Cache data locally ' Open recordset.

First, Just open a new email message. Copy command.ActiveConnection = connectionString activeConnectionString = recordset.ActiveConnection Remarks The ActiveConnection property is used to determine the Connection object over which the specified Command object will execute or the specified Recordset will Eventually you will find a recordset that is your recordset. With sqlCmd .ActiveConnection = sqlConn .CommandText = ExecuteSP.Name .CommandType = adCmdStoredProc .Parameters.Refresh 'Load the parameters If IsArrayAllocated(ExecuteSP.arrParameters) Then For N = LBound(ExecuteSP.arrParameters) To UBound(ExecuteSP.arrParameters) .Parameters("@" & ExecuteSP.arrParameters(N, 0)).Value = ExecuteSP.arrParameters(N, 1)

This documentation is archived and is not being maintained. I'd have to figure through what you did & what you've got. 0 LVL 58 Overall: Level 58 ASP 19 Message Expert Comment by:Gary2003-09-15 No comment has been added lately, I'm currently looking at rewriting it without cursors though so it may be ok. When I use the temp table I get an error that states: "Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source." If I

Author Name Remember Me? If you are, when you set the active connection to nothing, you will get this error. Some providers allow you to change the ActiveConnection property setting from one Connection to another, without having to first set the property to Nothing. DevX Home Today's HeadlinesArticles ArchiveTip BankForums Register Help Remember Me?