English French German Spain Italian Dutch

Russian Portuguese Japanese Korean Arabic Chinese Simplified

11 September 2009

Connected vs Disconnected Environment

Review materi PV2 pertemuan 2




Perbedaan Connected dan Disconnected ada pada penggunaan temp database..

Koneksinya

dim xkoneksi as new sqlconnection
dim xcom as new sqlcommand
dim ds as new dataset
dim da as sqldataadapter


setelah deklarasi, lalu buat action koneksinya agar dapat dikenali program maupun databse

xkoneksi.connectionstring="Data Source=(Nama_Server);Initial Catalog=(Nama_Database);Integrated Security=true"

xkoneksi.open



Connected Environment

xcom.commandtext="Insert into Tugas values (" & _
"'" & textbox1.text & "'" & _
",'" & textbox2.text & "'" & _
",'" & textbox3.text & "')"
xcom.connection=xkoneksi
xcom.executeNonQuery
xkoneksi.close


Disconnected Environment

xcom.commandtext="Insert into Tugas values (" & _
"'" & textbox1.text & "'" & _
",'" & textbox2.text & "'" & _
",'" & textbox3.text & "')"
da=new sqldataadapter(xcom.commandtext,xkoneksi)
da.fill(ds,"Tugas")

2 komentar:

Anonim mengatakan...

materi pv2 bsa do download gag???

fachrul mengatakan...

ga mudeng. . @_@