| 发表于:2007-04-18 14:58:107楼 得分:0 |
private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.click dim conn as new sqlclient.sqlconnection conn.connectionstring = "server=(local);uid=sa;database=ts " conn.open() dim com as new sqlclient.sqlcommand( "insert into b(bookname,shortname,barcode,bookconcern,author,price,kind,atime)values( ' " & textbox1.text & " ', ' " & textbox2.text & " ', ' " & textbox3.text & " ', ' " & textbox4.text & " ', ' " & textbox5.text & " ', ' " & textbox6.text & " ', ' " & textbox7.text & " ', ' " & label1.text & " ') ", conn) com.EXECutenonquery() conn.close() end sub | | |
|