Posts

Showing posts with the label computer

Data Providers in ASP.net

Data Providers The most commonly used .NET data providers are described in the following sections. A. Microsoft SQL Server The SQL Server .NET data provider ships with the .NET Framework. It uses the Tabular Data Stream (TDS) protocol to send requests to and receive responses from the SQL Server. This provider delivers very high performance because TDS is a fast protocol that can access Microsoft SQL Server directly without an OLE DB or ODBC layer and without COM interop. The SQL Server .NET data provider can be used with Microsoft SQL Server 7.0 or later. To access earlier versions of Microsoft SQL Server, the OLE DB .NET data provider with the SQL Server OLE DB provider (SQLOLEDB) should be used. The SQL Server .NET data provider classes are located in the System.Data.SqlClient namespace. B. OLE DB The OLE DB .NET data provider ships with the .NET Framework. It communicates with a data source using a data source-specific OLE DB provider through

ADO.net notes and data adapter

ADO.NET ADO.NET is the latest extension of the Universal Data Access technology. Its architecture is similar to classic ADO in some respects, but a great departure in others.ADO.NET is much simpler, less dependent on the data source, more flexible, and the format of data is textual instead of binary. Textual formatted data is more verbose than binary formatted data, and this makes it comparably larger. The tradeoff is ease of transportation through disconnected networks, flexibility, and speed. www.syngress.com Because data in ADO.NET is based on XML, Managed Providers are required to serve data in a proper XML format. Once a developer has written data access code, they only need to change a few parameters to connect to a different data source. ADO.NET is based on a connection-less principle that is designed to ease the connection limitations that developers have traditionally had to deal with when creating distributed solutions. You no longer nee

1. High Level Commission for Information Technology, Singh Durbar, Kathmandu, Nepal

1. High Level Commission for Information Technology, Singh Durbar, Kathmandu, Nepal What is the e-Government? A Government which accepts information and communication technologies as a tools to transform its internal and external relationships and processes in governance to be more effective, transparent, professional and costing less to its citizens. In another terms, e-Government can be viewed as the process of creating public value with the use of Modern ICT. Indian Ministry of Communications and information Technology defines electronic governance ‘the application of information Technology to the processes of government functioning to bring about simple, moral, accountable, responsive and transparent government. Therefore, e-Government is the same government that applies ICT for its transformation to deliver better public services. The value added by the government is the difference between the benefits that the public eventually enjoys and the resources and powers that citizens de

