Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Friday, March 30, 2012

Microsoft SQL server 2005, connection string

<

connectionStrings>

<

addname="AppConnectionString1"connectionString="Data Source=".\SQLEXPRESS";AttachDbFilename="C:\Program Files\Microsoft SQL Server\MSSQL\Data\AdventureWorks2000_Data.mdf";Integrated Security=True"providerName="System.Data.SqlClient" />

</

connectionStrings>

I'm running Microsoft SQL server 2005. what is the error in the above code.

What is the error that you are getting?|||

a database not found error message.

here's some background:

I've followed the instructions here :http://msdn2.microsoft.com/library/ms310325.aspx as before, and everything went well till.

"To configure AdventureWorks to work with Web server controls"

sqlcmd -E -S (local)\sqlexpress -Q "sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE'"

My machine name is Leigh, i run win xp home edition, and MS SQL server 2005, so the above command in my case should be :

sqlcmd -E -S (local)\sqlexpress -Q "sp_grantlogin N' Leigh\ASPNET'" ? (which doesn't work i assume because not happens )

Friday, March 9, 2012

methods of storing the Connection String in package configuration

hi!

I want to store the value of the Connection String in an Common table exisiting for the whole project and retrieve it for the whole package to Run. I want to know if there is a way of doing this.

I do not want to have a config file which is created trhough the package configuration.

In case of Parent package variable the Value of the variable needs to exist which again needs to execute the SQL Task which requires a connection string.

In case of Environment variabIe.I have very less knowledge about the environment variable . Even if we store it? how can we access it and change it in client place.

In case of SQL server . Can we store in an existing table. what is the configuration filter? what is the vlaue for it.

I do not want to execute any command line.............................

Thanks,

jazz

Well, I have not done this but I think you could simply have a parent package variable that uses a SQL Task to load the connection string for the child packages (obviously you need an initial connection string to load the config in the first place so I am assuming you are looking for a connection string to a second database.).

Once you do that you can use a script task in each of the child packages to explicitly set the Dts.Connections("ConnectionName").ConnectionString property manually based on the parent variable. You can use parent package configurations to map a parent variable to the child package so the designer can see the variable used.

Hope this helps...

|||

Can i execute a stored preocedure to get the connection string from the database while installing the pacakge which can set the value of the parent package variables.

Where i can use the Parent Package Varaible in Package Configuration to be accessed by the Child Packages.

is this ok......

Thanks

Monday, February 20, 2012

message box in rdl

hi everybody

i m using dynamic connection in rdl file firstly i m showing username and pwd . after this user name and pwd i make a connection string for my report. when i m entering invalid pwd, than report generate an error. and stop. is there any way by which i can trace error and flash a message box to user about his invalid user name or pwd.

thanks

If you use the report viewer controls, you can trap the ReportError event in your code. Otherwise, the error message will always be embedded in the report.