Hello,
Im testing SapDb to find out whether we should use it instead of ADABAS D.
I did my tests on a machine running:
NT-Workstation 4.0 SP 5
Access 97 SR2
Visual Basic 6 SP5
ODBC Admin.: 3.520.6526
SapDB Kernel: 7.3.0 Build 21
SapDB RT Environment: NT/Intel 7.3.0 Build 21
SapDb Odbc Driver: 7.03
Sql-Studio 7.3.1
For testing purposes Db Server and application are running on the same
machine (later we would move the DB server to a linux machine)
I encountered the following problems:
1) when linking tables with TIMESTAMP values into Access, they will be shown
as type TEXT(26) which is nice in one way because you can
see the complete value in Access. On the other hand its inconsistent
with accessing the data via DAO/ODBC direct which will always return
DATETIME (so the fractional part gets cut off). When a TIMESTAMP value
is part of the KEY, the same error as described in "TIMESTAMP +
MS ACCESS 2000" shows up.
In Adabas D Timestamps are always mapped to DateTime, which - of course
- will also give problems when trying to use Access as a frontend
because Access will usually not find the records it read before
(fractional part is missing). My personal workaround for this is to declare
such
fields a CHAR(26). This works almost perfect - if only I could declare a
default value of TIMESTAMP for them. Insert and update statements
will happily use TIMESTAMP for CHAR columns - why not allow it as
DEFAULT value too? (would probably be more performant than a trigger, or?)
2) This one looks like a bug to me: When I open a recordset using a Querydef
with parameters (all with DAO/ODBC direct, no matter whether from
within Access or using VB6) a REQUERY of this recordset will let the
program crash in SQLSetDescRec(according to Dr. Watson). I can reproduce
this
using the following VB-code (DSN setup: SqlMode=Internal,
IsolationLevel=Uncomitted,Options: SQL_NO_TOTAL)
Dim Wsp As DAO.Workspace, Db As DAO.Connection,
Qry As DAO.QueryDef, Rs As DAO.Recordset
' Connect to DB
Set Wsp = CreateWorkspace("", "IHPGM", "michel",
dbUseODBC)
Set Db = Wsp.OpenConnection("SAPDB", ,
dbDriverCompleteRequired)
Wsp.BeginTrans
' Build Test Table
Db.Execute "create table test( " & _
"ID varchar(20) not
null default '', " & _
"NAME varchar(40) not null
default '', " & _
"PRIMARY KEY (ID))",
dbExecDirect
Db.Execute "Commit", dbExecDirect
' Insert Test Data
Db.Execute "Insert into Test
values('ID1','NAME-A')", dbExecDirect
Db.Execute "Insert into Test
values('ID2','NAME-A')", dbExecDirect
Db.Execute "Insert into Test
values('ID3','NAME-B')", dbExecDirect
Db.Execute "Insert into Test
values('ID4','NAME-B')", dbExecDirect
Db.Execute "Commit", dbExecDirect
' Build Query, open Recordset, Read Data remembering last ID
Set Qry = Db.CreateQueryDef("", "Select * from
Test where Name=:p1")
Qry.Parameters(0) = "NAME-A"
Set Rs = Qry.OpenRecordset(dbOpenSnapshot)
'==> Statement causing the crash <===
Rs.Requery
...........
The Kernel does not show any errors.
Excerpt from Dr. Watson:
Funktion: SQLSetDescRec
0257d544 039090909090 add
edx,[eax+0x90909090] ds:90909090=????????
0257d54a 90 nop
0257d54b 90 nop
0257d54c 90 nop
0257d54d 90 nop
0257d54e 90 nop
0257d54f 90 nop
0257d550 8b442404 mov
eax,[esp+0x4] ss:03bde847=????????
0257d554 53 push ebx
0257d555 56 push esi
FEHLER ->0257d556 668b7032 mov
si,[eax+0x32] ds:00f0ea07=????
0257d55a 8b4040 mov
eax,[eax+0x40] ds:00f0ea06=????????
0257d55d 57 push edi
0257d55e 8b7c2418 mov
edi,[esp+0x18] ss:03bde847=????????
0257d562 bb01000000 mov ebx,0x1
0257d567 8907 mov [edi],eax
ds:00000001=????????
0257d569 56 push esi
0257d56a e82140feff call
apgstst+0x1210 (02561590)
0257d56f 83c404 add esp,0x4
0257d572 85c0 test eax,eax
0257d574 7403 jz
SQLSetDescRec+0x3649 (0257d579)
0257d576 830704 add dword ptr
[edi],0x4 ds:00000001=????????
*----> Stack Back Trace <----*
FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4
Function Name
02ccfe7c 02574bca 029c4c40 02788170 02cc0002
029b9230 sqlod32!SQLSetDescRec (FPO: [3,0,3])
02ccff00 1f7f77a0 029b8bc0 00000002 00000001
02051cf4 sqlod32!SQLExtendedFetch (FPO: [EBP 0x02051cf4] [5,22,4])
02051cf4 00000064 fffffffd 00000001 02051eb0
00000000 ODBC32!SQLExtendedFetch
ODBC Manager Trace ends with:
TEST fe-114 ENTER SQLExtendedFetch
HSTMT 01F42468
UWORD 2
<SQL_FETCH_FIRST>
SQLROWOFFSET 0
SQLROWSETSIZE * 0x02051CF4
UWORD * 0x02051EB0
ODBC Driver Trace ends with:
Select * from Test where Name=:p1 FOR REUSE
EXECUTE: CMD :
PARSEID: INPUT : 00000498 00002201 3C002E00
INPUT : 1: COLUMN1 :
NAME-A
mfIndex init : 3
mfIndex init : 3
WARNING: W-------8-------
SQLRESULTNAME : SQL_CURSOR_0012
SQLERRD(INDEX_3) : 2
START : DATE : 2002-06-06 TIME : 0011:13:33
END : DATE : 2002-06-06 TIME : 0011:13:33
Let me know if you need further info/logs. Thanks a lot in advance,
Silke Arnswald
Aluminium Oxid Stade GmbH
Tel.: +49-4146-92-661
Email: [EMAIL PROTECTED]
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general