String Connection... At DataAccess Tier Or Web.config???

Mar 4, 2006

How can

ConfigurationManager.ConnectionStrings.Item("ConnectionString").ConnectionString

be embedded in the declaration of sqldatasource?

Thanks.

View 1 Replies


ADVERTISEMENT

3-Tier Architecture - Need To Change Connection String For DAL/BLL Dynamically On Login

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

Config And Connection String

Apr 26, 2007



I want to store my connection string in a configuration file, however when I create the config file the connection string password is not stored. I can manually edit my config file and add the password to my connection string but I am sure that BIDS has a better solution. What is the best practice for storing connection string passwords in my SSIS Configuration files?

View 12 Replies View Related

Can't Retrieve Connection String From Web.config - ASP.NET 2.0

Aug 1, 2007

All,
 I don't know what is the problem, i am not able to retrieve connection string from web.config  in my code behind page
I used every solution provided by people in differents forums.
can anybody help me with this.I used
WebConfigurationManager.OpenWebConfiguration("/TimeSheetApplication").ConnectionStrings("TimeSheetConnectionString").ConnectionString;
WebConfigurationManager.ConnectionStrings("TConnectionString").ConnectionString;

View 5 Replies View Related

Using The Web Config File To Set The Connection String In Asp.net 1.1

Sep 26, 2007

Currently we have a 1.1 app that sets the connection string as a Application variable, we are wanting to change that and place it in the web config file, when I do this  in 2.0 it's a simple process but in 1.1 it's different.  It doesnt seem to like the <connection string> tag, does it go in the appsettings tag and if so what should it look like and how is it referenced.

View 2 Replies View Related

How To Change The Connection String In A Web.config File

Mar 9, 2007

I've recently uploaded my website, http://www.bigredsongbus.com, to my host. Unfortunately, they don't support the use of SQL Server Express. So, I've purchased an addon through my host - discountasp.net. I've attached my database file to their server, now all that I need to do is to change the connection string in my .config file so that it points to the SQL Server. I don't know how to do this. Any help, please?Jeffrey Way 

View 2 Replies View Related

Referring To Sql Connection String In Web.config From Code Behind

May 15, 2007

Every time I move my project from my computer to the testing server I have to change the connection string references in the aspx side and in my code behind.
For the code behind I declared the SqlConnection string at the top of the code-behind page for both connection strings and comment out the one not in use. Obviously I then comment out the string not in use in the WebConfig as well.
Being superlatively lazy I always look for the easiest and quickest way to do most anything - connection strings included. Having to comment out strings twice brought rise to the question of whether I can refer to the connection string in the web.config file from the code-behind page. I'm sure it can be done, and I did a good amount of hunting around, but I couldn't find any examples of code that would do that.
Currently, as I said above, I have two connection strings declared at the top of my code-behind. Here's an example of one:Private sqlConn As New SqlConnection("Data Source=DATABASESERVER;Initial Catalog=DATABASE;User ID=USER;Password=PASSWORD")
 Then, I just use sqlConn as usual in my binding without having to "dim" it in every sub:sdaPersonnel = New SqlDataAdapter(strSqlPersonnel, sqlConn)
 Then there's the SqlConnections set up by the wizard on the aspx side:<asp:SqlDataSource ID="sqlDataSourcePayrollCompany" Runat="Server" ConnectionString="<%$ ConnectionStrings:DATABASECONNECTIONSTRING %>" ...>
 And for the connection in the web.config:<add name="DATABASECONNECTIONSTRING" connectionString="Data Source=DATABASESERVER;Initial Catalog=DATABASE;User ID=USER;Password=PASSWORD" providerName="System.Data.SqlClient" />
 So, what would be the code in the code-behind page to refer to the connection string in the web.config file?
Thanks!

View 2 Replies View Related

Windows Authentication Connection String In Web.config

Sep 1, 2004

How to add windows authentication connection string in web.config? My SQL server is WebServer, database is ORDER

View 1 Replies View Related

