我是VB.net的新手。我需要修改連接到Oracle數據庫的現有應用程序。使用vb.net插入oracle序列生成值
我的問題是:我如何插入由vb的oracle序列生成的值? 我有以下代碼到目前爲止:
Dim mpData As New MaximoDataSetTableAdapters.MEASUREPOINTTableAdapter
Dim mpTable As New MaximoDataSet.MEASUREPOINTDataTable
mpData.Fill(mpTable)
Dim mData As New MaximoDataSetTableAdapters.MEASUREMENTTableAdapter
Dim mTable As New MaximoDataSet.MEASUREMENTDataTable
Dim mpRow As MaximoDataSet.MEASUREPOINTRow
For Each mpRow In mpTable
Dim mRow As MaximoDataSet.MEASUREMENTRow
mRow = mTable.NewRow()
mRow.POINTNUM = mpRow.POINTNUM
mRow.MEASUREDATE = CStr(Now)
mRow.MEASUREMENTVALUE = tTotal
mTable.Rows.Add(mRow)
mData.Update(mTable)
next
但是,因爲我有另一字段,ROWSTAMP,其由序列生成的I收到錯誤?
請指教。
Regards, Radu。
我知道這一點。但我需要vb.net代碼來使用序列在表中插入值。 – 2010-12-03 11:27:24