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
R

Ravindra Sadaphule

@Ravindra Sadaphule
About
Posts
11
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • why Signing with private key ?
    R Ravindra Sadaphule

    Signing with strong name just ensures that your assmebly has not been tampered with after it has been deployed as CLR validates strong name while loading the assembly. But you can not trust the operations done by that code. Strong names are secure as long private key with which assembly was signed is kept secured. When you sign the assembly with private key what is does is it encrypts hash of the assembly and embeds it with assembly alongwith public key. When a calling assembly invokes it, it first decrypts the hash with public key, then recomputs the hash from dll and compares it with decrypted has. If both match, then only assembly is loaded, else it wont be loaded.

    Ravindra Sadaphule MCSD.NET

    .NET (Core and Framework) question cryptography regex announcement

  • C#-Function as Part of an SQL-Where-Clause
    R Ravindra Sadaphule

    Try sqlString = "... Where Status = 'A' And 1=" + ((int)lRes).ToString(); Ravindra Sadaphule MCSD.NET

    C# csharp database sysadmin question

  • Static Values
    R Ravindra Sadaphule

    This behavious is correct. Static variable has lifetime of global variable but it has a scope of local variable. Hence the value of static variable persists across multiple calls to the function. Unlike nonstatic members where each instance of object has its own copy of variables, the static variable is shared across all instances i.e. only one copy od static variable is available across all instances of objects. Ravindra Sadaphule MCSD.NET

    C# tutorial question

  • ComboBox
    R Ravindra Sadaphule

    Clone function will only copy the structure not the data. Copy function will copy both structire as well as data. Hence Copy function is more relevant in this case. The copied data will be stored physically in memory. Ravindra Sadaphule MCSD.NET

    C# wpf wcf question

  • Winforms IDE problem
    R Ravindra Sadaphule

    You need to remove the reference to Project 1 from Project 2 whenever you get this error. Then build Project1. restablish the reference and then build all. This should resolve the error. Cheers Ravindra Sadaphule MCSD.NET

    C# help csharp visual-studio winforms business

  • display custom column names in datagrid
    R Ravindra Sadaphule

    One way is to use aliases for columns in SQL query itself. e.g. the query can be SELECT Softwareid as Code, softwaredesc as description, remarks as remarks FROM SoftwareMaster Cheers Ravindra Sadaphule MCSD.NET

    C# csharp css database help tutorial

  • ComboBox
    R Ravindra Sadaphule

    Thats a great question!. The dafault behaviour is windows forms creates at least one currency manager object for each data sources included in the form. The currency manager is managed through BindingContext object. This behaviour is intentionally incorporated in order to keep all the controls on the form synchronized with data source. For Instance if you have two combo boxes FirstName and LastName bound to dsCustomer, then if user changes FirstName, the lastname column also changes in order to reflect the correct customer. Windows forms moves binding context beind the scenes and programmer is relived of writing code to synchronize the controls. If you do not want this feature, then you need to make a copy of the datasource and then bind it to combo boxes as illustrated in the code below. private void Form1_Load(object sender, System.EventArgs e) { System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter("Select top 10 * from authors", "Data Source=ITD2142s;Initial Catalog=pubs;Integrated Security=SSPI;"); ds = new System.Data.DataSet(); da.Fill(ds); comboBox1.DataSource = ds.Copy().Tables[0] ; comboBox1.DisplayMember = "au_lname"; comboBox2.DataSource = ds.Copy().Tables[0] ;; comboBox2.DisplayMember = "au_fname"; } Hope this helps ;). Cheers Ravindra Sadaphule MCSD.NET

    C# wpf wcf question

  • Pivot table in .net
    R Ravindra Sadaphule

    Let’s say we have a product table where each row represents product details like product Id, Name, Description , Price etc. Now customer might be interested to view products across (i.e. columns) and features down (row wise). This basically requires transposing product table’s rows and columns as illustrated below. The first step is to create the new Data Table and its schema from the rows of the input table. In the following code snippet, source refers to the input table and dest is the new pivoted table. //Create Destination Table DataTable dest = new DataTable("Pivot" ); // from each source table row (1st column) // create a destination column foreach( DataRow r in source.Rows ) dest.Columns.Add( r[0].ToString() ); // assign each row the Product name Now that we have the appropriate columns defined in the schema of the destination table, the next step is to create a DataRow for each feature defined in the columns of the source table, excluding the first column representing the Product name. //Create columns in destination table for each row in source table. for( int i = 0; i < source.Columns.Count - 1; i++ ) dest.Rows.Add( dest.NewRow() ); The final step is the actual transform of the columns from the source rows into the destination table. Since each table now represents a two dimensional array of its rows and columns, a very simple transform of all columns and rows could be performed by the following nested for loop. //Transpose rows and columns for( int r = 0; r < dest.Rows.Count; r++ ) for( int c = 0; c < source.Columns.Count; c++ ) dest.Rows[r][c] = source.Rows[c][r]; Ravindra Sadaphule MCSD.NET

    C# csharp help tutorial

  • n-tier application
    R Ravindra Sadaphule

    Hi, he following link on MSDN gives very good examples of N-Tier Application with code samples. It includes Fitch and Mather 7.0 and Duwamish 7.0 MSDN Enterprise Samples Cheers Ravindra Sadaphule MCSD.NET

    C# design help question

  • Bug in CSC.Exe
    R Ravindra Sadaphule

    Hi Ray, I tried to simulate the program and it works fine. Can you please the send the code? Cheers Ravindra Sadaphule MCSD.NET

    C# help csharp dotnet visual-studio hardware

  • Opening and reading access Database using csharp
    R Ravindra Sadaphule

    GIven Below is sample code to access 'Employee' table from Access Database named Mydb1.mdb OleDbDataAdapter da = new OleDbDataAdapter(@"Select * from employee", @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydb1.mdb;User Id=admin ; Password=;"); DataSet ds = new DataSet(); da.Fill(ds); DataGrid1.DataSource = ds; DataGrid1.DataBind(); Hope this helps ;) Ravindra Sadaphule MCSD.NET

    C# csharp database tutorial question
  • Login

  • Don't have an account? Register

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