Click here to Skip to main content
16,006,493 members
Home / Discussions / C#
   

C#

 
AnswerRe: Insert Command and access database Pin
Mbah Dhaim13-Sep-08 8:59
Mbah Dhaim13-Sep-08 8:59 
GeneralRe: Insert Command and access database Pin
Sourie13-Sep-08 17:11
Sourie13-Sep-08 17:11 
GeneralRe: Insert Command and access database Pin
Blue_Boy13-Sep-08 20:13
Blue_Boy13-Sep-08 20:13 
GeneralRe: Insert Command and access database Pin
Sourie13-Sep-08 21:45
Sourie13-Sep-08 21:45 
GeneralRe: Insert Command and access database Pin
Blue_Boy13-Sep-08 23:50
Blue_Boy13-Sep-08 23:50 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 1:18
Sourie14-Sep-08 1:18 
GeneralRe: Insert Command and access database Pin
Blue_Boy14-Sep-08 3:05
Blue_Boy14-Sep-08 3:05 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 4:16
Sourie14-Sep-08 4:16 
con1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=F:\WireDb.mdb";
con1.Open();
Int32 x1 = System.Convert.ToInt32(textBox1.Text);//Code
String x2 = textBox2.Text;//Street
String x3 = textBox3.Text;//Alley
DateTime x4 = System.Convert.ToDateTime(textBox4.Text);//Date
DateTime x5 = System.Convert.ToDateTime(textBox5.Text);//Time

cmd1.CommandText = "INSERT INTO WIRETBL(Code, Street, Alley, Date, Time) VALUES(@Code, @Street, @Alley, @Date, @Time)";
cmd1.Parameters.AddWithValue("@Code", OleDbType.Integer).Value = x1;
cmd1.Parameters.AddWithValue("@Street", OleDbType.VarChar).Value = x2;
cmd1.Parameters.AddWithValue("@Alley", OleDbType.VarChar).Value = x3;
cmd1.Parameters.AddWithValue("@Date", OleDbType.DBDate).Value = x4;
cmd1.Parameters.AddWithValue("@Time", OleDbType.DBTime).Value = x5;
//cmd1.ExecuteNonQuery();

cmd1.CommandType = CommandType.Text;
cmd1.Connection = con1;
cmd1.ExecuteNonQuery();
adp1.SelectCommand = cmd1;
DataTable tb1 = new DataTable();
adp1.Fill(tb1);
dataGridView1.DataSource = tb1;
con1.Close();

Dear Friend how can I learn working with Access Database in c#?
I need a complete reference to not bother you alot.

Sourie

GeneralRe: Insert Command and access database Pin
Mbah Dhaim14-Sep-08 4:22
Mbah Dhaim14-Sep-08 4:22 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 4:34
Sourie14-Sep-08 4:34 
GeneralRe: Insert Command and access database Pin
Mbah Dhaim14-Sep-08 4:47
Mbah Dhaim14-Sep-08 4:47 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 8:47
Sourie14-Sep-08 8:47 
GeneralRe: Insert Command and access database Pin
Sourie14-Sep-08 8:53
Sourie14-Sep-08 8:53 
GeneralRe: Insert Command and access database Pin
Mbah Dhaim14-Sep-08 11:56
Mbah Dhaim14-Sep-08 11:56 
GeneralRe: Insert Command and access database Pin
Sourie21-Sep-08 8:49
Sourie21-Sep-08 8:49 
Questioncreating real time graphical line chart Pin
yefeng_law13-Sep-08 6:59
yefeng_law13-Sep-08 6:59 
AnswerRe: creating real time graphical line chart Pin
zafersavas13-Sep-08 8:05
zafersavas13-Sep-08 8:05 
QuestionSetting tooltip location Pin
dan!sh 13-Sep-08 6:16
professional dan!sh 13-Sep-08 6:16 
AnswerRe: Setting tooltip location Pin
Mohammad Dayyan13-Sep-08 12:35
Mohammad Dayyan13-Sep-08 12:35 
GeneralRe: Setting tooltip location Pin
CSharpByDesign6-Dec-10 11:28
CSharpByDesign6-Dec-10 11:28 
QuestionMade a functional program - just not for friends Pin
Uri9113-Sep-08 5:40
Uri9113-Sep-08 5:40 
AnswerRe: Made a functional program - just not for friends Pin
Steven A. Lowe13-Sep-08 16:06
Steven A. Lowe13-Sep-08 16:06 
GeneralRe: Made a functional program - just not for friends Pin
Uri9113-Sep-08 22:14
Uri9113-Sep-08 22:14 
GeneralRe: Made a functional program - just not for friends Pin
Anthony Mushrow14-Sep-08 0:49
professionalAnthony Mushrow14-Sep-08 0:49 
GeneralRe: Made a functional program - just not for friends Pin
Uri9114-Sep-08 8:12
Uri9114-Sep-08 8:12 

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.