Error 3709 Ole
Contents |
Connection Run-time error ‘3709' ★★★★★★★★★★★★★★★ David Musgrave10 April 20132 0 0 0 It has been a long time since I shared a Quick Tip for Visual Basic for Applications (VBA), but I have error 3709 the search key was not found had this one waiting for me to write up for a while. When using VBA
Error 3709 Access
on a window with ActiveX Data Object (ADO) to connect to SQL Server to read and/or write data to tables, the error 3709 access 2010 best practice is to open the ADO connection on the Window_BeforeOpen() event and to close the ADO connectionusing the Window_AfterClose() event. This is similar to the best practice for reports discussed in theUsing ADO with VBA error 3709 the connection cannot be used with Report Writerpost. There is one big difference in behaviour between windows and reports that can cause problems with this technique…. cue dramatic music….. Windows have a user interface which might cause a dialog to open and the window closure to be aborted. OK, big deal, why should this cause a problem for us? Well, let's work with the following scenario: The user opens the window and the Window_BeforeOpen() event
Run Time Error 3709 The Connection Cannot Be Used
opens the ADO connection. The user is working in the window and the VBA code is reading and writing via ADO as desired. The user is has finished editing data in the window (but has not saved) and closes the window. The "Do you want to Save, Discard or Cancel?" dialog opens and the user decides to cancel. The window closure is aborted and the window stays open. The user continues working and the next time VBA attempts to use ADO, the following error shows up: Run=time error ‘3709': Requested operation requires an OLE DB Session object, which is not supported by the current provider. So what happened? The issue here is that while theDexterity WIN_POST script abortedthe window closure, the script itself as still executed. Therefore the VBA Window_AfterClose() script also executed… and closed the ADO connection even though the window remained open. The solution to this issue is to make sure that the Window_AfterClose() script does not close the ADO connection if Cancel was selected on the pop up dialog. Please see the Knowledge Base (KB) Article below for details of the solution including example scripts: How to use ActiveX Data Object (ADO) with VBA on a window with Microsoft Dynamics GP and with Microsoft Business Solutions - Great Plain
(PL) Sign in / Sign up EN English (EN) Русский (RU) Español (ES) Français (FR) Deutsch (DE) Nederlands (NL) Íslenska (IS) Eesti (ET) Қазақша (KK) Українська (UK) Dansk (DA) Català (CA) Polski (PL) Sign in / Sign up General Computers and Networking Questions 0 ADODB.Command Error: (3709) Help! Wshiwsbrding 9 years ago requested operation requires an ole db session object 3709 in Computers and Networking • updated by Janine 9 years ago • 5 Have tried everything run time error 3709 the search key was not found in the help files to get my client computer to connect to the server computer. still get this error:ADODB.Command Error: Requested operation requires an OLE
Adodb.command Error '800a0e7d'
DB Session object, which is not supported by the current provider. (3709)Tried re-installing service ceo, tried re-installing the data base managment tools, tried making the client the server and the server the client, tried the tests, ping test is ok, https://blogs.msdn.microsoft.com/developingfordynamicsgp/2013/04/10/quick-tip-vba-ado-connection-run-time-error-3709/ telnet test is failed, tried making sure port 1433 is forwarded on the server, Yes the database name etc is correct.Anybody have any ideas? Thanks Vote 0 0 Undo Follow Replies 5 Oldest first Newest first Oldest first 0 Janine 9 years ago I'm still getting this too. I've uninstalled and reinstalled and tried every fix I could find in the documentation. Someone said it's the sample database but I tried using a blank database today and it still doesn't work.So far http://sceooffice.userecho.com/topics/5559-adodbcommand-error-3709-help/ this has taken about 12 hours of my time and I have a long way to go still - not encouraging.SeniorMoves, Inc.Relocation Services for Older Adults in the Memphis Area with Resources Nationwide Reply Is it? Inappropriate Spam Duplicate | 0 Wshiwsbrding 9 years ago I still have not come up with anything. I cant count how many hours of my time I have wasted, alot more than 12. If anyone has any helpful hints on this that would be wonderful Reply Is it? Inappropriate Spam Duplicate | 0 Wshiwsbrding 9 years ago Sorry Janine, I just reallized my post sounds alittle rude and ungreatful, didnt mean to be, at least not to you! Reply Is it? Inappropriate Spam Duplicate | 0 Christopher Marzilli 9 years ago I would suggest to both of you to enter a support ticket via the Member Center. Our support engineers can connect to your computer and troubleshoot the issue. Unfortunately the error message you are getting is not very telling and more investigating would be needed to find the cause of the issue and fix it. Reply Is it? Inappropriate Spam Duplicate | 0 Janine 9 years ago I'm up and running now and here is what I learned.The service tech was able to fix this in about 2 minutes. When I asked what the problem was she said I had entered the wrong server name when I was trying to log the other computer in. I coul
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/17597797/requested-operation-requires-an-ole-db-session-object-vb6-to-sql-server-2000 Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Requested operation requires an OLE DB Session object — VB6 to SQL Server 2000 up vote 1 down vote favorite I'm error 3709 attempting to get into a VB6 application that was written for a client about a decade back, but intermittently I keep getting this error. The application has a login required upon launch, and upon entering the login provided for me (I am 100% certain it is correct), the following error is given: Run-time error '3709' Requested operation requires an OLE DB Session object, which is not supported by the current provider. What's truly bizarre error 3709 the is that last night I was able to log in with absolutely no problems. However, I had this problem before about a week back, but I was out of town for several days and when I cam back I could log in again. Before that initial instance, I was able to log in fine. I noticed a similar question already posted, but the solution that was given did not work for me. Here's the code pertaining to establishing the database connection. Note, the Serv1, Use1, PW1 etc are just fillers for server names/usernames/passwords. Public Function GetConnected() ' This function decides which server to connect and makes the connection 'Determines which connection string to use If frmSplash.Text1 = "1" Or frmSplash.Text1 = "apc" Then 'server location 'determines if the logon contains '1' or 'apc' 'APC connection code strSQLServerName = "(Serv1)" strSQLDBUserName = "Use1" strSQLDBPassword = "PW1" strSQLPort = "" ElseIf frmSplash.Text1 = "2" Then 'Laptop connection string strSQLServerName = "(Serv1)" strSQLDBUserName = "Use2" strSQLDBPassword = "PW2" strSQLPort = "" Else 'Client connection code strSQLServerName = "Serv2 strSQLDBUserName = "Use3" strSQLDBPassword = "PW3" strSQLPort = "" End If 'server location 'If (m_DBConnection Is Nothing) Then Set m_DBConnection = New ADODB.Connection 'End If SessionLocation = frmSplash.LocationCombo.Text '*************************************** 'Connecs to database based on location If frmSplash.LocationCombo.Text = "Loc1" Then strSQLDBName = "ServLoc1" El