Error - 2147217843 80040e4d
Contents |
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full 2147217843 login failed Time Job Ways to Get Help Expand Search Submit Close Search Login Join sql error 2147217843 Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Runtime error excel system error &h80040e4d '-2147217843 (80040e4d)' Want to Advertise Here? Solved Runtime error '-2147217843 (80040e4d)' Posted on 2003-04-23 MS SQL Server 1 Verified Solution 10 Comments 8,801 Views Last Modified: 2011-08-18 I created an ODBC driver for
Run Time Error
SQl server using the sa login for authentication , and tested successfully . But when my vb code tries to access the filedsn I created it gives me an error , saying Runtime error '-2147217843 (80040e4d)', [Microsoft][ODBC SQL Server Driver][SQL Server]Login ailed for user 'sa'. What went wrong here? 0 Question by:janu_s Facebook Twitter LinkedIn Google LVL 58 Best Solution byamit_g File DSN doesn't store the password. So you have to give it in the connection string. Use the connection string as given by acperkins. Also explore the possibility of using DSNless connection string. Go to Solution 10 Comments LVL 58 Overall: Level 58 MS SQL Server 18 Message Expert Comment by:amit_g2003-04-23 Post the VB code. 0 LVL 2 Overall: Level 2 MS SQL Server 1 Message Expert Comment by:TAshby2003-04-24 yes, paste the code 0 Message Author Comment by:janu_s2003-04-24 The following is code I wrote in Visual Basic : Set SDEAdocon = New ADODB.Connection SDEAdocon.Open "filedsn=r:\GNIS_Ext\gnis2001" The code does not give error when I create the ODBC using WindowsNT authentication but gives error when I create using the sa login. 0 LVL 58 Overall: Level 58 MS SQL Server 18 Message Expert Comment by:amit_g2003-04-24 If that is the case, the only thing I can think of is that the password for sa is incorrect in the dsn file. 0 LVL 75 Overall: Level 75 MS SQL Server 62 Message Active 1 day ago Expert Comment by:Anthony Perkins2003-04-24 Change this line: SDEAdocon.Open "filedsn=r:\GNIS_Ext\gnis2001" To: SDEAdocon.Open "filedsn=r:\GNIS_Ext\gnis2001;" & _ "Uid=yourusernamegoeshere;" & _
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Access 2010 VBA -Run-time error '-2147217843 (80040e4d)': Authenication failed. Want to Advertise Here? Solved Access 2010 VBA -Run-time error '-2147217843 (80040e4d)': Authenication failed. Posted on 2013-11-25 MS Applications MS Access MS Office 1 Verified Solution 1 Comment 2,483 Views Last Modified: 2013-11-25 Can somebody tell me what is causing the following error... When the following statement gets executed... With oConn .Open (sConn) 'Open the connection. The following error occurs... Run-time error '-2147217843 (80040e4d)': Authenication failed. The code... Option Explicit Sub Import_AccessData() https://www.experts-exchange.com/questions/20594308/Runtime-error-'-2147217843-80040e4d-'.html Dim oConn As ADODB.Connection Dim oRs As ADODB.Recordset, rst2 As ADODB.Recordset Dim stDB As String, stSQL1 As String, stSQL2 As String Dim sConn As String Dim wbBook As Workbook Dim wsSheet1 As Worksheet Dim lnField As Long, lnCount As Long Dim StrDBPath As String 'Instantiate the ADO-objects. Set oConn = New ADODB.Connection Set oRs = New ADODB.Recordset ' Set rst2 = New ADODB.Recordset https://www.experts-exchange.com/questions/28303053/Access-2010-VBA-Run-time-error-'-2147217843-80040e4d-'-Authenication-failed.html Set wbBook = ThisWorkbook Set wsSheet1 = wbBook.Worksheets("Test") 'Path to the database. stDB = "C:\Users\Ritsick\Documents\Red_Compass\DRA\Full Master Sink 5.accdb" 'Create the connectionstring. sConn = "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=" & StrDBPath & ";" & _ "Jet OLEDB:Engine Type=5;" & _ "Persist Security Info=False;" 'The 1st raw SQL-statement to be executed. stSQL1 = "Select Top 1 QUESTIONCODE, REGULATORYANSWER, INPRACTICERESPONSE From vMasterData where QUESTIONCODE = 'GQ-005';" 'The 2nd raw SQL-statement to be executed. 'stSQL2 = "SELECT * FROM Production_E2" 'Clear the worksheet. wsSheet1.Range("A1").CurrentRegion.Clear With oConn .Open (sConn) 'Open the connection. .CursorLocation = adUseClient 'Necessary to disconnect the recordset. End With With oRs .Open stSQL1, oConn 'Create the recordset. Set .ActiveConnection = Nothing 'Disconnect the recordset. End With 'With rst2 ' .Open stSQL2, oConn 'Create the recordset. ' Set .ActiveConnection = Nothing 'Disconnect the recordset. 'End With With wsSheet1 .Cells(2, 1).Cop
+ Ask a Question Need help? Post your question and get tips & solutions https://bytes.com/topic/access/answers/636706-run-time-error-2147217843-80040e4d-connecting-external-database from a community of 418,502 IT Pros & Developers. It's quick & easy. Run-time error 2147217843 (80040e4d) connecting to external database P: 2 vspargo I'm trying http://www.mrexcel.com/forum/microsoft-access/315446-run-time-error-opening-access-visual-basic-applications-excel.html to add a field to a secured external database using VBA (it's the back end of the one the code is running in). Both databases are error - Access 2002 OS=Windows XP. The error tells me I'm using an incorrect Account Name or Password, but they are correct. Expand|Select|Wrap|Line Numbers cat.ActiveConnection="Provider=Microsoft.Jet.OLEDB.4.0;"&_ "DataSource=c:\...\Data.mdb;JetOLEDB:SystemDatabase="&_ "c:\...\Secured.mdw;UserID=Me;Password=abc;" The rest of my code works if I use it on an unsecured database, it's just the security connection that I'm having trouble with. Before I added error - 2147217843 the System Database reference I was getting the same error number telling me the Workgroup file was in use or missing. Please help! Apr 24 '07 #1 Post Reply Share this Question 1 Reply Expert Mod 10K+ P: 14,534 MMcCarthy Try this ... Expand|Select|Wrap|Line Numbers cat.ActiveConnection="Provider=Microsoft.Jet.OLEDB.4.0;"&_ "DataSource=c:\...\Data.mdb;JetOLEDB:SystemDatabase="&_ "c:\...\Secured.mdw;Password=abc" I've dropped the semi-colon at the end of the statement and removed the UserID reference. Mary Apr 24 '07 #2 reply Message Cancel Changes Post your reply Join Now >> Sign in to post your reply or Sign up for a free account. Similar topics Run Application (EXE) from ASP.Net C# When do I need to run "aspnet_regiis –i"? constructing a form before calling Application.Run Application.Run Run code from IDE Thread Name Application.Run() Application.Exit and the 'Message Pump' Should an object that totally encapsulates functionality have a "Run" function? cant run asp file from subdir of Web root dir Shell: run script Browse more Micros
Forums Microsoft Access Run-Time Error Opening Access from VBA in Excel Results 1 to 2 of 2 Run-Time Error Opening Access from VBA in ExcelThis is a discussion on Run-Time Error Opening Access from VBA in Excel within the Microsoft Access forums, part of the Question Forums category; I am on my first attempt to use vba to open an Access database from an Excel file and write ... LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Apr 21st, 2008,12:20 PM #1 rootdown42 Board Regular Join Date Jun 2005 Location Mil-town, WI Posts 93 Run-Time Error Opening Access from VBA in Excel I am on my first attempt to use vba to open an Access database from an Excel file and write the data in the Excel file to the database. Not surprisingly I've run into difficulty. I'm using ADO to perform the commands. The code gives me "run-time error -2147217843 (80040e4d) Authentication failed" when I get to the last line in the code below. I don't understand how there is an authentication error when I have absolutely no protection on this database at all. Code: Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim intFiscYr(1 To 7) As Integer ' values for fiscal year Dim intResponse As Integer Dim myFlag As Boolean myFlag = False ' connect to the Access database Set cn = New ADODB.Connection cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _ "\\Mke01sfile01\Data\960\Systems and Applications\Forecasting\Rebate-Lapsing Data\" & _ "Consumer Rebate Database\Consumer Rebate Database.mdb;" Can someone tell me what the problem is? Any help is appreciated. Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Apr 21st, 2008,04:03 PM #2 rootdown42 Board Regular Join Date Jun 2005 Location Mil-town, WI Posts 93 Re: Run-Time Error Opening Access from VBA in Excel Alright, I guess I'm a little slow. Turns out the error was a result me not coding the file path statement correctly. If anyone else stumbles upon this error, make sure to include "Data Source=..." before the file path in your connection.open statement. Code: cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=\\Mke01sfile01\Data\960\Systems and Applications\Forecasting\Rebate-Lapsing Data\" & _ "Consumer Rebate Database\Consumer Rebate Database.mdb;" Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote « Previous Thread | Next Thread » Like this thread? Share it with others Like this thread? Share it with others Twitter Link