Showing posts with label OracleCommand. Show all posts
Showing posts with label OracleCommand. Show all posts

8/19/2013


 ' code Insert ,Update, Delete
' Code connect Oracle

Connection Oracle Link
ConnectionOpen()
Dim custsInsCmd As OracleCommand
custsInsCmd = _Conn.CreateCommand() 
Dim sql = " update TBL_TABLE set " & _
                " NAME = 'abc' " & _
                " where ID = 1 "

custsInsCmd.CommandText = sql
custsInsCmd.ExecuteNonQuery()
ConnectionClose()

Posted on Monday, August 19, 2013 by nuyingnaja

ConnectionOpen()
Dim cmd As New OracleCommand
Dim dr As OracleDataReader
dim str as String 
Dim sql= "SELECT * FROM TBL_TABLE where ID = '1'"
cmd = New OracleCommand(sql, conn)
dr = cmd.ExecuteReader
If dr.HasRows Then
       dr.Read()
       str = dr("NAME").tostring
End If
ConnectionClose()

Posted on Monday, August 19, 2013 by nuyingnaja