Adodb Unspecified Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have excel vba adodb unspecified error Meta Discuss the workings and policies of this site About Us Learn ado connection unspecified error more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us
Unspecified Error Recordset Open
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
Adodb Recordset Unspecified Error
you, helping each other. Join them; it only takes a minute: Sign up “Unspecified error” while opening an ADODB connection up vote 4 down vote favorite I am facing "Unspecified error" in only one PC of my users. Run-time error '-2147467259 (80004005)': Unspecified error I am running the below VBA code to open a connection to Access database located in network shared drive. But the code throws the error whenever it is trying to run the .Open statement. I thought it is a driver issue and installed Access 2007 Database engine in the user's PC and replaced Provider with "Microsoft.ACE.OLEDB.12.0" but it doesn't work. Code: Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim retVal As Boolean Dim strSQL As String retVal = False On Error GoTo CatchError Set cn = New ADODB.Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0" .Properties("Jet OLEDB:Database Password") = Initialize.GetDBPwd 'returns pass .Open Initialize.GetDbConnectionString 'returns the network DB path End With vba excel-vba access-vba adodb oledbconnection share|improve this question edited Dec 22 '15 at 2:21 ZygD 3,03991933 asked Aug 12 '15 at 7:43 tawfiq 212 Is the "network share drive" mapped in Windows? Is the share a Windows / SAMBA share? Do you have the proper permissions on this share and these permissions were entered when you mapped the share? Did you try to open it whith the Access
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Unspecified Error - when retrieving data from recordset Data Platform Development > ADO.NET Managed Providers Question 0 http://stackoverflow.com/questions/31958994/unspecified-error-while-opening-an-adodb-connection Sign in to vote I am writing a simple query in VB .NET using Visual Studio 2005. I trying to connect to Oracle 9i. using "Microsoft ODBC for Oracle" (2575.1117.00) MSORCL32.DLL 28/04/2004. The connection to dataserver is succesfull. Even I can runthe following query succesfully: myCommand.CommandText = "select * from NLS_SESSION_PARAMETERS" myRecordset = myCommand.Execute But when I try to https://social.msdn.microsoft.com/Forums/en-US/025ef331-4669-489b-9209-332ad9077788/unspecified-error-when-retrieving-data-from-recordset?forum=adodotnetdataproviders run the following simple query, all I get is "unspecified error" myCommand.CommandText ="select * from my_user_db.my_table" myRecordset = myCommand.Execute Does anyone knows what is happening here ?? Thanks Fede Sunday, July 09, 2006 3:19 PM Reply | Quote Answers 1 Sign in to vote OK, regarding the problematic field (TIMESTAMP(3)) I just do this in my query: select field1, to_char(timestamp_field) from my_table And its works fine. Problem solved. Since the Error.Source retrieved is from the provider (Microsoft ODBC), Interesting is why I 'm recieving "Unspecified Error" and not something more useful to debug. Thank you all for answering my post. Fede Monday, July 10, 2006 7:52 AM Reply | Quote All replies 0 Sign in to vote You've omitted too much information, so I've to assume the following: - You're using OdbcCommand class to connect to database. - You're calling OdbcCommand.ExecuteReader (as theres no Execute method) to get OdbcDataReader instance. - You don't have exception handling (which is a bug in your code) and you're getting unhandled exception message. If so, that exception at least has a type and
-2147467259 for ADODB If this is your first visit, be sure to check out the FAQ by clicking the link http://www.vbforums.com/showthread.php?418842-RESOLVED-Unspecified-error-2147467259-for-ADODB above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: [RESOLVED] Unspecified error -2147467259 for ADODB Tweet Thread Tools Show Printable Version Subscribe to unspecified error this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jul 27th, 2006,12:54 AM #1 lawkee77 View Profile View Forum Posts Thread Starter New Member Join Date Jul 2006 Posts 2 [RESOLVED] Unspecified error -2147467259 for ADODB I am using ADO to connect to Oracle database: Global adoCn4 As New ADODB.Connection With adodb unspecified error adoCn4 Connect_String4 = "DSN=" & Pub_DB_Name & ";" _ & "UID=" & Pub_DB_UserName & ";" _ & "PWD=" & Pub_DB_PassWord .Open Connect_String4 End With When I try to insert a new record with BLOB field, "Unspecified error -2147467259" occurs after debug message "DEBUG 4". But when I run the program in other PC, no error occurs. StrDnname = Replace(StrDnname, "'", "''") sSQLString = "INSERT INTO MA_T_CERTIFICATE (CAID, SERIAL_NO,ISSUERDN, SUBJECTDN, PUBLIC_KEY, CERT_START_DATE, CERT_END_DATE, TRUSTED, CERT, IS_CACHE, CRL_URL) VALUES('DS02','" sSQLString = sSQLString & Serial_num & "','" & UCase(StrIssueCa) & "', '" & UCase(StrDnname) & "','1', to_date('" & Issue_dt & "','yyyymmddhh24miss'),to_date('" & Expiry_dt sSQLString = sSQLString & "','yyyymmddhh24miss'),'Y','1','N','ldap://123.123.123.12')" Print #2, "DEBUG 1" Set adoRs = New ADODB.Recordset adoRs.Open sSQLString, adoCn4 Print #2, "DEBUG 2" sSQLString = "Select SERIAL_NO, CERT from MA_T_CERTIFICATE where SERIAL_NO ='" & Serial_num & "' and CAID = 'DS02'" Sleep 1000 Print #2, "DEBUG 3" Set adoRs = New ADODB.Recordset Print #2, "DEBUG 4" adoRs.Open sSQLString, adoCn4, adOpenDynamic, adLockOptimistic, adCmdText Print #