Click here to Skip to main content
15,914,013 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Short cut keys Pin
minhpc_bk15-Jun-06 16:36
minhpc_bk15-Jun-06 16:36 
QuestionGenerate Popup window Pin
skysunil14-Jun-06 23:01
skysunil14-Jun-06 23:01 
AnswerRe: Generate Popup window Pin
_AK_14-Jun-06 23:04
_AK_14-Jun-06 23:04 
AnswerRe: Generate Popup window [modified] Pin
murtaza dhari15-Jun-06 0:53
murtaza dhari15-Jun-06 0:53 
AnswerRe: Generate Popup window Pin
varshavmane15-Jun-06 5:23
varshavmane15-Jun-06 5:23 
QuestionERROR_SESSION_CREDENTIAL_CONFLICT Pin
jprabbu14-Jun-06 21:48
jprabbu14-Jun-06 21:48 
QuestionTree View node editing Pin
Uma Kameswari14-Jun-06 21:46
Uma Kameswari14-Jun-06 21:46 
QuestionOracleDataAdapter, OracleTransaction Pin
JernejR14-Jun-06 21:04
JernejR14-Jun-06 21:04 
Hi

Does anybody know how to use OracleDataAdapter with OracleTransaction ?

My problem is that even if I use OracleTransaction.Rollback() method the OracleDataAdapter.Update method is executed and results are in database. Confused | :confused:

here is the example (create WebForm1 with button (id=BUTTON1) and paste this code into VB file of the form


'---------------------------------------------------------------------------------

Imports System.Data.OracleClient

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents Button1 As System.Web.UI.WebControls.Button

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Dim ORAcon As System.Data.OracleClient.OracleConnection
Dim ORAtrans As OracleTransaction

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


'---------------------------------------------------------------------------------
Dim lc_tabname As String = "table_test"

Dim conStringORA As String = "here is the connection string"
Me.ORAcon = New System.Data.OracleClient.OracleConnection(conStringORA)

Me.ORAcon.Open()
Me.ORAtrans = Me.ORAcon.BeginTransaction(IsolationLevel.ReadCommitted)

Dim lc_sql As String = lc_sql = "select * from " & lc_tabname & " where ID=0"
'this select statement return no row

Dim objDataAdapter As New OracleDataAdapter(lc_sql, Me.ORAcon)
Dim objDataSet = New DataSet
objDataAdapter.Fill(objDataSet, lc_tabname)
Dim newrow As DataRow
newrow = objDataSet.tables(lc_tabname).newrow()
newrow("test_string") = "abc"
objDataSet.tables(lc_tabname).rows.add(newrow)
Dim caa As New OracleCommandBuilder(objDataAdapter)

objDataAdapter.Update(objDataSet, lc_tabname)
Me.ORAtrans.Rollback()
Me.ORAcon.Close()

'---------------------------------------------------------------------------------

End Sub
End Class



'---------------------------------------------------------------------------------

Better any help, than no help ...

Jerry
QuestionPaging in datagrid Pin
Nagraj Naik14-Jun-06 20:50
Nagraj Naik14-Jun-06 20:50 
AnswerRe: Paging in datagrid Pin
Suamal15-Jun-06 1:01
Suamal15-Jun-06 1:01 
GeneralRe: Paging in datagrid Pin
Nagraj Naik15-Jun-06 4:34
Nagraj Naik15-Jun-06 4:34 
GeneralRe: Paging in datagrid Pin
Suamal15-Jun-06 18:57
Suamal15-Jun-06 18:57 
GeneralRe: Paging in datagrid Pin
Nagraj Naik15-Jun-06 19:49
Nagraj Naik15-Jun-06 19:49 
GeneralRe: Paging in datagrid Pin
Suamal15-Jun-06 20:11
Suamal15-Jun-06 20:11 
GeneralRe: Paging in datagrid Pin
Nagraj Naik15-Jun-06 21:38
Nagraj Naik15-Jun-06 21:38 
GeneralRe: Paging in datagrid Pin
Suamal15-Jun-06 22:58
Suamal15-Jun-06 22:58 
GeneralRe: Paging in datagrid Pin
Nagraj Naik15-Jun-06 23:22
Nagraj Naik15-Jun-06 23:22 
QuestionError : Page_Validators is undefined [modified] Pin
Praveen_S14-Jun-06 20:24
Praveen_S14-Jun-06 20:24 
AnswerRe: Error : Page_Validators is undefined Pin
minhpc_bk15-Jun-06 16:54
minhpc_bk15-Jun-06 16:54 
Questiondyamically generate 0 to n number of web charts within a templated control. Pin
uglyeyes14-Jun-06 19:47
uglyeyes14-Jun-06 19:47 
Questionsddfgfd Pin
surshbabuk14-Jun-06 19:44
surshbabuk14-Jun-06 19:44 
AnswerRe: sddfgfd Pin
_AK_14-Jun-06 20:18
_AK_14-Jun-06 20:18 
JokeRe: sddfgfd Pin
Guffa15-Jun-06 0:40
Guffa15-Jun-06 0:40 
GeneralRe: sddfgfd Pin
_AK_15-Jun-06 0:43
_AK_15-Jun-06 0:43 
Questionrename the file in vb.net Pin
amaneet14-Jun-06 19:36
amaneet14-Jun-06 19:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.