How does the cmd parameter commit transactions?

  • Thread starter Thread starter BoredwithExcel
  • Start date Start date
B

BoredwithExcel

Is this provider on AutoCommit? I dont understand how it commits.

Cheers,
Abhijit
 
Huh? Let's hear more about what you're trying to do and how you're trying to
do it.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Here is my code.

***********Start of code*************

Dim strSQL As String = _
"INSERT INTO Traps (PicId, PicDesc)" & _
" VALUES (:PICID,:PICDESC)"

Dim cmd As New OracleCommand(strSQL, orc)
cmd.CommandType = CommandType.Text
MsgBox(cmd.Connection.State)
'Parameters for Oracle Command Object
Dim prmTwo As New OracleParameter
Dim prmThree As New OracleParameter

prmTwo = cmd.CreateParameter()
prmTwo.OracleType = OracleType.Number
prmTwo.Direction = ParameterDirection.Input
prmTwo.Size = 3
prmTwo.ParameterName = "@PicID"
prmTwo.Value = 10
cmd.Parameters.Add(prmTwo)

prmThree = cmd.CreateParameter()
prmThree.OracleType = OracleType.VarChar
prmThree.Direction = ParameterDirection.Input
prmThree.ParameterName = "@PicDesc"
prmThree.Size = 100
'prmThree.Value = arrFilename(0).ToString
prmThree.Value = "Hey there are you ready"
cmd.Parameters.Add(prmThree)
cmd.ExecuteNonQuery()

***********End of of code*************

I need to know where does it commit? Cos the values do appear in the
daatbase.
 
Back
Top