Click here to Skip to main content
15,903,388 members
Home / Discussions / C#
   

C#

 
AnswerRe: Managing another .exe from code Pin
Anindya Chatterjee13-Jul-09 3:40
Anindya Chatterjee13-Jul-09 3:40 
QuestionBorder Less Window Pin
satsumatable13-Jul-09 0:10
satsumatable13-Jul-09 0:10 
AnswerRe: Border Less Window Pin
Muhammad Mazhar13-Jul-09 0:33
Muhammad Mazhar13-Jul-09 0:33 
GeneralRe: Border Less Window Pin
satsumatable13-Jul-09 0:37
satsumatable13-Jul-09 0:37 
GeneralRe: Border Less Window Pin
DaveyM6913-Jul-09 1:18
professionalDaveyM6913-Jul-09 1:18 
QuestionI Am Sorry To Ask Again Pin
sanforjackass12-Jul-09 23:59
sanforjackass12-Jul-09 23:59 
AnswerRe: I Am Sorry To Ask Again Pin
J4amieC13-Jul-09 0:04
J4amieC13-Jul-09 0:04 
AnswerRe: I Am Sorry To Ask Again Pin
Vasudevan Deepak Kumar13-Jul-09 0:08
Vasudevan Deepak Kumar13-Jul-09 0:08 
GeneralRe: I Am Sorry To Ask Again Pin
mohit.monga8713-Jul-09 1:20
mohit.monga8713-Jul-09 1:20 
QuestionToolTip For Image Pin
rhtbhegade12-Jul-09 23:45
rhtbhegade12-Jul-09 23:45 
AnswerRe: ToolTip For Image Pin
Henry Minute12-Jul-09 23:50
Henry Minute12-Jul-09 23:50 
GeneralRe: ToolTip For Image Pin
rhtbhegade13-Jul-09 0:10
rhtbhegade13-Jul-09 0:10 
QuestionResource Pin
john563212-Jul-09 23:35
john563212-Jul-09 23:35 
AnswerRe: Resource Pin
Manas Bhardwaj12-Jul-09 23:42
professionalManas Bhardwaj12-Jul-09 23:42 
GeneralRe: Resource Pin
Muhammad Mazhar13-Jul-09 0:30
Muhammad Mazhar13-Jul-09 0:30 
QuestionImages in Resources don't show Pin
Nigel Mackay12-Jul-09 23:12
Nigel Mackay12-Jul-09 23:12 
AnswerRe: Images in Resources don't show Pin
Richard Andrew x6413-Jul-09 2:58
professionalRichard Andrew x6413-Jul-09 2:58 
GeneralRe: Images in Resources don't show Pin
Nigel Mackay13-Jul-09 3:16
Nigel Mackay13-Jul-09 3:16 
GeneralRe: Images in Resources don't show Pin
Richard Andrew x6413-Jul-09 3:20
professionalRichard Andrew x6413-Jul-09 3:20 
GeneralRe: Images in Resources don't show Pin
Nigel Mackay13-Jul-09 3:36
Nigel Mackay13-Jul-09 3:36 
QuestionConnectivity Pin
shevya12-Jul-09 23:07
shevya12-Jul-09 23:07 
AnswerRe: Connectivity [modified] Pin
dan!sh 12-Jul-09 23:14
professional dan!sh 12-Jul-09 23:14 
AnswerRe: Connectivity Pin
rhtbhegade12-Jul-09 23:38
rhtbhegade12-Jul-09 23:38 
AnswerRe: Connectivity Pin
<<Tash18>>13-Jul-09 0:18
<<Tash18>>13-Jul-09 0:18 
Hi.. Heres the code for it...
Do appologize me if any error occurs merely due to my coding...


using System;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
public partial class Form1 : Form
{
SqlConnection con;
SqlCommand cmd;
string username,password,gender,empcode,dateofbirth,department;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
con = new SqlConnection();
con.ConnectionString = "Data source=.;Initial Catalog=Master;user id=sa;password=123";
con.Open();
MessageBox.Show("Connection Opened");
}
private void button1_Click(object sender, EventArgs e)
{
username = textBox1.Text;
password = textBox2.Text;
gender = textBox3.Text;
empcode = textBox4.Text;
dateofbirth = textBox5.Text;
department = textBox6.Text;
cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText="insert into employee values('"+username+"','"+password+"','"+gender+"','"+empcode+"','"+dateofbirth+"','"+department+"')";
cmd.Connection = con;
cmd.ExecuteNonQuery();
MessageBox.Show("Recods Inserted Successfully");
}
}
}

Hope this helps u out... If any error occurs do let us know about it...
Cheers,
Thashif
GeneralRe: Connectivity Pin
shevya13-Jul-09 21:24
shevya13-Jul-09 21:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.