hi guys i want to know how to get output of SSRS(another project in the same solution) to win form using c# language (in the same solution) with visual studio 2008 so any articles or answers can help me thanks
Mohamed El Wehishy
Posts
-
get data from SSRS report -
problem in reading of connection string inside app.config by applicationi found my problem my problem is the application is not read the connection string in app.config so when i start with debugging, it is all write but when start without debugging the exception is thrown another thing when i clear the comming from machine.config as the following code <configuration> <clear/> <connectionStrings> <add name="ConnectionString" connectionString="Data Source=.;Initial Catalog='Computer Sales System';Integrated Security=True"/> </connectionStrings> </configuration> the exception is thrown in both sides so i understand that the connection string in app.config is not read by application so i want to know why???????? and what is the solution for this problem thanks
-
SqlConnection or what??????? i need helphigh guys i have a problem when i press F5 on visual studio to start debugging of my project, it runs good no errors but when i press ctrl+F5 on visual studio to start without debugging of my project,it gets error message the error message is: Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immedediately. the type initializer for 'System.Data.SqlClient.SqlConnection'threw an exception. Details.. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.PlatformNotSupportedException: This operation is only supported on Windows 2000 SP3 or later operating systems. at System.Security.Principal.SecurityIdentifier..ctor(WellKnownSidType sidType, SecurityIdentifier domainSid) at System.Diagnostics.SharedUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex) at System.Diagnostics.SharedPerformanceCounter.GetCounter(String counterName, String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime lifetime) at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime) at System.Diagnostics.PerformanceCounter.Initialize() at System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value) at System.Data.ProviderBase.DbConnectionPoolCounters.Counter..ctor(String categoryName, String instanceName, String counterName, PerformanceCounterType counterType) at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp) at System.Data.SqlClient.SqlPerformanceCounters..ctor() at System.Data.SqlClient.SqlPerformanceCounters..cctor() --- End of inner exception stack trace --- at System.Data.SqlClient.SqlConnectionFactory..cctor() --- End of inner exception stack trace --- at System.Data.SqlClient.SqlConnection..cctor() --- End of inner exception stack trace --- at System.Data.SqlCli
-
sql connection or another ????????????????high guys i have a problem when i press F5 on visual studio to start debugging of my project, it runs good no errors but when i press ctrl+F5 on visual studio to start without debugging of my project,it gets error message the error message is:
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immedediately.
the type initializer for 'System.Data.SqlClient.SqlConnection'threw an exception.
Details..
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.PlatformNotSupportedException: This operation is only supported on Windows 2000 SP3 or later operating systems.
at System.Security.Principal.SecurityIdentifier..ctor(WellKnownSidType sidType, SecurityIdentifier domainSid)
at System.Diagnostics.SharedUtils.EnterMutexWithoutGlobal(String mutexName, Mutex& mutex)
at System.Diagnostics.SharedPerformanceCounter.GetCounter(String counterName, String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.PerformanceCounter.Initialize()
at System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value)
at System.Data.ProviderBase.DbConnectionPoolCounters.Counter..ctor(String categoryName, String instanceName, String counterName, PerformanceCounterType counterType)
at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp)
at System.Data.SqlClient.SqlPerformanceCounters..ctor()
at System.Data.SqlClient.SqlPerformanceCounters..cctor()
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlConnectionFactory..cctor()
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlConnection..cctor()
--- End of inner exception stack trace ---
at System.Data.S -
it is wrong with thisyou can see the first message i wait your response thanks Mohamed El-Wehishy
-
an exception with this codehi guys please redirect me to a link or tutorial which help me i can not understand the reason thanks Mohamed El-Wehishy
-
it is wrong with thisi can not understand you man please explain your words i want to know why this exception throwed thanks for help Mohamed El-Wehishy
-
it is wrong with thisthis code throw exception hi guys when i run the next code it throw an exception
private void button1_Click(object sender, EventArgs e)
{
try
{
SqlConnection cn = new SqlConnection("initial catalog=vvvvvvvvvvv;server=.;integrated security=sspi");
SqlCommand cmd = new SqlCommand("back_up_database", cn);
cmd.CommandType = CommandType.StoredProcedure;cn.Open(); int i = cmd.ExecuteNonQuery(); cn.Close(); if (i > 0) { MessageBox.Show("Your database is backed up"); } } catch(Exception ex) { MessageBox.Show("Sorry we can not back up your database"); } }
but when i execute the stored procedure
ALTER proc [dbo].[back_up_database]
as
ALTER DATABASE [vvvvvvvvvvv]
SET OFFLINE
go
BACKUP DATABASE [vvvvvvvvvvv]
TO DISK = 'D:\SQLServerBackups\vvvvvvvvvvv.Bak'
with NO_COMPRESSION
go
ALTER DATABASE [vvvvvvvvvvv]
SET ONLINE
goit completed successfully so what is wrong thanks for your interest Mohamed El-Wehishy
-
an exception with this codeok man this is my code
private void button1_Click(object sender, EventArgs e)
{
try
{
SqlConnection cn = new SqlConnection("initial catalog=vvvvvvvvvvv;server=.;integrated security=sspi");
SqlCommand cmd = new SqlCommand("back_up_database", cn);
cmd.CommandType = CommandType.StoredProcedure;cn.Open(); int i = cmd.ExecuteNonQuery(); cn.Close(); if (i > 0) { MessageBox.Show("Your database is backed up"); } } catch(Exception ex) { MessageBox.Show("Sorry we can not back up your database"); } }
when i run this code it throw exception but when i execute the stored procedure
ALTER proc [dbo].[back_up_database]
as
ALTER DATABASE [vvvvvvvvvvv]
SET OFFLINE
go
BACKUP DATABASE [vvvvvvvvvvv]
TO DISK = 'D:\SQLServerBackups\vvvvvvvvvvv.Bak'
with NO_COMPRESSION
go
ALTER DATABASE [vvvvvvvvvvv]
SET ONLINE
goit completed successfully so what is wrong thanks for your interest Mohamed El-Wehishy
-
an exception with this codehi guys when i run this code it throw an exception but it run well inside SQL Server 2008
ALTER proc [dbo].[back_up_database]
as
ALTER DATABASE [vvvvvvvvvvv]
SET OFFLINE
go
BACKUP DATABASE [vvvvvvvvvvv]
TO DISK = 'D:\SQLServerBackups\vvvvvvvvvvv.Bak'
with NO_COMPRESSION
go
ALTER DATABASE [vvvvvvvvvvv]
SET ONLINE
goso what is the problem thanks, Mohamed El-Wehishy
-
i need help:laugh: yesssssss man you are right sorry for this silly question Mohamed El-Wehishy
-
i need helphi guys i have table in sqlserver database named tels has columns tels_no , tels_name , tels_cost ok i want to enter a no in a textbox in the application then auto it get data of this no and set this in two different textboxes one for tels_name and other for tels_cost how?????????? i do not know thanks, Mohamed El-Wehishy
-
i need helpthanks very much my friend it is done thanks Mohamed El-Wehishy
-
i need helphi guys i captured an image ok then i want to repeat this image to three times and the all four images are saved in one file that file in a jpg format my code is
Graphics g1 = pictureBox1.CreateGraphics();
Image MyImage = new Bitmap(pictureBox1.ClientRectangle.Width, pictureBox1.ClientRectangle.Height, g1); Graphics g2 = Graphics.FromImage(MyImage); IntPtr dc1 = g1.GetHdc(); IntPtr dc2 = g2.GetHdc(); BitBlt(dc2, 0, 0, pictureBox1.ClientRectangle.Width, pictureBox1.ClientRectangle.Height, dc1, 0, 0, 13369376); MyImage.Clone(); g1.ReleaseHdc(dc1); g2.ReleaseHdc(dc2); MyImage.Save(@"c:\\PrintPage.jpg", ImageFormat.Jpeg);
thanks, Mohamed El-Wehishy
-
i need some helpin form1 this code
public partial class Form1 : Form
{public Form1() { InitializeComponent(); Form2 gv = new Form2(); dd(); this.Hide(); } private void dd() { Form2 ss = new Form2(); ss.Show(); }
sorry i can not write the design of form 1 part but it an user control that represent a .avi video thanks very much Mohamed
-
i need some helphi i have two forms i want after 3 seconds the first form is hiden and the second one is appeared sorry for that silly question but the first form has user control that playing a movie i trying to use the usually code to hide the first one but it is not disappeared and the second is appeared thanks very much Mohamed
-
is it xml technologythanks very much dude you answered my question :) :thumbsup:
-
is it xml technologyhi when i write a character in google search bar then it appears all or part of things that started with this character so i want to know if it is xml technology or what and how to use this with a c# application connecting to sql server database thanks Mohamed