Yamini
July 11th, 2001, 03:28 PM
When I was working with same code with Oracle 7.3 instance, there was absolutely no problem, but when
I have connected to Oracle 8i, this is not returning any rows, though it used to return when its connected
to Oracle 7. All the schema and data is duplicated in Oracle 8i instance.
The code is like this:
Private Sub Command1_Click()
Dim adoConn As ADODB.Connection
Dim adoRecSet As New ADODB.Recordset
Set adoConn = New ADODB.Connection
adoConn.ConnectionString = "Provider=MSDAORA;Data Source=ftdev11_dev8.world;User ID=apacapa; Password=apa;"
adoConn.Open
Form1.Cls
If adoConn.State = adStateOpen Then
Form1.Print "Connection open"
Else
Form1.Print "Connection Failed"
End If
adoRecSet.CursorLocation = adUseClient
adoRecSet.CursorType = adOpenForwardOnly
adoRecSet.LockType = adLockReadOnly
Set adoRecSet = adoConn.Execute("Select SDN_SDN_ID from SMS_NEW_DNIS where SDN_SAC_SEQ_ID = 94351 FOR
UPDATE NOWAIT")
Do While Not adoRecSet.EOF
Debug.Print adoRecSet(0)
adoRecSet.MoveNext
Loop
MsgBox "# of records " & adoRecSet.RecordCount
End Sub
1.The connection is open, after clicking the command button. But its not returning any records when
I am using "FOR UPDATE NOWAIT" clause in the select stmt. The same worked well with Oracle 7.
2. When I remove that clause in the SELECT statement, its retuning relevant records, but still showing
the recordcount = -1.
Please tell me what I should do to make the SELECT statement work with "FOR UPDATE NOWAIT" clause.
Thank you in advance for any suggestions.
Yamini
YEdupuganti@apacmail.com
Yamini
I have connected to Oracle 8i, this is not returning any rows, though it used to return when its connected
to Oracle 7. All the schema and data is duplicated in Oracle 8i instance.
The code is like this:
Private Sub Command1_Click()
Dim adoConn As ADODB.Connection
Dim adoRecSet As New ADODB.Recordset
Set adoConn = New ADODB.Connection
adoConn.ConnectionString = "Provider=MSDAORA;Data Source=ftdev11_dev8.world;User ID=apacapa; Password=apa;"
adoConn.Open
Form1.Cls
If adoConn.State = adStateOpen Then
Form1.Print "Connection open"
Else
Form1.Print "Connection Failed"
End If
adoRecSet.CursorLocation = adUseClient
adoRecSet.CursorType = adOpenForwardOnly
adoRecSet.LockType = adLockReadOnly
Set adoRecSet = adoConn.Execute("Select SDN_SDN_ID from SMS_NEW_DNIS where SDN_SAC_SEQ_ID = 94351 FOR
UPDATE NOWAIT")
Do While Not adoRecSet.EOF
Debug.Print adoRecSet(0)
adoRecSet.MoveNext
Loop
MsgBox "# of records " & adoRecSet.RecordCount
End Sub
1.The connection is open, after clicking the command button. But its not returning any records when
I am using "FOR UPDATE NOWAIT" clause in the select stmt. The same worked well with Oracle 7.
2. When I remove that clause in the SELECT statement, its retuning relevant records, but still showing
the recordcount = -1.
Please tell me what I should do to make the SELECT statement work with "FOR UPDATE NOWAIT" clause.
Thank you in advance for any suggestions.
Yamini
YEdupuganti@apacmail.com
Yamini