Dynamic Connection String (config File)

Dec 8, 2005

Hi,

View 3 Replies View Related

Web.config Connection String Being Used Based Off Enviroment Or Domain?

Feb 20, 2007

I used 3 seperate web.config files - one for Development seerver, one for Certification server, and one for Production server.  The only difference between these three is the within the <connectionStrings> tags. 
For Example:
<connectionStrings><add name="strConn" connectionString="server=xxx;uid=xxxx;pwd=xxxxx;database=yyy;"/></connectionStrings>
Within Development the connectionString points to the Development SQL server, Cert to cert SQL, and Prod to Prod SQL.  I do not have permissions to copy new Web.Config files into Cert or Prod, so when I have a change within my web.config I have to have another group manually add these files.
Is there a way to identify the domain I am curernt within and use a specific set of connections string within the web.config based off this information.  If so, can anyone post an example of how to do this...
 

View 3 Replies View Related

App-Tier X64 Connects To A X32 Data-Tier

May 22, 2008

Hi

I think the subject is pretty clear.

We are thuinking of installing Server 2008 in x64 mode on a new Application-Tier-Machine. But due to existing projects which use several databases the SQL-machine runs on a Server 2003 x32.

Would it be possible to install the Reporting Services x64 binaries on the app-tier but use a x32 SQL-Instance for the data?

Thanks in advance

View 1 Replies View Related

DTSRUN: To Multi-tier Or Not To Multi-tier. That Is The Question...

Jul 20, 2005

Greetings,We are trying to set up a set of "Leading Practices" for ourdevelopers, as well as ourselves, and hope some gentle reader canrecommend some documentation in favor of what appears to be the rightposition to take.We do not allow third party applications to run on our SQL Servers. Wewant to include DTS Packages under the definition of third partyapplications, insisting instead that the developers save theirpackages as COM Formatted files into their source code control systemsand run them from their app servers. The devlopers would like to hearthis from someone besides ourselves.While strong recomendations to remove guest access to MSDB altogetherabound, I have been unable to find a straight forward discussion ofthe advantages of structured file storage and app server off load ofDTS packages.Can anyone suggest any articles, white papers, rants, etc attemptingto formulate a solution to the benefits of taking msdb away fromguest, with the advantages of running DTS from an App server orworkstation platform, with the packages protected in source codecontrol?Thank youJohn Pollinsjpollins @ eqt . com

View 2 Replies View Related

Get SQL Connection For SQL Config From XML

May 30, 2007

Hi

In toder to make my SSIS packages portable, I need to be able to set connection string to sql package configuration. I thought I can do that via XML package, problem is, at execution time SQL server package configuration is queried first, then variables from XML.
This way, I have no chance to set connection via XML.
Any ideas on how to aproach this ?
(I want to have as much configuration on SQL server so I can modify it easily from future GUI application.

best regards

View 4 Replies View Related

Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object

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

Connection Strings In Web.config

May 31, 2007

What am I doing wrong?
This works:
SQLConn.ConnectionString = "Data Source=McD_DB;Initial Catalog=McDFeelGood;User ID=uuu;Password=ppp"
Now I want to put it in my web.config, but these don't work ("ConnectionString property has not been initialized"):
SQLConn.ConnectionString = ConfigurationSettings.AppSettings("McDFeelGoodConnectionString") (VS IDE says this method is obsolete)SQLConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("McDFeelGoodConnectionString")
<connectionStrings>    <add name="McDFeelGoodConnectionString" connectionString="Data Source=McD_DB;Initial Catalog=McDFeelGood;Persist Security Info=True;User ID=uuu;Password=ppp" providerName="System.Data.SqlClient" /></connectionStrings>

View 1 Replies View Related

SQL Connection Web Config Error

Feb 12, 2006

hey guys i keep getting this error and I am not sure how to sort it and google just aint working for me tonight.
Exception Details: System.InvalidOperationException: The ConnectionString property has not been initialized.




Line 31: SqlDbType.VarChar, 40))
Line 32: objCmd.Parameters("@IssueName").Value = IssueName.Text
Line 33: objCmd.Connection.Open()
Line 34: ' Test whether the new row can be added and display the
Line 35: ' appropriate message box to the user.




