T.R | Title | User | Personal Name | Date | Lines |
---|
1339.1 | Log files? | M5::JBALOGH | | Fri May 09 1997 09:12 | 10 |
| How about posting a log file created by setting logging in the ODBC
admin? The error you describe is being returned by the driver manager
and NOT the ODBC driver. This is not likely an Rdb ODBC issue but we
need to see the logs to be sure.
I have never seen that particular error before and I have done quite a
bit of stuff with VB and ODBC. What exactly is the customer doing in
VB?
john
|
1339.2 | | UKVMS3::RVIRR | High cost of ownership... | Fri May 09 1997 10:19 | 44 |
| John,
Thanks, that was fast! The log files are big, so I've put them in
UKVMS3::DISK$RDB2:[RVIRR]*.log
The VB code that produces the error is as follows :-
stmt = "select d_drum_in_process_flag from dyd_in_process_drum where
d_drum_no = '" & Trim(RoDIdentity) & "'"
Set rPrep = rOSCARCon.CreatePreparedStatement("", stmt)
Set rRes = rPrep.OpenResultset(rdOpenStatic, rdConcurRowver)
If rRes.EOF Then
LogMess "RRDClass:WaitForNewClassification:Drum " & Trim(RoDIdentity)
& " is missing from dyd."
On Error Resume Next
rRes.Close
rPrep.Close
rOSCARCon.RollbackTrans
WaitForNewClassification = False
Exit Function
End If
While rRes!d_drum_in_process_flag = "H"
'Wait for a few seconds before retrying
StartTime = Timer
While Timer < StartTime + 10
DoEvents
Wend
If rRes.Restartable Then
rRes.Requery
Else
MsgBox "Unable to restart rres"
End If
Wend
Thanks,
Rich.
|
1339.3 | looks like a Microsoft issue to me... | M5::JBALOGH | | Fri May 09 1997 13:51 | 45 |
| Rich,
For this problem, we need a different kind of log. Get the customer to
enable SQLTracing in the ODBC administrator and get the SQL.LOG.
I really think the customer will have to push back with Microsoft on
this one anyway. Microsoft's own ODBC specification details exactly how
errors are formatted. From pg 145 in the Microsoft ODBC Programmers
Reference,
"For errors that do not occur in a data source, the error text must use
the format:
[vendor-identifier][ODBC-component-identifier]component-supplied-text
So,
[MICROSOFT] [ODBC Cursor Library]HSTMT bindings may not be changed
when cursor is open
Means the error,
HSTMT bindings may not be changed when cursor is open
is being returned by the
[Microsoft][ODBC Cursor Library]
I don't know if this is being caused by something the customer is doing
or something VB is doing but I doubt we will see anything in any RDB
ODBC log files (since the error is being returned by MS before it gets
to us).
>Microsoft say that 0000000 is a valid value to unbind a column
This is probably true but the error indicates the cursor must be closed
before you can change the binding.
I would suggest the customer talk to someone in Microsoft who is more
fluent in native ODBC and I would certainly not file a BUG report just
because Microsoft said so...
John
|
1339.4 | Its there now... | UKVMS3::RVIRR | High cost of ownership... | Mon May 12 1997 06:56 | 10 |
| John,
Sorry, I forgot to copy the ODBC admin trace file, its SQL1.LOG on
ukvms3::DISK$RDB2:[RVIRR].
>>I would certainly not file a BUG report just because Microsoft said so...
Too right! But MS has seen these files and insisted that it was a driver
problem. Cust has re-opened his call with MS and I'll try to talk to them
directly.
Rich.
|
1339.5 | | UKVMS3::PJACKSON | Oracle UK Rdb Support | Mon May 12 1997 07:33 | 4 |
| If it is a driver problem, then the error message is wrong, so MS need
to fix that.
Peter
|
1339.6 | | UKVMS3::RVIRR | High cost of ownership... | Wed May 21 1997 11:10 | 40 |
| Hello,
I've tried this with the Oracle for Rdb ODBC driver 2.0.20 and the Oracle73 ODBC driver. It fails with the Rdb
driver but is OK with the Oracle73 and SqlServer drivers.
I've provided my code if anyone wants to try this:
If you are using VB4 it must be enterprise version.
1) Set up a ODBC DSN through control panel
2) Start a new project. From the tools menu choose references and make
sure Microsoft RDO 1.0 is selected. (This is making a reference to the
RDO object library therefore allowing VB to understand/compile the RDO
code.)
3) Choose view code, then select Object: Form Proc: Click
4) Paste the code into the form click event making sure the following statement referenced your DSN.
Set cn = rdoEngine(0).OpenConnection("", False,False,"DSN=MYPUBS;uid=sa;pwd=;")
i.e. DSN=NameOfYourDSN
Code:
Private Sub Form_Click()
Dim cn As rdoConnection
Dim rs As rdoResultset
Set cn = rdoEngine(0).OpenConnection("", False, False,"DSN=MYPUBS;uid=sa;pwd=;")
Set rs = cn.OpenResultset("Select employee_id FROM employees",rdOpenStatic, rdConcurReadOnly)
Debug.Print "got rs"
Debug.Print rs("employee_is")
Debug.Print "Requery about to happen"
rs.Requery
Debug.Print "Requery"
Debug.Print rs("employee_id")
Debug.Print "Closing..."
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
Thanks,
Rich.
|