Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Darkc0der Darkc0der is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 598
Rep Power: 15
Darkc0der mempunyai hidup yang Normal
Default Help C# + ms.access

jadi gini gan,gw kan lg bkin program data urut kepegawaian..



errornya disini nihhh




Code:

private void btndelete_Click(object sender, EventArgs e)
{
//id = lblID.Text;
nip = textBox1.Text;
sqlQRY = "Delete * from pegawai where nip = " + nip + "";
cmd.CommandText = sqlQRY;
cmd.Connection = cn;
cmd.ExecuteNonQuery();

MessageBox.Show("Delete!", "Programmed By Cedrick", MessageBoxButtons.OK, MessageBoxIcon.Information);
clear();
fill();
}

sama yang ini




Code:

void UpdateQRY()
{
if (textBox1.Text == "")
{ }
else if (textBox2.Text == "")
{ }
else
{
//id = lblID.Text;
nip = textBox1.Text;
sqlQRY = "Update pegawai SET pegawai.nip = '" + textBox1.Text + "', pegawai.nama = '" + textBox2.Text + "', pegawai.pangkatgol = '" + textBox3.Text + "', pegawai.pangkattmt = '" + textBox4.Text + "', pegawai.jabatan = '" + textBox5.Text + "', pegawai.tmt = '" + textBox6.Text + "', pegawai.masatahun = '" + textBox7.Text + "', pegawai.masabulan = '" + textBox8.Text + "', pegawai.latjabatan = '" + textBox9.Text + "', pegawai.blnthn = '" + textBox10.Text + "', pegawai.jumlah = '" + textBox11.Text + "', pegawai.pendidikan = '" + textBox12.Text + "', pegawai.lulustahun = '" + textBox13.Text + "', pegawai.tingkatijazah = '" + textBox14.Text + "', pegawai.cat = '" + textBox15.Text + "', pegawai.ket = '" + textBox16.Text + "' WHERE pegawai.nip = " + nip + "";
cmd.CommandText = sqlQRY;
cmd.Connection = cn;
cmd.ExecuteNonQuery();

MessageBox.Show("Updated!", "Programmed By Cedrick", MessageBoxButtons.OK, MessageBoxIcon.Information);
clear();
fill();
}
}

jadi pas mo delete records ama mo update records..



nih file db nya http://www.media*fire..com/?aacoi62pl481pd6



erronya oledbexception was unhandled

data type mismatch in criteria expression..



help dah puyeng nih gan T_T

</div>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Terkait
Thread Thread Starter Forum Replies Last Post
JUAL Cctv &amp; access door / access control Dishwasher Elektronik lainnya 0 23rd October 2012 09:46 PM
JUAL Paket Access Door Soca - Access door made in taiwan - Pintu akses - Soca Door Access processcpu Networking & Communications 0 23rd May 2012 07:52 AM
[ASK] VB di MIC. ACCESS SinggahDapur Programming 0 20th November 2011 02:12 PM
ask about VB and MS-ACCESS? Linuxmania Programming 0 20th November 2011 01:30 AM
[Ask] SQL in Mic.Access PHPmaster Programming 0 20th November 2011 12:41 AM

 


All times are GMT +7. The time now is 08:41 AM.