Insert,Update,Delete In VB 2010

Hello guys this is my sample database manipulation, using the 3 basic transaction, the
INSERT, UPDATE and DELETE like shown at the image below.









INSERT:

Dim rs As New OleDb.OleDbCommand("Insert INTO Info(F_Name,M_O
,SSS,Phic,Pagibig,Tax,Net_Inc) VALUES ('" &
StrConv(TextBox2.Text, VbStrConv.Uppercase) & "','" & (TextBox3.Text) & "','" &
 (TextBox4.Text) & "','" & (TextBox5.Text) & "','" & (TextBox6.Text) & "','" &
 (TextBox7.Text) & "','" & (TextBox8.Text) & "')", con)

UPDATE:

Dim rs As New OleDb.OleDbCommand("Update  Info Set F_Name='" & StrConv
(TextBox2.Text, VbStrConv.Uppercase) &  "',M_O='" & (TextBox3.Text) & "',
SSS='" & (TextBox4.Text) & "',Phic='" & (TextBox5.Text) & "',Pagibig='" & 
(TextBox6.Text) & "',Tax='" & (TextBox7.Text) & "',Net_Inc='" & (TextBox8.Text) 
& "'  WHERE ID_Num =" & id & "", con)

DELETE:

Dim rs As New OleDb.OleDbCommand("DELETE FROM Info WHERE
ID_Num = " & id & "", con)



Hope this will help ^_^
Happy Coding  ^_^
The Hardest Thing to Do is to Do Nothing ^_^   
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

One Response to this post

  1. Anonymous on May 17, 2011 at 6:33 AM

    MAGALING ^_^ NICE CODING I GIVE YOU AN A GRADE......

    ASTIG K PINOY ^_^

Leave a comment

Copyright @ Codes-47.Blogspot.Com. Powered by Blogger.