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
댓글 없음:
댓글 쓰기