Cn Open Unspecified Error
Contents |
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 oledbconnection open unspecified error Us Learn more about Stack Overflow the company Business Learn more about hiring
Google Chrome Won't Open Unspecified Error
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the norton 360 won't open unspecified error 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 Unspecified error when opening the 65th
Runas 2147467259 Unspecified Error
ADODB Recordset in a loop up vote 0 down vote favorite I have a bit of code that loops through a bunch of files in a folder and loads the data into recordsets, storing the filenames and recordsets in a dictionary (as a key/value pair) for later use. The loop works fine for the first 64 files, but then it gives me an "Unspecified Error" dialog sql unspecified error on the 65th try. The code breaks at the recordData.Open line (the loop calls the below function, so the For Each loop is not shown): Public Function GetRecords(ByVal dataSrc as String) as ADODB.Recordset Dim dir as String Dim file as String Dim recordData as ADODB.Recordset Dim sql as String Dim conn as String dir = "C:\MyDirectory" file = dataSrc & ".csv" conn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & dir & ";" & _ "Extended Properties=""text; HDR=Yes; FMT=Delimited; IMEX=1;""" If DoesFileExist(dir & file) Then sql = "select * from " & file & ";" Set recordData = New ADODB.Recordset recordData.CursorLocation = adUseClient recordData.Open sql, conn, adOpenForwardOnly, adLockReadOnly, adCmdText Else Set recordData = Nothing End If Set GetRecords = recordData recordData.Close End Function If I rename or delete the file it currently stops on, it errors out on the new 65th file, so I know the actual file itself is not to blame. Is there a limitation on the number of recordsets that I can open in one session, or am I opening them in an inefficient way? excel-vba adodb share|improve this question edited Feb 11 '15 at 7:41 asked Feb 11 '15 at 6:51 Ryan 1901412
360 games PC games
Adodb Recordset Unspecified Error
Windows games Windows phone games Entertainment All Entertainment
Run-time Error '-2147467259 (80004005)':
Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://stackoverflow.com/questions/28448214/unspecified-error-when-opening-the-65th-adodb-recordset-in-a-loop Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/883709 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
DB run-time error- '2147467259(80004005)' If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To http://www.vbforums.com/showthread.php?713021-RESOLVED-Failing-Opening-Access-DB-run-time-error-2147467259(80004005) start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: [RESOLVED] Failing Opening Access DB run-time error- '2147467259(80004005)' Tweet Thread Tools Show Printable Version Subscribe http://vbcity.com/forums/t/68410.aspx to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Mar 7th, 2013,10:36 AM #1 Volos View Profile View Forum Posts Thread Starter Junior Member Join Date Jan 2013 Posts 22 [RESOLVED] unspecified error Failing Opening Access DB run-time error- '2147467259(80004005)' Hello again, So now that I've finished my previous project, and migrated everything successfully to an Excel Spreadsheet, I have been "allowed" time to try and get it working with an Access/Excel combination solution. I'm already failing at opening the DB. Here's the code: Code: Sub first_shot() Dim cn As Object Dim strFile As String Dim strCon As String Dim strSQL As String strFile = "E:\LacProj\Dummies and open unspecified error Slaves\Debug\Test.accdb" strCon = "Microsoft.Ace.OLEDB.12.0; Data Source=" & strFile ''Late binding, so no reference is needed Set cn = CreateObject("ADODB.Connection") cn.Open strCon 'fail point is the first time I try to do anything .... I'm getting a run time error when I debug: Run-time error- '2147467259(80004005)': Automation Error Unspecified Error and when I run it outside of debug I get: [Microsoft][ODBS Driver Manager] Data source name not found and no default driver specified So I'm guessing I have more than a few errors. I've looked at other situations with this error, but haven't found one that seemed to fit yet. The first one that I'm guessing is wrong is my name path, particularly the folder "Dummies and Slaves." What is the proper way to handle spaces in this instance? I certainly can rename things, but I'd rather know how to account for that in VBA. My second guess as to what's wrong is "Microsoft.Ace.OLEDB.12.0;" what driver should it be to talk to an Access '07 (accdb)? I'm still in the planning stages, so not much is set in stone. My eventual goals are: to have this on a network drive with both MsOf07 and MsOf10 working with the files (though not at the same time). Using a user form started from Excel to control most actions on the Acces
by 0 users This post has 0 Replies | 1 Follower DanInManchester Manchester, England, UK Since 8/23/2002 Posts 2,464 Reputation 20,480 Reply Dan Bayley (DanInManchester) Posted: 6/8/2004 4:22 AM rated by 0 users This is an Access 2000 database with links to dbf filesThe database resides on \\server2 along with the dbf filesThe iis resides on \\intranetiis is using basic authentication (so is impersonating user)the iss account uses my network username and password for directory security.The ASP script is trying Code:cn.open strConnbut throwing -2147467259 Unspecified error The users who encounter the problems are able to access all the necessary resources as they also use applications that use the databases.Another point to note is that is i turn off basic authentication and allow anon access (which uses my credentials) it works. And yet the problem usesrs have the same permissions on the database server as me.Any ideas?*** editI just dug this out .... http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3BQ307640but there is only one maybe 2 users at present Maybe it could be limitations of the dbf files or maybe network latency? ----------------------------------------------------------------------------Dan Bayley Affordable website design UKFree Google & Yahoo sitemap generator | Post Points: 5 < Previous Topic | Next Topic > Page 1 of 1 (1 items) | RSS Copyright 1998-2016 vbCity.com LLC