Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle7 ODBC & VB5/Excel DAO recordset problem

Oracle7 ODBC & VB5/Excel DAO recordset problem

From: Frank Andersen <franka_at_powertech.no>
Date: Tue, 12 Jan 1999 14:15:34 GMT
Message-ID: <77flco$s9f$1@troll.powertech.no>


Hi,

I have a small VBA app in Excel 97 which is extracting some data from an Oracle 7.3 database using the included DAO 3.5 library in Excel and the latest Oracle ODBC driver. The problem is that creating the recordset freezes Excel. I've tried a lot of different combinations of select statements with different results. Sometimes Excel freezes, sometimes not. I've also run the same code in VB5 with exactly the same results. The code below freezed on the third select statement. If I only execute the first two, its working ok. Using other selects, it freezes at first try.

   Dim wrkODBC As Workspace
   Dim Db As Database
   Dim Rec1 As Recordset
   Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "", "", dbUseODBC)

   Set Db = wrkODBC.OpenDatabase("GX", , , "ODBC;DSN=GX;UID=test1;PWD=test1")

   Set Rec1 = Db.OpenRecordset("select sysdate from dual")
   Set Rec1 = Db.OpenRecordset("select sysdate from dual")
   Set Rec1 = Db.OpenRecordset("select sysdate from dual")

Below is an extract of the ODBC trace when it freezes. If you have any info, it will be highly appreciated.

Regards,
Frank

Trace.log

EXCEL           fffc384b:fffc414b	ENTER SQLAllocStmt 
		HDBC                0x01df0670
		HSTMT *             0x021f1250

EXCEL           fffc384b:fffc414b	EXIT  SQLAllocStmt  with return
code 0 (SQL_SUCCESS)
		HDBC                0x01df0670
		HSTMT *             0x021f1250 ( 0x01ce0078)

EXCEL           fffc384b:fffc414b	ENTER SQLSetStmtOption 
		HSTMT               0x01ce0078
		UWORD                        9 <SQL_ROWSET_SIZE>
		UDWORD                   100

EXCEL           fffc384b:fffc414b	EXIT  SQLSetStmtOption  with
return code 0 (SQL_SUCCESS)
		HSTMT               0x01ce0078
		UWORD                        9 <SQL_ROWSET_SIZE>
		UDWORD                   100

EXCEL           fffc384b:fffc414b	ENTER SQLSetStmtOption 
		HSTMT               0x01ce0078
		UWORD                        0 <SQL_QUERY_TIMEOUT>
		UDWORD                     0

EXCEL           fffc384b:fffc414b	ENTER SQLSetStmtOption 
		HSTMT               0x01ce0078
		UWORD                        0 <SQL_QUERY_TIMEOUT>
		UDWORD                     0

EXCEL           fffc384b:fffc414b	EXIT  SQLSetStmtOption  with
return code -1 (SQL_ERROR)
		HSTMT               0x01ce0078
		UWORD                        0 <SQL_QUERY_TIMEOUT>
		UDWORD                     0

		DIAG [S1C00] [Oracle][ODBC Oracle Driver]Driver not capable. (0) 

		DIAG [S1C00] [Oracle][ODBC Oracle Driver]Driver not capable. (0) 

EXCEL           fffc384b:fffc414b	EXIT  SQLSetStmtOption  with
return code -1 (SQL_ERROR)
		HSTMT               0x01ce0078
		UWORD                        0 <SQL_QUERY_TIMEOUT>
		UDWORD                     0

		DIAG [S1C00] [Oracle][ODBC Oracle Driver]Driver not capable. (0) 

		DIAG [S1C00] [Oracle][ODBC Oracle Driver]Driver not capable. (0) 

EXCEL           fffc384b:fffd172b	ENTER SQLExecDirect 
		HSTMT               0x01ce0078
		UCHAR *             0x021f10cc [      -3] "Select ProspectID, BasinID,
prospectName, playID From Prospect Order By ProspectName\ 0"
		SDWORD                    -3

EXCEL           fffc384b:fffd172b	ENTER SQLExecDirect 
		HSTMT               0x01ce0078
		UCHAR *             0x02660ec0 [      84] "Select ProspectID, BasinID,
prospectName, playID From Prospect Order By ProspectName"
		SDWORD                    84

EXCEL           fffc384b:fffc414b	ENTER SQLCancel 
		HSTMT               0x01ce0078

EXCEL           fffc384b:fffc414b	EXIT  SQLCancel  with return code
0 (SQL_SUCCESS)
		HSTMT               0x01ce0078


Received on Tue Jan 12 1999 - 08:15:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US