Hi guys 'n gals.
I have an ADO connection to an oracle 8 database. I am trying to run some sql over this connection to rebuild a package.
The connection is declared withevents so I can use the ExecuteComplete event.
The problem is that the ExecuteComplete is reporting success but nothing is happening in the database.
Any ideas?
The code I am using ...
This is on a form with a single command button and a text box(multiline). This is a basic 'test the theory' app.
any help appreciated!
Matt
If you can keep your head while those around you are losing theirs, you obviously haven't grasped the seriousness of the situation
I have an ADO connection to an oracle 8 database. I am trying to run some sql over this connection to rebuild a package.
The connection is declared withevents so I can use the ExecuteComplete event.
The problem is that the ExecuteComplete is reporting success but nothing is happening in the database.
Any ideas?
The code I am using ...
Code:
Option Explicit
Private WithEvents cn As ADODB.Connection
Private Sub cn_ExecuteComplete(ByVal RecordsAffected As Long, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pCommand As ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As ADODB.Connection)
Select Case adStatus
Case Is = adStatusOK
MsgBox "Completed Ok"
cn.CommitTrans
Case Is = adStatusErrorsOccurred
MsgBox pError.Number & "- " & pError.Description
Case Else
Stop
End Select
End Sub
Private Sub Command1_Click()
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=OraOLEDB.Oracle.1;Password=pulse;Persist Security Info=True;User ID=csl32;Data Source=saturn"
cn.Open
cn.BeginTrans
cn.Execute text1.Text, , adAsyncExecute
End Sub
This is on a form with a single command button and a text box(multiline). This is a basic 'test the theory' app.
any help appreciated!
Matt
If you can keep your head while those around you are losing theirs, you obviously haven't grasped the seriousness of the situation