Click here to Skip to main content
15,881,248 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Connectivity Pin
<<Tash18>>13-Jul-09 22:01
<<Tash18>>13-Jul-09 22:01 
GeneralRe: Connectivity Pin
<<Tash18>>14-Jul-09 1:17
<<Tash18>>14-Jul-09 1:17 
GeneralRe: Connectivity Pin
shevya14-Jul-09 20:50
shevya14-Jul-09 20:50 
QuestionEntity Framework Question Pin
Juvil John12-Jul-09 22:56
Juvil John12-Jul-09 22:56 
QuestionHello.. Pin
mjawadkhatri12-Jul-09 22:06
mjawadkhatri12-Jul-09 22:06 
AnswerRe: Hello.. Pin
Blue_Boy12-Jul-09 22:20
Blue_Boy12-Jul-09 22:20 
AnswerRe: Hello.. Pin
Pete O'Hanlon12-Jul-09 22:38
mvePete O'Hanlon12-Jul-09 22:38 
AnswerRe: Hello.. Pin
Tom Deketelaere12-Jul-09 22:54
professionalTom Deketelaere12-Jul-09 22:54 
Questionrun script - credentials Pin
arkiboys12-Jul-09 21:54
arkiboys12-Jul-09 21:54 
AnswerRe: run script - credentials Pin
Dave Kreskowiak13-Jul-09 4:05
mveDave Kreskowiak13-Jul-09 4:05 
QuestionConfusion..!! Pin
Meth Ferrel12-Jul-09 21:39
Meth Ferrel12-Jul-09 21:39 
AnswerRe: Confusion..!! Pin
dan!sh 12-Jul-09 21:56
professional dan!sh 12-Jul-09 21:56 
GeneralRe: Confusion..!! Pin
Meth Ferrel12-Jul-09 23:42
Meth Ferrel12-Jul-09 23:42 
GeneralRe: Confusion..!! Pin
dan!sh 13-Jul-09 3:13
professional dan!sh 13-Jul-09 3:13 
GeneralRe: Confusion..!! Pin
Meth Ferrel13-Jul-09 3:21
Meth Ferrel13-Jul-09 3:21 
GeneralRe: Confusion..!! Pin
dan!sh 13-Jul-09 17:53
professional dan!sh 13-Jul-09 17:53 

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.