[InvalidOperationException: The ConnectionString property has not been initialized.]
System.Data.SqlClient.SqlConnection.PermissionDemand() +852131
System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +22
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
ASP.newpriority_aspx.submit(Object Source, EventArgs e) in C:Prototypeofficial1htmlewpriority.aspx:33
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e) +105
System.Web.UI.HtmlControls.HtmlInputButton.RaisePostBackEvent(String eventArgument) +106
System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

the web config con string is like so
 
<______________>
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<connectionStrings>
<add name="GeolinkSupportdb" connectionString="Data Source=.SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|ASPNETDB.MDF" />
</connectionStrings>

<system.web>

<authentication mode="Forms" />
<roleManager defaultProvider="SqlProvider"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<add
name="SqlProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="GeolinkSupportdb"
applicationName="SampleApplication" />
</providers>
</roleManager>

<membership defaultProvider="CustomizedProvider">
<providers>
<add name="CustomizedProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="GeolinkSupportdb"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0" />
</providers>
</membership>
 
</system.web>
</configuration>
 
<------------------------------>
code
 
<% @Import Namespace="System.Data" %>
<% @Import Namespace = "System.Data.SqlClient" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<% @Import Namespace="System.Web.UI.HtmlControls" %>
<script language="VB" runat="server">

Dim strConnection as string = ConfigurationSettings.AppSettings("GeolinkSupportdb")
Dim sqlConn = New SqlConnection(strConnection)
Sub Page_Load(sender as Object, e as EventArgs)

End Sub
 
Sub submit(Source As Object, e As EventArgs)
'assign the user entered information
Dim objCmd As SqlCommand
'Dim dbIssueName = IssueName.Text
'You must open the connection before populating the DataReader
Dim strSQL1 = "Insert into Support_Issue Values @IssueName"
'SqlConn.Open()
objCmd = New SQLCommand(strSQL1, SqlConn)
objCmd.Parameters.Add(New SqlParameter("@IssueName", _
SqlDbType.VarChar, 40))
objCmd.Parameters("@IssueName").Value = IssueName.Text
objCmd.Connection.Open()
' Test whether the new row can be added and display the
' appropriate message box to the user.
Try
objCmd.ExecuteNonQuery()
Message.InnerHtml = "<b>Record Added</b><br>" & strSQL1
Catch ex As SqlException
If ex.Number = 2627 Then
Message.InnerHtml = "ERROR: A record already exists with " _
& "the same primary key"
Else
Message.InnerHtml = "ERROR: Could not add record, please " _
& "ensure the fields are correctly filled out"
Message.Style("color") = "red"
End If
End Try
objCmd.Connection.Close()
End Sub
</script>
database looks like this
IssueID      UniqueIdentifer
IssueName   varchar(50)
 
Any idea on why I cannot get my connection string to work have I missed something or trying to connect to it wrongly?

View 9 Replies View Related

ASP.NET C# Calendar DataAccess Issue

Oct 10, 2007