Complete Program To insert, update, show and delete in .Net using ADO

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace databaseinsertion { public partial class Form1 : Form { int myid; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string constr = "Data Source=NOBEL-PC\\SQLEXPRESS;Initial Catalog=db_ecommerce;user id=rupak;password=rupak"; SqlConnection sqlcon = new SqlConnection(constr); SqlCommand scmd = new SqlCommand("productinsertion", sqlcon); scmd.CommandType = CommandType.StoredProcedure; scmd.Parameters.AddWithValue("@names", textBox1.Text); scmd.Parameters.AddWithValue("@description", richTextBox1.Text); try {

delete with the use of stored procedure code in .net and sql

private void button4_Click(object sender, EventArgs e) { string constr = "Data Source=NOBEL-PC\\SQLEXPRESS;Initial Catalog=db_ecommerce;user id=rupak;password=rupak"; SqlConnection sqlcon = new SqlConnection(constr); string query = "deleteproduct"; SqlCommand scmd = new SqlCommand(query, sqlcon); scmd.CommandType = CommandType.StoredProcedure; scmd.Parameters.AddWithValue("@id", myid); try { sqlcon.Open(); scmd.ExecuteNonQuery(); MessageBox.Show("Data Deleted"); } catch (SqlException se) { MessageBox.Show(se.Message); } sqlcon.Close(); }

Update code in .net using stored procedure

private void button2_Click(object sender, EventArgs e) { string constr = "Data Source=NOBEL-PC\\SQLEXPRESS;Initial Catalog=db_ecommerce;user id=rupak;password=rupak"; SqlConnection sqlcon = new SqlConnection(constr); string product_name = textBox1.Text; string product_description = richTextBox1.Text; string query = "updateproduct"; SqlCommand scmd = new SqlCommand(query, sqlcon); scmd.CommandType = CommandType.StoredProcedure; scmd.Parameters.AddWithValue("@id",myid); // MessageBox.Show(myid.ToString()); scmd.Parameters.AddWithValue("@names", product_name); scmd.Parameters.AddWithValue("@description", richTextBox1.Text); try { sqlcon.Open(); scmd.ExecuteNonQuery(); MessageBox.Show("Data Updated"); }

Click in the listView and type the code to see data from the richTextBox and textbox

private void listView1_SelectedIndexChanged(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { ListViewItem lv = listView1.SelectedItems[0]; myid=Convert.ToInt32(lv.Tag); textBox1.Text = lv.Text; richTextBox1.Text = lv.SubItems[1].Text; } }

button code to insert data into database with the use of store procedure

button code to insert data into database with the use of store procedure .net code private void button1_Click(object sender, EventArgs e) { string constr = "Data Source=thismaydiffer\\SQLEXPRESS;Initial Catalog=db_name;user id=usernamerupak;password=userpasswordrupak"; SqlConnection sqlcon = new SqlConnection(constr); SqlCommand scmd = new SqlCommand("productinsertion", sqlcon); scmd.CommandType = CommandType.StoredProcedure; scmd.Parameters.AddWithValue("@names", textBox1.Text); scmd.Parameters.AddWithValue("@description", richTextBox1.Text); try { sqlcon.Open(); scmd.ExecuteNonQuery(); MessageBox.Show("Data Inserted"); } catch (SqlException se) { MessageBox.Show(se.Message); } sqlcon.Close(); }

A-Z list of linux command

A alias Create your own name for a command arch print machine architecture ash ash command interpreter (shell) awk (gawk) pattern scanning and processing language B basename Remove directory and suffix from a file name bash GNU Bourne-Again Shell bsh Command interpreter (Shell) bc Command line calculator bunzip2 Unzip .bz2 files C back to commands top cat Concatenate a file print it to the screen chgrp Change the group designation of a file chmod Change file permissions chown Change the owner of a file cjpeg Compress an image file to a JPEG file clear Clear terminal screen (command line) comm Compare two sorted files stty cooked Formatting the display of text in a terminal cp Copy command cpio Copy files to and from archives csh C Shell cut Print selected parts of lines to standard output D back to commands top date Display date and time dc Command line calculator df Show amount of disk space free diff Determine difference between two files diff3 Determine d

ajax code in php

AJAX is used to create more interactive applications. AJAX PHP Example The following example will demonstrate how a web page can communicate with a web server while a user type characters in an input field: Example Start typing a name in the input field below: First name: Suggestions: Anna Example Explained - The HTML Page When a user types a character in the input field above, the function "showHint()" is executed. The function is triggered by the "onkeyup" event: <html> <head> <script type="text/javascript"> function showHint(str) { if (str.length==0)   {   document.getElementById("txtHint").innerHTML="";   return;

DBA example in php

<?php $id = dba_open("/tmp/test.db", "n", "db2"); if (!$id) { echo "dba_open failed\n"; exit; } dba_replace("key", "This is an example!", $id); if (dba_exists("key", $id)) { echo dba_fetch("key", $id); dba_delete("key", $id); } dba_close($id); ?> DBA is binary safe and does not have any arbitrary limits. However, it inherits all limits set by the underlying database implementation. All file-based databases must provide a way of setting the file mode of a new created database, if that is possible at all. The file mode is commonly passed as the fourth argument to dba_open() or dba_popen(). You can access all entries of a database in a linear way by using the dba_firstkey() and dba_nextkey() functions. You may not change the database while traversing it.

An A-Z Index of the Windows XP command line

An A-Z Index of the Windows XP command line ADDUSERS Add or list users to/from a CSV file ARP Address Resolution Protocol ASSOC Change file extension associations• ASSOCIAT One step file association AT Schedule a command to run at a later time ATTRIB Change file attributes b BOOTCFG Edit Windows boot settings BROWSTAT Get domain, browser and PDC info c CACLS Change file permissions CALL Call one batch program from another• CD Change Directory - move to a specific Folder• CHANGE Change Terminal Server Session properties CHKDSK Check Disk - check and repair disk problems CHKNTFS Check the NTFS file system CHOICE Accept keyboard input to a batch file CIPHER Encrypt or Decrypt files/folders CleanMgr Automated cleanup of Temp files, recycle bin CLEARMEM Clear memory leaks CLIP Copy STDIN to the Windows clipboard. CLS Clear the screen• CLUSTER Windows Clustering CMD Start a

What are the functions of functions key in Computer from F1 to F12?

What are the functions of functions key in Computer? F1 to F12 Answer: Commonly known as "function keys", F1 through F12 may have a variety of different uses or no use at all. Depending on the installed operating system and the software program currently open will change how each of these keys operate. A program is capable of not only using each of the function keys, but also combining the function keys with the ALT and/or CTRL keys, for example, Microsoft Windows users can press ALT + F4 to close the program currently active. Below is a short-listing of some of the common functions of the functions keys on computers running Microsoft Windows. As mentioned above not all programs support function keys and/or may perform different tasks then those mentioned below. If you are looking for more specific shortcut keys and function key examples we suggest seeing our shortcut key page. F1 * Almost always used as the help key, almost every program will open the help screen when t

Programmatic Updates to the Registry

Image
Programmatic Updates to the Registry You can update the registry from within your application. This is most useful when saving application information that may change from session to session. For example, you may want your application to save the placement and size of the application window as well as options selected by the user. MFC provides registry support through member functions of the CWinApp class. For more sophisticated manipulation of the registry, use API calls, as described below. Registry Support in MFC To programmatically work with data in the registry, the first step is to call CWinApp::SetRegistryKey . AppWizard will include a call to this function in your CWinApp -derived InitInstance function. BOOL CMyApp::InitInstance() { //... SetRegistryKey("_T("Local AppWizard-Generated Applications")); //... } SetRegistryKey is used to select the "Company Name" key in the registry. You, as a developer, will

Schema Numbering

Image
Schema Numbering Over time, and given changes in versions, a program often changes the data set contained within its document class. This could become a source of serious errors, because a file saved with a previous version of a program could be erroneously loaded into a newer version. For example, suppose a document contains a pointer to an object of class CSerializedPhrase , version 1. If the class CSerializedPhrase is then updated to version 2 to include additional data members, the application must keep the document from inadvertently using the new version, or errors will result. To guard against version changes that cause errors, your application can use and check a schema number, which represents the version of the dataset composition or format of your serializable class. When you change the data members in the serializable class, you should also change the schema number of that class. In order to take advantage of schema numbering, there are issues to be handled in