- Q & A
- ask question
- log In
- Copyright 2014
- © ConnectionStrings.com
- All Rights Reserved
- Powered by CSAS
- With support from Contributing Developers and Windward Reports
Here's the setup:
MS Access has a linked table to SQL Server. SQL Server has a password on it. Trying to use Excel VBA to query this linked table in Access, but I can't get the connection string correct. I can connect from Excel to Access, or from Excel to SQL Server, but I can't figure out how to go Excel --> MS Access --> SQL Server. Need help.
Thanks for your time.
Cory0 asked Cory No
Please share the connection strings you are using. There are two separate right? One for Excel -> Access and one for Access -> SQL Server.
Is there any error? Please update your with error messages. Or specify more precisely the problem / what's happening when connecting? Right now it's a bit to vague I think...0 Max Wikström
Ooop. Sorry about that. I only have one connection string (from Excel to Access, with Access already having a linked table to SQL Server established). I'm not sure how to add a second connection string. Basically, when I go to open the linked table in Access, a prompt window pops up that asks for the Login ID and Password for the SQL Server. Here's the code I'm using so far:
Function DatabaseCall2(ByVal sSQL1 As String) As ADODB.Recordset Dim Cn As ADODB.Connection Dim RS as ADODB.RecordSet Dim ConnectionString As String Set Cn = New ADODB.Connection 'DSN=FIDM_Reporting 'DATABASE=fi_analytics_reporting ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=FIDM_Reporting;" & _ "User ID=UserNameHere;Password=Passwordhere" Cn.ConnectionString = ConnectionString Cn.Properties("Prompt") = adPromptAlways Cn.Open // Will add code here to execute SQL statement and assign RS, but I haven't gotten past the previous step End function
When I run this code, I get the prompt that asks for Data Source, User Name, Password, Provider String, and Open Mode. I've been Googling this for a few hours, and I'm not sure what to put in for Data Source. Is it the SQL Server DSN? What about Provider String?0 Cory No
Remove (or comment out) the line
Cn.Properties("Prompt") = adPromptAlways
to get rid of the prompt. (cause its the prompting thats your problem right?)0 Max Wikström
I was trying to read data from excel2010 which is "intermixed" data format in each cell to matlab workspace using below command: connString = 'Provider=Microsoft.ACE.OLEDB.12.0;';
Hi, I 'm making a connection from VSExpress 2012 with a database of Access 2013 and the following error message: " Microsoft.ACE.OLECB.12.0 ' provider is not registered locally on the machine" . How I can fix it? "
Hi, How can I connect rumba through excel. I want to extract data from Rumba to Excel. I have code the extract deatils from IBM mainframe to Excel.But I believe the codes should be different for rumba.
Hello, I am using Microsoft.ACE.OLEDB.12.0 with a 32-bit C# application on a 64-bit PC and an Access 2007 backend. The connection string works fine, however depending on where the database is located
I was using Ole db connection to connect the excel.Then Read the data & display on it on screen and then save it to database after validation. But now excel is not getting connected via Ole db connection,as it is encrypted by some other program.
Installed SQL Server 2014, and using MS SQL Server Management Studio, if that matters. Very simple question: how do I get the Import-Export function to actually....work. (I believe I should be using the 32-bit version.)
How to connect to an AlwaysOn Availability Group failover cluster either for SQL Server Management Studio or for a Customer application ? regards
I have an aspx web page that connects to an Access database through an ASP.NET connection string. The code works perfectly when I preview the page on my local machine. But I get this error when I publish the web site to a Windows server at my hosting company:
I have a problem that I don't understand. I have two VS 2008 programs one gives me a Crystal Report just the way it should work. connection string in App.Config "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\QBData\racklist.accdb"
Hi, I am trying to make a new ODBC connection to our company's SQL Server Reporting Services 2012 server to reach an Oracle db, however I've been unsuccessful trying to create the connection string.