Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mohamed El Wehishy

@Mohamed El Wehishy
About
Posts
18
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • get data from SSRS report
    M Mohamed El Wehishy

    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

    C# csharp sql-server visual-studio help tutorial

  • problem in reading of connection string inside app.config by application
    M Mohamed El Wehishy

    i 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

    C# question security sales help workspace

  • SqlConnection or what??????? i need help
    M Mohamed El Wehishy

    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.SqlCli

    Database help csharp visual-studio data-structures security

  • sql connection or another ????????????????
    M Mohamed El Wehishy

    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

    C# help csharp database visual-studio data-structures

  • it is wrong with this
    M Mohamed El Wehishy

    you can see the first message i wait your response thanks Mohamed El-Wehishy

    Database database sysadmin security question

  • an exception with this code
    M Mohamed El Wehishy

    hi guys please redirect me to a link or tutorial which help me i can not understand the reason thanks Mohamed El-Wehishy

    C# database sql-server sysadmin help question

  • it is wrong with this
    M Mohamed El Wehishy

    i can not understand you man please explain your words i want to know why this exception throwed thanks for help Mohamed El-Wehishy

    Database database sysadmin security question

  • it is wrong with this
    M Mohamed El Wehishy

    this 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
    go

    it completed successfully so what is wrong thanks for your interest Mohamed El-Wehishy

    Database database sysadmin security question

  • an exception with this code
    M Mohamed El Wehishy

    ok 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
    go

    it completed successfully so what is wrong thanks for your interest Mohamed El-Wehishy

    C# database sql-server sysadmin help question

  • an exception with this code
    M Mohamed El Wehishy

    hi 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
    go

    so what is the problem thanks, Mohamed El-Wehishy

    C# database sql-server sysadmin help question

  • i need help
    M Mohamed El Wehishy

    :laugh: yesssssss man you are right sorry for this silly question Mohamed El-Wehishy

    C# database help question

  • i need help
    M Mohamed El Wehishy

    hi 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

    C# database help question

  • i need help
    M Mohamed El Wehishy

    thanks very much my friend it is done thanks Mohamed El-Wehishy

    C# graphics help

  • i need help
    M Mohamed El Wehishy

    hi 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

    C# graphics help

  • i need some help
    M Mohamed El Wehishy

    in 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

    C# help question

  • i need some help
    M Mohamed El Wehishy

    hi 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

    C# help question

  • is it xml technology
    M Mohamed El Wehishy

    thanks very much dude you answered my question :) :thumbsup:

    C# database csharp sql-server sysadmin xml

  • is it xml technology
    M Mohamed El Wehishy

    hi 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

    C# database csharp sql-server sysadmin xml
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups