- 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 want to connect dreamweaver8 to access database 2013 by using connection string Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb; Persist Security Info=False;
I have a template of a packing list I created. I open the template, fill in some weights and do a save as, creating a new unique file. Is there a formula or method that can be used to write the weights to another workbook as well.
I WANT TO CONNECT JAVA AS FRONT-END WITH MICROSOFT ACCESS 2007.HOW DO I GO ABOUT IT?WHENEVER I TRY TO CONNECT 'DATA NOT FOUND' ERROR COMES.
Hi, I've got a weird one. I'm new to Sharepoint and connection strings, so please bear with me. I'm connecting an Excel Spreadsheet to a Sharepoint list for RW access.
I'm writing a Web Application that reads from an Access Database. This DataBase is written to through another Jet.OLEDB.4.0 connection from some other device I do not control. Now I was said that my web application had blocked the writing process and therefore data had been lost.
I have many applications wrote by visual I want to work SQL server, I have many tries to connect but fails, I need help to connect to SQL server by VFP 9.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; This connection I don't know what is myServerAddress? please explain me!! thank you.
I am new to c# web DB programing . I have tried to write a registration form . Here the DB connection part: The remarks part are my tries to make it work (which did not) .
I have several (more than 100) Excel reports (files) that use the same data connection file. The data connection file connects to SSAS 2012 Tabular Model.
I am using Access 2010 accdb database and wants to connect a C# program using the oledb provider 'Microsoft.ACE.OLEDB.12.0' but it does not seem to work as I get this error.