Showing posts with label alli. Show all posts
Showing posts with label alli. Show all posts

Thursday, March 8, 2012

Applications without install SQL Server

Hello all
I write a program that use sqlclient to connect to SQL Server 2005 Database
so how can i run this program on a computer that SQL Server 2005 is not
installed on it
cause it's too much for the customers to install SQL Server 2005 express
edition it takes too much time and space
i think if i can take the library files and make a virtual registery on the
client PC it must works
but i don't know how to make it
please help me as soon as possible
and thanks
Use the native client redistributable and redistribute it with your
software. Download it here:
http://www.microsoft.com/downloads/d...displaylang=en
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Abood_aa" <u16990@.uwe> wrote in message news:5970150f4c114@.uwe...
> Hello all
> I write a program that use sqlclient to connect to SQL Server 2005
> Database
> so how can i run this program on a computer that SQL Server 2005 is not
> installed on it
> cause it's too much for the customers to install SQL Server 2005 express
> edition it takes too much time and space
> i think if i can take the library files and make a virtual registery on
> the
> client PC it must works
> but i don't know how to make it
> please help me as soon as possible
> and thanks

application with critical database

Dear all

I am a pretty new in the development world fresh from uni. I am doing development on a system that has a security database. Access to the data in that database is pretty important. So in case the main server where the database is stored for soem reason fails or gets compromised i need to have a second copy with the most recent data in that database and keep the application up and running. The data i have is stored in a SQL 2005 database. What are the recomended aproaches for acheiving this needed reliability?

Would running the SQL Agent every 2 minutes do the trick? And replicate the database to another server and then have asecondary deployment on that server running as a backup? Or are there any other means?

Any advice is apreciated.

Sincerely

See if below links can be useful.

http://msdn2.microsoft.com/en-us/library/ms151247.aspx

http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx

Thursday, February 16, 2012

Append current date in exported report file name in PDF format in sql report server 2000

HI All

I want to append current date in exported reported file name.

I am using report viewer to diplay report . when i exported report in pdf format it ask me to save file at this time file name is same what ever i uploaded in report server.

when it ask me to save i want append current date to the file name.

like report file name is "testingdetail" then i want "testingdetail-November-27-2006.pdf"

Please help me in this

Thanks

Alpesh

It appears you can only alter the filename when using subscriptions. (link to related post)

If you find another way to achieve that behavior please let me know.

|||

Hi All

I found another way to append current date to Expoting report file name.

We have to overide the Reder method of reporting service

first we have to add web reference of reporting service then

put below code in button click event

private void lnkexport_Click(object sender, System.EventArgs e)

{

ReportingService rs = new ReportingService();

string reportPath=/SampleDetail/TestingDetail;

// TestingDetail report must uploded in SampleDetail folder in ReportManager

TestingDetailReport testingDetailParams =this.reportParams as TestingDetailReport;

ParameterValue[] parameters = new ParameterValue[1];

parameters[0] = new ParameterValue();

parameters[0].Name="parameterName";

parameters[0].Value=parameterValue;

Byte[] result = this.LoadReport(reportPath,parameters);

string fname = "TestingDetail" + " - " +DateTime.Today.ToString("MMMM-dd-yyyy");

Response.ClearContent();

Response.AddHeader("Content-Disposition","attachment; filename=" + fname);

Response.AddHeader("Content-Length", result.LongLength.ToString());

Response.ContentType="Application/pdf";

Response.BinaryWrite(result);

Response.Flush();

Response.Close();

}

private Byte[] LoadReport(string reportPath,ParameterValue[] parameter )

{

ReportingService rs = new ReportingService();

rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

string[] streamIDs;

string optionalString = null;

ParameterValue[]optionalparams =null;

Warning[] warning = null;

Byte[] output= rs.Render(reportPath,"PDF",null,null,parameter,null,null,out optionalString,out optionalString,out optionalparams,out warning,out streamIDs);

return output;

}

Thanks

Alpesh

Monday, February 13, 2012

app.config and connectionstrings with several databases

Hello all

I need to know the best way to work with databases (Sql Server) in my app.config.

I have an VB application that binds data from a SQL server (All Customers install these application and retrieve data via VPN). I use two databases for each customer. The first DB has some commun tables/data and the second one is its ID (Until now I setup manually the connections because we don't have more that 10 Customers but we need improve that for next year). I know that a connection string is created in the app.config file .

I don't know if it is possible from this way or if there is another way to do it... but the goal is:

1. Customer is logged in the application -User Name, ID, Password

2. Customer retrieve a database with commun data and his own database (that is his ID). (From the app.config?) How can I setup my app.config in order that every customer retrieve his database automatically when it is logged?

Thaks, I don't know if it's clear but I didn't find another way to explain my trouble

Hi

I hope I am following you.

If there are many customers I don't think it is a good way to store all there personal info(their ids) in app.config.

You can put all info into database and retrive them when the customer is logged in.

I don't what do you mean by saying own database , you might need to better design your database since it is not a good idea to add a new database(or even a new table) when you create a new customer.