Hello there
I'm having a little issue with Updating a SQL Table. *Deep Breath* OK, lets begin from the start...
I Have a Table Called Job. I've an ASP Page setup to insert a new record into the Job table via a DetailsView Control with an SQLDataSource bound to it. This table has many columns in it, 4 of which are DateTime columns. I use a calendar Control from the toolbox for the DateTime selection and bound all the  Calender control's SelectedDate to: SelectedDate='<%# Bind('EnteredDate') %>' using the EnteredDate field as my example.
 I only insert DateTime Values into 2 of the 4 DateTime columns in the original INSERT, so the remaining 2 columns are NULL. I have an UPDATE setup on a different page to edit the previously inserted rows in job using another SQLDataSource again using the bind method for calendars: '<%# Bind('RevisedDate') %>'
 My Problem is (according to this post I found online http://www.thescripts.com/forum/thread529052.html ) the page crashes with "Specified cast is not valid". The reason being I'm trying to bind to the remaining 2 NULL DateTime columns in an attempt to update them with a value my user will not be able to insert in the original INSERT. The solution Code I found on the link above is in VisualBasic and I have had little luck in trying to convert it into C# to even see if it solves my problem:
VB Code:
Function FixDBNull(ByVal inVal As Object) As DateTime    If inVal Is DBNull.Value Then         Return DateTime.Now    Else         Return inVal    End IfEnd Function
ASP Code:
<asp:calendar id="calEditRevisedDate" runat="server"selecteddaystyle-backcolor="red"selecteddate='<%#FixDBNull(eval("RevisedDate")) %>'visibledate='<%# FixDBNull( eval("RevisedDate")) %>'selectorstyle-backcolor="Green"></asp:calendar>
Any suggestions or work arounds would be greatly appreciated
Thank You

View 4 Replies View Related

Config File/ Connection Strings

Sep 27, 2007


Hello


I made certain changes in the properties in my Config file and by Change the ServerName and Database Name.
below is the example

When i execute the package it still runs. I mean theer is no server or database with that name but it still works.


<Configuration ConfiguredType="Property" Path="Package.Connections[ConManName].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=UHS137;Initial Catalog=UH_IntegrationStaging;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;</ConfiguredValue>
</Configuration>



Changed to


<Configuration ConfiguredType="Property" Path="Package.Connections[ConManName].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=NOSvr;Initial Catalog=NOdB;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;</ConfiguredValue>
</Configuration>


Then I created a new config file in which I checked in the box for ServerNam and when i change the name teher in the Config file

EXAMPLE


<Configuration ConfiguredType="Property" Path="Package.Connections[ConManName].Properties[ServerName]" ValueType="String">

<ConfiguredValue>NoSvr</ConfiguredValue>

and when executed teh package its fails.

Thats what I neede


SO coming to my question.
1)What is it doing. I mean how is the package talking to this config file
2) Irrespective of what I do in the Connection String the package executes fine, which It should not do as far as my understanding goes. Why is it doesn't matter whats in String. where as it matter in later.









View 5 Replies View Related

Sybase Connection In Xml Config File - Help

Jan 31, 2007

Hi all

I'm trying to connect to a Sybase DB using an OLE DB connection. Now, it works fine when I run the project without the package config enabled, but when I add the Sybase connection to the xml config file, & enable it the connection fails.

This is the error I see in the progress Tab

[Connection manager "AcidPrd.basketUser"] Error: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "ASE OLE DB Provider" Hresult: 0x80004005 Description: "Login Failed. Check for valid user ID, server name and password.". An OLE DB record is available. Source: "ASE OLE DB Provider" Hresult: 0x80004005 Description: "[Native Error code: 4002] [DataDirect ADO Sybase Provider] Login failed. ".

Can anyone help.

Thanks,

Jon

View 6 Replies View Related

Using Web.config Connection Strings In Code Behind Files

Jul 2, 2007

in asp usually i have code behind files those .aspx.vb file.can i make use of connection strings in there? i am not really familiar with connection strings. actually shouldn't code behind files "simulate" code being in the .aspx file themselves? i seem to not able to share variables between them? 

View 2 Replies View Related

SSIS Connection Error When Using Config File

Dec 17, 2007

Hi

I am developing one SSIS package to migrate an Oracle Database to SQL Server 2005 DB through ODBC. My problem is with configuration. I have to use configuration file so that in production environment the end-user must be able to change the user credentials to connect both database servers. I am trying xml configuration file. When I try to use xml configuration, my odbc connection is giving error. But if I disable the configuration through "Package Configurations Organizer", it works fine. Using an XML Editor I checked the .dtsconfig file and entered both passwords for the both connections.

I tried logging and below are the few text from log file related to error.




