2016년 12월 22일 목요일

[닷넷교육,C#교육,실무교육학원추천_탑크리에듀][예제]ODP .Net dataAdapter 예제(Vb.Net)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 

Dim mydeptno, mydname As String 
Dim connectStr As String = "User Id=scott;Password=tiger;Data Source=Ora92" 
Dim con As New OracleConnection(connectStr) 
Dim objAdapter As OracleDataAdapter = New OracleDataAdapter() 
objAdapter.SelectCommand = New OracleCommand("Select * from emp", con) 
Dim objDataSet As DataSet = New DataSet("objDataSet") 
objAdapter.Fill(objDataSet, "Emp") 
Me.myDataGrid.SetDataBinding(objDataSet, "EMP") 
con.Close() 
con.Dispose() 

End Sub 

댓글 없음:

댓글 쓰기