New User: request for Update Assistance
Posted: Sun 10 Jan 2010 19:46
Sample Visual Studio 2008 code attached/below works fine where the direct connection retrieves the Oracle records and writes to the console fine. Now the next step is to use the data retrieved and update the company number string within the Oracle table. What needs to be revised using the the Devart connector to make this happen? Note we do not have a lot of Oracle experience and have decided to try to use the Devart connection tools versus the Oracle connectors (last test before purchasing). Any and all help is greatly appreciated.
Code: Select all
Imports Devart.Data.Oracle
Module Module1
Sub Main()
Dim myConnString As String = "User Id=OraUser;Password=OraDB; Server=pclinux; Direct=True; sid=TEST"
Dim mySelectQuery As String = "SELECT * FROM da.faasset WHERE fast_cat_code='CRANES' order by fast_cat_code"
Dim myConnection As New OracleConnection(myConnString)
Dim myCommand As New OracleCommand(mySelectQuery, myConnection)
myConnection.Open()
Try
Dim myReader As OracleDataReader = myCommand.ExecuteReader()
While myReader.Read()
strAssetNumber = Trim(myReader.GetString(myReader.GetOrdinal("fast_code")))
Console.WriteLine(strAssetNumber; + ", " _
+ myReader.GetString(myReader.GetOrdinal("fast_comp_code")) + ", " _
+ myReader.GetString(myReader.GetOrdinal("fast_cat_code")) + ", " _
+ myReader.GetString(myReader.GetOrdinal("fast_code")) + ", " _
+ myReader.GetString(myReader.GetOrdinal("fast_desc")))
End While
myReader.Close()
Finally
myConnection.Close()
End Try
End Sub
End Module