Code Block
User:Diagnostic, Nebu, BLRDOMNebu, DestOdbcConnection,{E3535ED4-1D21-41B9-9796-E9F5B47FFD5B}, {6820E259-18FF-4FCA-B820-73EE931D2095},12/17/2007 8:16:39 PM,12/17/2007 8:16:39 PM,0,0x,ExternalRequest_pre: The object is ready to make the following external request: 'IDbConnection.Open'.

User:Diagnostic,Nebu, BLRDOMNebu, DestOdbcConnection,{E3535ED4-1D21-41B9-9796-E9F5B47FFD5B},{6820E259-18FF-4FCA-B820-73EE931D2095},12/17/2007 8:16:41 PM,12/17/2007 8:16:41 PM,0,0x,ExternalRequest_post: 'IDbConnection.Open failed'. The external request has completed.






I am using Protection level = EncryptSensitiveWithPassword for the package.

Please help me.

Thanks & Regards

Charmis

View 4 Replies View Related

Web.config, ConnectionStrings And SQL Named Instances Over A VPN Connection

Aug 29, 2007

Ok, here's the deal. This has been killing me for months now.

Here's the setup - SQL 2000 database on a Shared Infrastructure (cluster). I have a database on a named instance. My port number is xxxxx. I have dbo (through Windows Auth) permissions on my database. When I connect at the office, I get through fine, no question. When I connect at home, I get error 26 in my asp.net 2 app (using System.Data.SqlClient), cannot find SQL Server database. I can connect through the SQL 2005 Management Studio using the same servernameinstance name I use at the office. I can connect through the SQL 2000 Query Analyzer using servernameinstancename;(semicolon)portnumber. I've tried all sorts of combinations in my web.config -
servernameinstancename,(comma) portnumber
servernameinstancename;(semicolon - causes web.config to blowup) portnumber
ipaddressinstancename, (comma) portnumber

and i still get nothing. usually it's 'error 26' - but if i use this:


Data Source=ipaddressinstancename,portnumber;Network Library=DBMSSOCN;Initial Catalog=xxx;Trusted_Connection=Yes;

I get 'Login failed for user domainuser'

I've tried making an alias. I've tried using ODBC. I've even tried a freakin' DSN. No dice.

Nothing seems to work - I'm at the end of my rope. Can someone please help?

View 4 Replies View Related

Retreiving Connection Strings From Machine.config

May 12, 2006

Hi,

I'm trying to figure out how to retreive connection strings from the machine.config instead of storing the conn strings in a *.dtsconfig file. The reason that I'm trying to use the machine.config is for the simple reason that I'll be able to manage all of the conn strings in one location on each server. (Instead of mutliple dtsconfig files.) Is it posible to utilize the machine.config in SSIS? If so, could someone explain how, or better yet, have an example?

thanks for the help!

View 11 Replies View Related

Storing Connection Strings In Machine.config In SP2?

Mar 8, 2007

Is there now any way to store connection strings for use in SSIS packages in the machine.config with SP2?

View 4 Replies View Related

Quick Q: Regarding Static DataAccess Class And Concurrency

Jan 3, 2005

Im new to SQL and DB in general.
Ive been experimenting and right now I have a 1 static dataAccess class that handles every query to the DB.

Q: Do Static classes such as a static dataAccess class need to be threadsafe as there is only one instance of these within the entire application.

View 1 Replies View Related

Dynamic Database Connection In SSIS Without Using A Config File

May 1, 2008

I'm a newbie to SSIS so this question may cause people to point and laugh. I apologise if that's the case.

I have a configuration database that holds connection details to a remote database. I want to use these connection details to dynamically create a new connection to some remote database.

I usually work in with C# where this would be simple but I can't find how to do this using SSIS.

I have found people using configuration files but as I already have my connection data in a table I don't really want to strip it out. (Also, is it a security risk to have database connection strings stored in a config file?)

I have been able to implement a custom script object to build the connection string and assign it to a user variable within the package but can't find any way to then use that variable to connect to the remote database.

Can anyone help?

