Dynamically Assign Connection String
Feb 28, 2008
I have 3 web identical web apps whose only diff is that they access different SQl Server DB's. I use the SQLDataSource in a number of pages to retrieve data from the db. The apps all use Forms Auth. I would like to be able to see who is the logged on user user and assign the approp connection string to all the SQLDataSources in the app. For example when user UserA logs in they are retrieving data from on db but when UserB logs in they are retrieving data from another db.
I am sure this can be done but could use a little guidance. Thanks in advance.
View 1 Replies
ADVERTISEMENT
Nov 15, 2007
Hi,
I am looking to dynamically change the connection string in my SSIS package, to avoid changing the connection string each time I want to run in different environments.
Thanks in advance
View 3 Replies
View Related
Apr 18, 2008
I need to make my site aware of which server_name it is loading from so it uses a different connection string. (have dev + prod servers for web/sql)Currently my connection string is in web.config as follows: <connectionStrings> <!-- Development and Staging connection string --> <add name="myconnection" connectionString="server=myserver; user id=mysuer; password=mypassword; database=mydatabase" /> </connectionStrings> I need to make sure the 'name' is the same for both connection strings since that is how the rest of my site looks for it. However, I'm not sure how to get both in here with some sort of 'if/then' statement to determine which one to use.I've heard it could be done in global.asax with something similar to the code below, but I dont know how to assign a 'name' to a connection string for that type of setup. Sub
Session_OnStart ServerName =
UCase(Request.ServerVariables("SERVER_NAME")) IF ServerName = "prod.server.com" THEN ...Set Prd string... ELSE ...Set Dev string... END IF End
Sub
View 8 Replies
View Related
Mar 12, 2008
Hi,
I tried to follow the widely talked about method to dynamically populate the connection string property of my flatfileconnection manager from a variable. I keep getting the following non-fatal error.
TITLE: Microsoft Visual Studio
------------------------------
Nonfatal errors occurred while saving the package:
Error at Package [Connection manager "FFCM"]: The file name ""C:ProjectsSSISHLoadTOutputOut.csv"" specified in the connection was not valid.
Error at Package: The result of the expression "@[User::CsvFullFileName]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
Here is what I am trying to do.
I have a foreach loop that iterates through a list of xml config files and reads the config information including the destination csv file name and does a data transformation.
So I created a flatfile connection to a csv file did my data mappings.
Created a package level variable to hold the destination file path
In the Flat file conn. manager's properties -> expression -> set the @[User::CsvFullFileName] (which even evaluates fine)
When I try to run the package I keep getting the above mentioned non-fatal error..I checked the path and it is valid. I even tried
the c:\projects\...notation and the UNC path notation...all seem to give the same error
Anyone experience this before ? any thoughts would be appreciated.
Thanks
View 5 Replies
View Related
Oct 31, 2006
Hi Folks ...Question for everyone that I have not been able to figure out. I have an application that is spread across tiers:SQL Connection defined in Web.Config file that connects to SQLServer database.DAL layer created references SQL Connection in Web.Config file - have noticed this copies the connection string information to the local properties for each TableAdapter that is defined in the DAL layer.BLL Layer that references Table Adapters declared in the DAL layer.When the web site is called, the link will provide an encoded id.Sample call to website: http://www.mysamplesite.com/default.aspx?company=AE2837FG28F7B327Based on the encoded id that is passed to the site, I need to switch the connection string to use different databases on the backend.Sample connection string: Data Source=localhost;Initial Catalog=dbSystem_LiveCorp1;User ID=client;Password=live2006 I would need to change Initial Catablog to the following:Data Source=localhost;Initial Catalog=dbSystem_LiveCorp196;User ID=client;Password=live2006How do I do this and have the connection string reflected in all of the Table Adapters that I have created in the DAL layer - currently 100+ Table Adapters have been defined.As we gain new clients, I need to be able to have each clients information located in a different database within SQL Server. Mandated - I have no choice in this requirement. Being as I don't want to have to recreate the DAL for several dozen clients and maintain that whenever I make a change to the DAL to then replicate across multiple copies. There has to be a way to dynamically alter the SQLConnection and have it recognized across all DAL TableAdapters.I'm developing with MS-Visual Studio 2005 - VB. Any help would be greatly appreciated. Thanks ...David Any day above ground is a good day ...
View 1 Replies
View Related
Jul 12, 2012
I have create packages which loads the data from flat file to sql server table, now I want to make my destination table connection dynamic what is format of connection string. I also need to pass user name and password for sql server dynamically in this case, what is the format for the connection string.
Also  in package i used ADO.net  as source for  *.mdb files how i can set the commection to .mdb files dynamically which is used as source in my package.
View 8 Replies
View Related
Jan 31, 2008
I wish to dynamically assign Select Statement to SqlDataSource. Anyone has any idea?? Is it possiable at all?
I am coding using C# under Framwork 2.0
View 1 Replies
View Related
Jun 16, 2008
How can i assign select statement to a sqldatasource
I mean if the user clicks button 1
sqldatasource=-"select * from customers where status='ClOSED' "
or else if the user clicks button2
sqldatasource="Select * from Customers Where Status='OPEN' "
I want to bind the sqldatasource to a gridview finally .
Is this possible ?
I tried sqldatasource filters But am reallly confused
Any suggestions/solutions are appreciated
thankyou
View 8 Replies
View Related
Feb 6, 2008
Hello All,
How to assign the DataSource to Server Report which is stored in the remote machine. Now i need to work on it. If you have any solution please pass on it to me.
Thanks,
SR.
View 1 Replies
View Related
Sep 22, 2006
Hello,
I am not sure if this possible, but I have store procedures that access to multiple databases, therefore I currently have to hardcode my database name in the queries. The problem start when I move my store procedures into the production, and the database name in production is different. I have to go through all my store procedures and rename the DBname. I am just wonder if there is way that I could define my database name as a global variable and then use that variable as my DB name instead of hardcode them?
something like
Declare @MyDatabaseName varchar(30)
set @MyDatabaseName = "MyDB"
SELECT * from MyDatabaseName.dbo.MyTable
Any suggestion? Please.
Thanks in advance
View 8 Replies
View Related
Jul 16, 2015
Can I assign values to variables in 2012 using below command? I have used the same command in 2008 and it works fine.
DTEXEC
/SERVER"XXXXXXXXSQLSERVER2012"/SQL"Mypackage.dtsx"/SETPackage.Variables[FilePath].Value;"C:Test estvariable.csv"
Wondering is there a different way in 2012 to pass values to variables dynamically.
View 2 Replies
View Related
May 23, 2002
hi, can somebody help me to solve this problem?
first, declare 2 variables
declare @num int
declare @str varchar(255)
then set the varchar variable to '100/10'
set @str = '100/10'
is there anyway to assign a value to @num using @str, so that @num has a value 10??
set @num = @str ????????
View 1 Replies
View Related
Oct 30, 2006
Hello, I'm needing to pass a variable length number of values to a select statement so I can populate a result list with items related to all the checkboxlist items that were selected by the user. for example, the user checks products x, y and z, then hits submit, and then they see a list of all the tests they need to run for each product. I found a UDF that parses a comma delimited string and puts the values into a table. I learned how to do this here: http://codebetter.com/blogs/darrell.norton/archive/2003/07/01/361.aspx I have a checkboxlist that I'm generating the string from, so the string could look like this: "1,3,4,5,7" etc.I added the function mentioned in the URL above to my database, and if I understand right, I should be able to pass the table it creates into the select statement like so:
WHERE (OrderStatus IN ((select value from dbo.fn_Split(@StatusList,','))) OR @StatusList IS NULL) but now I don't know how to assign the string value to the parameter, say to '@solution_id'.my current select statement which was generated by Visual Studio 2005 looks like this: SELECT [test], [owner], [date] FROM [test_table] WHERE ([solution_ID] = @solution_ID) ...but this only pulls results for the first item checked in the checkboxlist.Does anyone know how this is done? I'm sure it's simple, but I'm new to ASP .NET so any help would be greatly appreciated.
View 3 Replies
View Related
Jul 23, 2005
Hello,I am currently trying to assign some string to a TEXT output parameterof a stored procedure.The basic structure of the stored procedure looks like this:-- 8< --CREATE PROCEDURE owner.StoredProc(@blob_data image,@clob_data text OUTPUT)ASINSERT INTO Table (blob_data, clob_data) VALUES (@blob_data, @clob_data);GO-- 8< --My previous attempts include using the convert function to convert astring into a TEXT data type:SET @clob_data = CONVERT(text, 'This is a test');Unfortunately, this leads to the following error: "Error 409: Theassignment operator operation cannot take a text data type as an argument."Is there any alternative available to make an assignment to a TEXToutput parameter?Regards,Thilo
View 1 Replies
View Related
Jul 23, 2007
I am new user on VB ( I wish ssis support c# script)
I have made a input string type column ( strName ) in script componen as ReadWrite.
In my script, I did following:
Row.strName = Row.strName + prefix
But I got following error at runtime:
The value is too large to fit in the column data area of the buffer.
at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.SetString(Int32 columnIndex, String value)
at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.set_Item(Int32 columnIndex, Object value)
at Microsoft.SqlServer.Dts.Pipeline.ScriptBuffer.set_Item(Int32 ColumnIndex, Object value)
at ScriptComponent_98d10a05854c460792443f2345d5d806.Input0Buffer.set_strName(String Value)
at ScriptComponent_98d10a05854c460792443f2345d5d806.ScriptMain.Input0_ProcessInputRow(Input0Buffer Row)
at ScriptComponent_98d10a05854c460792443f2345d5d806.UserComponent.Input0_ProcessInput(Input0Buffer Buffer)
at ScriptComponent_98d10a05854c460792443f2345d5d806.UserComponent.ProcessInput(Int32 InputID, PipelineBuffer Buffer)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
Could anyone tell me what I did wrong?
Thanks!
View 8 Replies
View Related
Sep 22, 2006
I'm trying to create a DataReader source object using a working ADO.NET Oracle Client connection object that exists in the connection manager.
Problem:
When I open the editor the DataReaderSrc component shows only one row under the Connection Managers tab:
Name=IDbConnection
Connection Manager=blank
Description=Managed connection manager
I cannot assign the ADO.NET connection (or any connections). I see a warning at the bottom of the Connection Managers tab:
"Not all connection managers have been set. Set all connection managers."
When I click refresh the warning message changes to:
"The runtime connection manager with the ID "" cannot be found. Verify that the connection manager collection has a connection manager with that ID."
I am prevented from removing the IDbConnection or assigning my Connection Manager object to the DataReader Source.
Thanks, -- Mike
View 9 Replies
View Related
Aug 23, 2006
I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.
Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.
Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.
Is this an intrinsic issue?
View 2 Replies
View Related
Jul 27, 2007
Hi, I have a script task in SSIS which dynamically generates a string for a file name to be used as flat file source. I execute the task and it executed with success; but when I checked the result of the variable TotFileName from the Expression builder window for the flat file connection manager it was not populated with a file name like \MyServerMyDriveMyFolder200706daily.txt. So something might still be missing from the script below. Or is the way I do it correct? Can someone help with this? Thanks a lot!!
I have created package level variables ImportFolder (value like: \MyServerMyDriveMyFolder ) and TotFileName (value field empty) and make ImportFolder a ReadOnlyVariable and TotFileName a ReadWriteVariable. Then I use expression to set the property for flat file connection manager to use the TotFileName variable.
(Basically the idea is: if now is July 2007 then the filename should be 200706daily.txt; if now is Jan 2008 then the filename should be 200712daily.txt)
-----code------
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.
Imports System
Imports System.IO
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.
Public Sub Main()
Dim TotFileName As String
Dim TrueFileName As String
Dim sYear As String
Dim sMonth As String
Dim sDate As String
sYear = CStr(Year(Now()))
sMonth = CStr(Month(Now()) - 1)
If (Month(Now()) < 11 And Month(Now()) > 1) Then
sMonth = "0" & sMonth
End If
If (Month(Now()) = 1) Then
sMonth = "12"
sYear = CStr(Year(Now()) - 1)
End If
sDate = sYear & sMonth
TrueFileName = sDate & "daily.txt"
TotFileName = CStr(Dts.Variables.Item("ImportFolder").Value) & TrueFileName
Dts.Variables.Item("TotFileName").Value = TotFileName
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
View 6 Replies
View Related
Jul 26, 2007
i have to store some data on a remote sever(MS SQL SERVER2000). The scenario is like 1. The web application runs on a local machine. User (who inputs) uses through LAN.2. The Input should be stored in the remote server. if the remote connection is ok. otherwise it should be saved in local server's database(MS SQL 2000).3. In the application's web.config there is a connection string pointing to the remote server and another one (alternating one) points the local server's database. in scenario like this i first to tested the remote connection. if it is not ok then i initialize the local server's connection like thisprivate MyConnection() { try { connectionSql = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnForRemote"].ToString()); connectionSql.Open(); } catch (Exception ex) { connectionSql = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnForLocal"].ToString()); } finally { connectionSql.Close(); } connectionSql2 = new SqlConnection(ConfigurationManager.ConnectionStrings["Temp"].ToString()); }My problem is when the remote connection is lost it takes almost 1 minute to store in local database. how can i make it more time efficient. Thanks....
View 5 Replies
View Related
Mar 6, 2008
Hi - hope someone can help. We're creating a ASP.NET C# site that allows a user to connect to any of our 100+ SQL Servers and query a database that sits on every server. I'm trying to work out (and failing) how we can set the 'Data Source' in a connection string dynamically using the server name selected by the user in a drop down box. Any help appreciated, thanks in advance,
View 2 Replies
View Related
Oct 26, 2007
Hi. I have this kind of problem since I am not very conversant with SSIS
and stripting in VB.NET.
The set-up is the following:
Flat File Source -> Script Component -> Flat File Destination
The flat file source looks like this:
NameOfFile
Headers
Data
Data
Data and many more rows of Data
NameOfAnotherFile
Headers
Data
Data
Data and many more rows
NameOfAnotherFile
Headers
Data
Data and so on in the same manner...
My stript looks like that (not very complicated):
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Dim strRow As String = Row.Column0.Trim()
Dim strFolder As String = "Data"
Dim strConn As String
Dim charSep() As Char = {CChar(" ")}
If Mid(strRow.ToLower(), 1, 2) = "d0" Then
' This is the file name, so start a new connection to a new file
' which definitely does not exist yet
strConn = strFolder + strRow + ".csv"
' DestinationFile is the name of the
' Flat File Connection Manager
With Me.Connections.DestinationFile
.ConnectionString = strConn
End With
Else
Row.Column0 = String.Join(",", strRow.Split(charSep, StringSplitOptions.RemoveEmptyEntries))
End If
End Sub
I have several questions regarding this one.
1. Is it ok to change the ConnectionString property of the manager
to redirect the row to a different file? If not, what more to do?
2. If the new destination file does not yet exist, will it be created for me or will
I get an error? If I do, what to do not to?
3. The most important: What steps to take so that a row is discarded
from the pipeline in the script? I want some rows not to be directed
to the file destination. These are the lines that contain the name
of the file into which the data below belongs.
If you can optimize some steps in the script, then please do so by all means.
Thank you for any comments and the knowledge you kindly agree to share with me.
Darek
View 1 Replies
View Related
May 17, 2015
I have below SQL. When I run it I get the 'Each GROUP BY expression must contain at least one column that is not an outer reference' error. The date and string expressions are generated dynamically and need to be grouped upon if possible. What am I missing?
INSERT INTO tblStaffPayrollHistory (StaffID, FromDate, ToDate, PayrollNo, EventID)
SELECT DISTINCT tblStaffBookings.StaffID, CONVERT(DATETIME, '2015-05-17', 102), CONVERT(DATETIME, '2015-05-17', 102), 'tree', tblEvents.ID
FROM tblStaffBookings INNER JOIN tblEvents ON tblStaffBookings.EventID = tblEvents.ID
WHERE ...
GROUP BY tblStaffBookings.StaffID, CONVERT(DATETIME, '2015-05-17', 102), CONVERT(DATETIME, '2015-05-17', 102), 'tree', tblEvents.ID
View 2 Replies
View Related
Mar 21, 2007
Sorry for my bad english.
I have an ssis package that contains a DateTime variable named RefDate
its value saved in the package is 8/31/2006. I setted up a Package
configuration for read the value of RefDate from the parent package.I
inserted a script task with message box to verify that the package
configuration works. When I launch the parent package the message box
shows the value of RefDate setted in the parent package. The problem
is that when I use RefDate to dynamically set the connection string of
the log connection of the SSIS log provider for XML files for the
child package, the connection string contains the child value of
RefDate.
Thanks in advance.
Renzo.
View 6 Replies
View Related
Apr 27, 2008
Hi,
I am new to SSIS and i have to develop a ssis package which will run in a production machine through VB.Net(2003) exe.I am facing a problem while setting connection string of SSIS package dynamically.Can anybody help me on this?
View 1 Replies
View Related
Feb 6, 2008
Hi All,
I need to write a report which will run based on the user's input for Server Group. Meaning, if the user wants the report to be run for one say, UAT group, the report (and therefore the stored procedure) should be executed against UAT server. Or, if the user wants it to be run on the Production machine, the stored procedure should be executed on the Production Server. Assume that both UAT and Production servers are in the same domain to rule out any authentication issue.
I think one way of doing it is to create a linked server on one server which we use to connect via the Report Manager. So, whatever Server Group is selected based on that the SP will be executed on that respective Server Group's Server, since in the query we will have given full names of the tables that we use.
But, I strongly suspect, that having linked servers will not be accepted since it requires that the server owners maintain that. So, I was thinking if there is any other way of achieving this. If anyone knows, please help me with this.
Thanks a lot and let me know if the question is not clearly stated.
Manoj.
View 1 Replies
View Related
Apr 18, 2007
I want to transfer data from one server to another by using SSIS. i want the connection string to be dynamic and also according to the some other variable, the transforming data is changing.
Could you provide me the solution thet how i am able to change my connetction string dynamically and the other variable too.
i am using VS 2003 as front end and SQL server 2005 as a backhand.
Due to VS.NET 2003 i am able to create DTS packages but i have to migrate it and then anly i am able to use it in JOB in SQL server agent of SQL server 2005.
is that any code or any stored procedure from which i am able to migrate DTS packages to SSIS packages.
Thank you
View 4 Replies
View Related
Jan 28, 2006
Is there a way to dynamically create a connection manager @ run time? I would like to do this from a data set of connection strings so I can link them into a union all component.
View 1 Replies
View Related
Mar 29, 2006
Within an SSIS Package, we are trying to change the connection string of an output file connection manager at runtime (used for package logging).
To do this, we have defined variables with package-level scope and set the connection manager connection string to this variable. The first step of the package is to set these variables. The second step begins the rest of the package operations (moving data). The package executes successfully, but the log file is never created/appended to.
When the package is debugged, I can verify that the variables are being set correctly in the script task and that the variable values are being passed to the connection manager data sources.
Any ideas why this isn€™t working?
View 3 Replies
View Related
Sep 27, 2007
Hi,
I'm having a BIG problem, this is my 3rd day looking for answer !I'm trying to create a custom membership provider with MS SQL database 2005 but not the default ASPNETDB. I've changed the web.config to be as following:<connectionStrings><add name="sqlConn" connectionString="Data Source=.;Integrated Security=True;Initial Catalog=ASPNETDB;"providerName="System.Data.SqlClient" /></connectionStrings> <system.web><trace enabled="true" /><roleManager enabled="true" /><authentication mode="Forms" />
<membership defaultProvider="MySqlProvider"><providers><remove name="AspNetSqlProvider"/><add name="MySqlProvider" connectionStringName="SqlConn" type="System.Web.Security.SqlMembershipProvider" applicationName="/" /></providers></membership>
But when I try to login to the site using the login control the following error occurs:
Server Error in '/etest' Application.
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.Source Error:
Line 149: <roleManager>
Line 150: <providers>
Line 151: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 152: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 153: </providers>Source File: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Configmachine.config Line: 151
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213
It is clear that this is a prblem with my Machine.Config file - since I've "worked!" on this file for a while. But when I've checked the Machine.config file I've found the LocalSqlServer connection it is talking about! .
I'm lost and I dunno what to do, can anyone help?
Here is the mahine.config in case if you need it:<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings>
<system.data><DbProviderFactories>
<add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /><add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></DbProviderFactories>
</system.data><system.web>
<processModel autoConfig="true" /><httpHandlers />
<membership><providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /></providers>
</membership><profile>
<providers><add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></profile>
<roleManager><providers>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers></roleManager>
</system.web>
View 8 Replies
View Related
Sep 16, 2015
I am using sqljdbc41.jar to connect with MSSQL database, it is working fine on my local machine.Where as on the remote server, same class giving me error
Login failed for user '<domain><windows loginID>'
My connection string is URL...
I am using sqljdbc41.jar and on 64 bit processor , I am using following command which included path for sqljdbc_auth.dll java -Djava.library.path= C: sqljdbc_4.1enuauthx64 TestDao and error is Login failed for user '<domain><windows loginID>' why it is not picking up username passed in connection string. I have 2 machines, one is local and other is remote. on both machine I login using my domain, it is working absolutely fine on local then why the error is coming on remote machine.Both the machines are identical.
View 4 Replies
View Related
Feb 23, 2007
I have a Parent package and a child package.
I have hard coded the value for the User::FilePath variable in the parent package.
I am mapping this variable to the value of the same variable in the Child Package.
I created a directory and sql file: "C: empsqlb.sql". I have verified that the path variable value is passed to the child package by using a Script task with a messgbox call.
How do I define an execute sql task to execute sql file: @[User::FilePath] & "sqlb.sql". I'm using this expression for the SqlStatementSource property. I have entered the OLEDB server information and specified the SQLSourceType = fileconnection.
However I get the error:
[Execute SQL Task] Error: Connection manager "D:
lewisdevZsqlb.sql" does not exist.
What am I doing wrong?
View 3 Replies
View Related
Nov 12, 2007
I am pretty new to SQL Server 2005 and SSIS. I am trying to dynamically load files into SQL Server 2005 using files/paths contained in tables. I have a key table in my SSIS package that defines which files should be processed, some default values that will be associated with each file (ie CompanyKey and PeriodKey) and the file path (see below for example):
CompanyKey
PeriodKey
ProcessFlag
FileName
2
61
FALSE
2005TB200501.xls
2
62
FALSE
2005TB200502.xls
2
63
FALSE
2005TB200503.xls
2
64
TRUE
2005TB200504.xls
2
65
TRUE
2005TB200505.xls
2
66
TRUE
2005TB200506.xls
2
67
TRUE
2005TB200507.xls
2
68
TRUE
2005TB200508.xls
2
69
TRUE
2005TB200509.xls
2
70
TRUE
2005TB200510.xls
2
71
TRUE
2005TB200511.xls
2
72
TRUE
2005TB200512.xls
The package I am developing is supposed to loop through this table checking for files with ProcessFlag = TRUE. For those files, it will load all of the records/columns (prefaced with the company and period keys) into a common table.
Do I have to manually create data sources for each file or is there a way to dynamically define the connection and process the connection?
Any assitance you could provide would be greatly appreciated!
Thanks.
Vik
View 3 Replies
View Related
Jan 18, 2008
I have been trying to host my website on Go Daddy for about 3 weeks and I have cleared several problems but this one remains. I can get into the ASPNETDB database for doing logins , etc but I cant access my database called "PINEmgt".
To try to understand where the problem is located,I built a very simple application without login controls and put on it one Detailform accessing a single line table "Signin". I continually get the error message I got with my real app :"The connection name 'PINEMgtConnectionString2' was not found in the applications configuration or the connection string is empty. " There is only one connection string in my app -'PINEMgtConnectionString2'. When I run the app locally on my machine it works. After I move everything to Go Daddy, I get the error message and the following dump"
Line 24: </Fields>
Line 25: </aspetailsView>
Line 26: <aspqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStringsINEMgtConnectionString2 %>"
Line 27: InsertCommand="INSERT INTO Signup(first_name, last_name, email, customer_id) VALUES (,,,)"
Line 28: SelectCommand="SELECT * FROM [Signup]"></aspqlDataSource>
This is indeed the code from my single page app.
The dump is:
[InvalidOperationException: The connection name 'PINEMgtConnectionString2' was not found in the applications configuration or the connection string is empty.]
System.Web.Compilation.ConnectionStringsExpressionBuilder.GetConnectionString(String connectionStringName) +3039085
ASP.default_aspx.__BuildControlSqlDataSource1() in d:hostinguck7scoutDefault.aspx:26
ASP.default_aspx.__BuildControlform1() in d:hostinguck7scoutDefault.aspx:10
ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) in d:hostinguck7scoutDefault.aspx:1
ASP.default_aspx.FrameworkInitialize() in d:hostinguck7scoutDefault.aspx.vb:912306
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
After Googleing, asking Go Daddy for info (which they dont give) , etc for three weeks, I need serious mental help
in the form of a solution of this problem. Your help with the problem or the name of a good mental health professional in eastern N.C. (maybe both) would be appreciated.
View 10 Replies
View Related