[ADO.NET]ODP.Net을 이용한 DataAdapter 예제
간단한 예제 입니다. 참고하세요~
Dim mydeptno, mydname As String<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Dim connectStr As String = "User Id=scott;Password=tiger;Data Source=onj"
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()
댓글 없음:
댓글 쓰기