View 6 Replies View Related

SSIS - Excel Connection Error When Using Config Files

Mar 26, 2008

I have several SSIS packages, some of which retrieve data from excel files - they work fine from th VS designer until I try to store configurations in a SQL database - then I get the following error:


SSIS package "ITAMdiv2.dtsx" starting.

Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.

Error: 0xC0202009 at ITAMdiv2, Connection manager "ExcelDIV2": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.

An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

Error: 0xC020801C at Data Flow Task, Excel Source [84]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ExcelDIV2" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Error: 0xC0047017 at Data Flow Task, DTS.Pipeline: component "Excel Source" (84) failed validation and returned error code 0xC020801C.


any ideas?

Thanks in advance@!

Bob

View 1 Replies View Related

Synchronize Connection Strings Dialog Box With XML Config File

Aug 17, 2006

Hello,

This has been happening to me since I started using Configuration files.  I
use one XML config file that stores Machine Specific settings and one
connection string to my Metadata database.  The problem is the database
connection.

When I set the conection in the Configuation file, save, close and reopen
the package, a dialog box opens with the title "Synchronize Connection
Strings".

To reproduce the problem:

1. Ceate New SSIS Project
2. New Data Source Localhost.Adventureworks
3. In Package.dtsx  create an New Connection from Data Source...
4. Choose AdventureWorks
5. Save Package
6. Close Package
7. Open Package

There is no problem at this point.

8. Enable Package Configurations
9. Create a new XML Configuration File
10. Give it a name and a location
11. Click Next
12. Under Connection Managers Click Adventure Work
13. Click Next
14. Give it a Name
15. Click Finish

16. Save
17. Close
18. Open

Uh-Oh!

"Synchronize Connection Strings" Dialog Box
Hare is what it tells me.

Connection
Adventure Works

Data Source
Adventure Works

Old Connection String
Data Source=.;User ID=;Initial Catalog=AdventureWorks;Integration
Security=True;

Old Connection String

Data Source=.;Initial Catalog=AdventureWorks;Integated Security=True

19. Press OK

20. Save Package
21. Close
22. Open

Uh-Oh, still there.

Has anyone else run into this?  If so, how can I get around it?

Thank you for your help.

View 7 Replies View Related

How To Use ProviderName, User ID, Password, And Connection Saved In Web.config And SqlDataSource

Jun 1, 2008

Just downloaded and installed the VS 2008 Express and created/tested some websites.   I have done several aspx websites using VS 2005 during the last 2 years.  Still I don't quite understand the details of coding the database connection and DataBing.  For example, what does 'providerName',and Integrated Security really mean?Why in the Web.config file these are providerName="System.Data.SqlClient" and Integrated Security=True?  Why in Default.aspxthere are both ntegrated Security=True;and USER ID=WEB; Password=webwebweb1".  I know these may deal with the authentication mode of my SQL Serverdatabase.For the VS 2008 Express and SQL Server 2005 Express, I installed in my XP home PC, I used the file system websites,  If I upgrade to XP Pro and install IIS web server, and use SQL Server 2005, what might be different? Jeffrey Web.config <connectionStrings>        <add name="NorthwindConnectionString" connectionString="Data Source=D5MRY6G1SQLExpress;Initial Catalog=Northwind;Integrated Security=True"            providerName="System.Data.SqlClient" />    </connectionStrings>Default.aspx <asp:SqlDataSource ID="SqlDataSource1" runat="server"         ConnectionString="Data Source=D5MRY6G1SQLExpress;Initial Catalog=Northwind;Integrated Security=True; USER ID=WEB; Password=webwebweb1"         ProviderName="<%$ ConnectionStrings:NorthwindConnectionString.ProviderName %>"MasterDetail.aspx <asp:SqlDataSource ID="SqlDataSource2" runat="server"         ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"               

View 1 Replies View Related

Stored Procedure Output Parameter's Issue In Dataaccess Layer

Aug 27, 2007

