SSIS Connection String - ssis

I have a local SQL DB and an Azure SQL DB. In my data flow I am trying to pass data from local (ole db source) to Azure (ole db destination).
I am unable to save the password for the connection string so I have parameterized the connection string of the data flow task but I seem unable to work out how to get the destination to use it?
I know this isn't best practice but I just want to prototype a few things. Is this possible?
Thanks

Double click project params and add your connection string as a parameter. Give it any name you want, select string then paste your Azure connection string that you have copied directly from you Azure portal connection string option.
This creates a project level conn string parameter.
Right click connection managers and create a new ADO.Net connection manager. This should be fairly straightforward.
Once completed, select this connection manager and add an expression to it from the property window:
In the Property Expression Editor: (1) Select a property called ConnectionString. (2) Select the elipsis beside expression. From the pop up open the project parameters in the left hand area and you will see the connection parameter you created earlier. Drag this into the expression text area. Evaluate the expression to check it works.
Click OK
You should now be able to use this as an Azure connection without getting any errors

Related

trigger function when ODBC connection is opend in Ms Access

In the init phase of my ms access app, I set some links to ODBC tables in a postgresql db. I also set the application name with a statement "set application_name = ... ;".
So far it works well, but ...
After a phase of inactivity (or some other reason) the connection is closed. After accessing a linked table, the connection is reopen automatically. That is pretty cool, but ...
=> the application_name is lost.
Question: Can I use a trigger function, when ms access is opening a new connection or is there any other solution?
If you're just using linked tables, then no, unfortunately, this is not possible.
Access manages the connection internally for tables, and doesn't fire any events when reconnecting.
If you're only using forms, you can manage the connection yourself using a predeclared self-healing object. In that case you can raise events when reconnecting, and let the object set the application name.
Another half-solution is to use passthrough queries instead of tables, and start them all off with set application_name

Error when creating dynamic data source in SSRS

I am trying to create a dynamic data source in SSRS. I have a generic report that needs to be run across multiple database servers, requiring a way to connect to each based on a parameter.
I have setup my parameters in a way where I can generate the following connection string:
Data Source=172.16.1.111;Initial Catalog=TESTDB
If I plug that connection string into the "Connection String" text area field in the Data Source Properties window and click "Test Connection," I get the "Connection created successfully" message.
However, if I attempt to create an expression with the same data source (forget about the dynamic data source for a minute), like as shown below, I get a "The ConnectionString property has not been initialized" error message when trying to test the connection.
="Data Source=172.16.1.111;Initial Catalog=TESTDB"
Based on other examples I have seen looking this up online, this type of connection string definition is supposed to work.
My end goal is to create something like:
="Data Source=" + Parameter!Server.Value + ";Initial Catalog=" + Parameter!Database.Value
which would allow me to connect to any database based on the user selection.
Does anyone have any suggestions for what I might be doing wrong? I am using SQL Server 2014 Report Builder.
This ended up being an issue with the report builder. Once I deployed the report I was able to get this work. For some reason, even if you hard code the connection string as I mentioned above, expressions will not evaluate at runtime when running from within the report builder.
Hope this helps someone else in the future!

SSRS 2016 can't set credentials when using an expression based connection string

I am trying to deploy a SSRS report to a 2016 server which uses a an API as it's data source. The URL for the API is generated dynamically via an expression which builds the query string based on a couple of report parameters.
In the past, using report manager I could set which account the API is called under.
Note that in the above screenshot the Connection string is still expression based.
However if I attempt the same thing in 2016 the connection string is wiped out.
Surely the connection string and the credentials should be independent, why has this changed in 2016 or is it a bug?
I had a similar issue in ReportServer 2017; however if you click the button 'Revert to Default' (visible in the above screenshot) the Expression based connection string will magically reappear!
Nice feature - if you find it ;-)

CurrentProject.OpenConnection Fails in MS Access 2000

I support a LOB application written in MS Access VBA with a SQL Server back end. One feature of the application is the ability to open a second instance of the application, allowing the users to view/modify two records at the same time.
The first time I open the application it connects and everything works fine. However when I attempt to open the second instance I get the following error message:
-2147467259 - Method "OpenConnection" of object _CurrentProject failed.
This is the line of code executing when the error occurs:
CurrentProject.OpenConnection strConnection
I have stepped through the code and verified that strConnection is the same connection string in both the first and second instances of the application
I'm running out of things to look for. Any ideas are greatly appreciated!
UPDATE: It appears that something is not allowing the second MSACCESS.EXE instance to use the same connection string. My connection string is below, with database and server substituted for the actual database and server.
PROVIDER=SQLOLEDB.1;INTEGRATED SECURITY=SSPI;PERSIST SECURITY INFO=FALSE;INITIAL CATALOG=database;DATA SOURCE=server
Try
MultipleActiveResultSets=True
(http://msdn.microsoft.com/en-us/library/h32h3abf(v=vs.110).aspx)
Would it be better to open a new form from the same application?
dim frm as ShowCar_Form
frm.Show

Coldfusion Connection Code

OK, Ive got my site all up - just not working. ahah. I need (I think) the correct code for a connection string to my database etc. I'm using ColdFsuion and Mysql. My code for the connection string is as follows:
<CFQUERY
NAME="cfGossip"
DATASOURCE="mysqlcf_bridgettip"
USERNAME="<bridgettip>"
PASSWORD="<*******>"
>
</CFQUERY>
My DNS on my hosting plan is, well I think is - mysqlcf_bridgettips and on my ColdFusion is cfGossip. I'm not sure which one to use, or if it's even one of them...? It says the error is there when I try access my index.cfm page.
The error over all is :
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be
displayed.
Is it the connection string that is wrong? I would really love any help at all - rewriting my string etc.
Typically ColdFusion is easier to handle by adding datasources via the ColdFusion Administrator: See Adding Data Sources for ColdFusion.
if you cant access the coldfusion administrator and have no control panel to add a datasource you need to ask your host to add a datasource for you with a name. A datasource in this context is different from having the database created - its having the database "registered" with the coldfusion administrator so that it can be referenced via a datasource name
once the datasource is created you can hit it by adding the datasource attribute to the cfquery tag: cfquery name="myquery" datasource="mydatasourcename"
My DNS on my hosting plan is, well I
think is - mysqlcf_bridgettips and on
my ColdFusion is cfGossip.
The coldFusion Administrator should have a datasource that contains your mysqlcf_bridgettips information (CF datasource name, database name, server IP and port, username/password). If you've named that datasource cfGossip in the administrator than your cfquery should look like:
<cfquery name = "variableNameOfYourQuery (ex. qUsers)" datasource = "cfGossip">
I put my username/password in my datasource in the administrator so I don't have it written in my code.
I believe CF5 was the only version of CF that allowed DSN-less connections that would require a "connection string".