0
私は、SQL開発者Updateはすべてのフィールド
create table tablenodes
(
nodeNo int ,
nodeName varchar2(50),
centerX int ,
centerY int,
radius number(7,2),
fileNo int
)
を使用してテーブルを作成し、私は、このテーブル内のすべてのフィールドを更新したいので、私は次のコードを書いて更新するvb.netを使用しなステートメント:
Friend Function UpdateNodeToTable(ByVal FN As Integer, ByVal nd As classNode) As Boolean
Try
Dim con As New OracleConnection
con.ConnectionString = "Persist Security Info=False;User ID=manal;password=manal;Data Source=xe"
con.Open()
Dim cmd As New OracleCommand
cmd.CommandType = CommandType.Text
cmd.Connection = con
cmd.CommandText = "update tablenodes set [email protected], centerX = @NodeCenterX," & _
"centerY= @NodeCenterY , radius= @NodeRadius where nodeNo= @nodeNum and fileno= @FileNum"
cmd.Parameters.Add("@NodeNum", OracleDbType.Int32).Value = nd.pID
cmd.Parameters.Add("@NodeName", OracleDbType.Varchar2).Value = nd.pName
cmd.Parameters.Add("@NodeCenterX", OracleDbType.Int32).Value = nd.pCenter.X
cmd.Parameters.Add("@NodeCenterY", OracleDbType.Int32).Value = nd.pCenter.Y
cmd.Parameters.Add("@NodeRadius", OracleDbType.Double).Value = nd.pRadius
cmd.Parameters.Add("@FileNum", OracleDbType.Int32).Value = FN
Dim success As Boolean
If cmd.ExecuteNonQuery() = 1 Then
success = True
Else
success = False
End If
cmd.Dispose()
con.Close()
con.Dispose()
Return success
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Function
を
私は文を更新する際に問題があり、編集しようとするたびに正しく書き込めず、別のエラー(ora-01036不正な変数名/番号、表現がない、無効な識別子)を返します。 UPDATE
文はコロンで始まるべきであるあなたに