Hi,the stored procedure returns only the first letter of the ouput parameter i.e 'e'.  Actually It must return 'error while updating data'. can anybody helpme to solve this issue.How to set the size of output parameter.spvr_ErrorDescription='error while updating data     which I get from the output parameter of stored procedure. How to set the size of output parameter
in dataaccess layer. Below is the actual code.public string UserCostCenter_Upd(string spvp_Offering,string spvp_UserId,string spvp_CostCenter,DateTime spvp_StartDate,DateTime spvp_ExpiryDate,ref string spvr_ErrorDescription){// The instance ds will hold the result set obtained from the DataRequestDataSet ds = new DataSet();RequestParameter[] parms = new RequestParameter[7];parms[0] = new RequestParameter("@Return_Value", DbType.Int32, ParameterDirection.ReturnValue, null, true);parms[1] = new RequestParameter("@p_Offering", DbType.AnsiString);parms[1].Value = spvp_Offering;parms[2] = new RequestParameter("@p_UserId", DbType.AnsiStringFixedLength);if (spvp_UserId == null)parms[2].Value = DBNull.Value;elseparms[2].Value = spvp_UserId;parms[3] = new RequestParameter("@p_CostCenter", DbType.AnsiString);if (spvp_CostCenter == null)parms[3].Value = DBNull.Value;elseparms[3].Value = spvp_CostCenter;parms[4] = new RequestParameter("@p_StartDate", DbType.DateTime);if (spvp_StartDate == null)parms[4].Value = DBNull.Value;elseparms[4].Value = spvp_StartDate;parms[5] = new RequestParameter("@p_ExpiryDate", DbType.DateTime);if (spvp_ExpiryDate == null)parms[5].Value = DBNull.Value;elseparms[5].Value = spvp_ExpiryDate;parms[6] = new RequestParameter("@r_ErrorDescription", DbType.String, ParameterDirection.InputOutput , null, true);parms[6].Value = spvr_ErrorDescription;// Create an instance of DataSQLClientAirProducts.GlobalIT.Framework.DataAccess.DataSqlClient daSQL = new DataSqlClient(Constants.ApplicationName); ;// typDSRef holds the ref. to the strongly typed datasetDataSet typDSRef = (DataSet)ds;DataSet resultDataSet = daSQL.ExecuteDataSet("[ap_UserCostCenter_Upd]", ref parms);// Call DataHelper.MapResultSet function for mapping the result set obtained in ordinary DataSet to strongly typed DataSetDataHelper helper = new DataHelper();if (!helper.MapResultSet(ref typDSRef, resultDataSet))ds = null; // Returns a null reference if the DataHelper.MapResultSet is failed. //returnCode = (int)parms[0].Value;spvr_ErrorDescription = (string)((parms[6].Value == DBNull.Value) ? null : parms[6].Value);return spvr_ErrorDescription ;}

View 5 Replies View Related

SQL Jobs Calling SSIS Packages Within MSDB Not Referencing Connection Info In Config Files

Nov 13, 2007

I have deployed to production a number of nested packages (parent packages that call child packages) to the SQL msdb via the Save As option rather than building a deployment utility. These packages reference configuration files in a static location off of the c: drive on the production server. In the development environment, when connection changes are made and I run the Reload with Upgrade option the connection manager takes on the new server and user id settings. However, out on the production side I get the following error from the SQL job log:

Cannot load the XML configuration file. The XML configuration file may be malformed or not valid.

As a result the SQL job uses the default connection information which references the development database rather than the production database. I did research the error but found no good solutions. Is there a way to ensure the configuration files are formed correctly and that the packages are correctly referencing the configuration files? We are trying to run the ETL updates via a SQL job.

Any suggestions? Thanks.

T

View 3 Replies View Related

The Connection Name 'LocalSqlServer' Was Not Found In The Applications Configuration Or The Connection String Is Empty.

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

Data Access :: JDBC Connection Is Not Using Username Passed In Connection String

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







Copyrights 2005-15 www.BigResource.com, All rights reserved