- 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 am working on same solution where i need to update connection strings of multiple files in Bulk.But , Its working for MS Excel 2010 and not for Excel 2013. Exception Result : "Exception from HRESULT: 0x800A03EC"
I have created some apps on my home PC using Visual Studio 2008 (C#) and MS Office 2007 (MS Access) as my database. My OS is Windows Vista. Everything is 32 bit.
Is there a provider and connection string that will allow me to connect to Azure SQL via port 443 the way Access App does? Both SQL Native Client and ODBC seem to only use 1433 which is blocked by my corporate firewall.
Dear All, Thanks for your support in advance :) I am looking to move an Excel Data Base to Access in order to improve efficiency and bring security to the data hold. The problem that I am stacked is related with the loading.
How do you connect to a SQL server hosted at Amazon RDS via ADO? More specifically, I need to connect via Dreamweaver's Custom Connection String. The format used for virtually hosted instances of SQL Server Express do not seem to work. I get an "unidentified error" message.
Hi everyone, I'm currently doing some research on the MS SQL native client for ODBC driver's security. I would like to seek details on how secure is ODBC driver in MS SQL Native client?
I am executing SSIS packages that override the Connection string by submitting new connection parms from batch execution of the package using dtexec.
I have an sql server command, calling a stored procedure. actually the problem happens with all types of commands but this is my test only. 1- i have tested calling the procedure from inside SQL server management studio, it took 34 Seconds to execute.
I am trying to develop an MVC app on my local computer and I have huge troubles opening a connection to my database. At the same time, I am able to run SQL scripts and they work just fine.
I have a web page that imports translations from a spreadsheet using Microsoft.ACE.OLEDB.12.0; The process works almost flawlessly, except that Japanese (and likely Korean and Chinese) can not be imported with this method.