Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread error creating table handle
Wed, Jun 6 2018 6:39 PMPermanent Link

John Taylor

Using DBIsam client server 4.43 build 3, customer is getting this error when executing:

<SQL has already been assigned>

Query.Prepare
Query.Open

The SQL Statement is:
SELECT Inbox.RF_INDEX,Inbox.RF_DATERECV,Inbox.RF_TIMERECV,Inbox.RF_RECVFROM,Inbox.RF_PAGESINFAX,Inbox.RF_RESULT,Inbox.RF_DURATION,Inbox.RF_STATUS,Inbox.RF_FWD2EMAILLASTDATETIME,Inbox.RF_FWD2EMAIL,Inbox.RF_FWD2EMAILRESULT,Inbox.RF_FWD2EMAILRECIPIENTLIST,Inbox.RF_MODEMRECEIVER,Inbox.RF_READBY,Inbox.FOLDER,Inbox.RF_UNIQUEID,Inbox.RF_CHECKEDOUT,Inbox.RF_CHECKEDOUTBY,Inbox.RF_APFBLOB,Memo.RF_MEMO,callid.CALLERID_NAME FROM
"sfsrecv.sfdata" Inbox
LEFT OUTER JOIN "sfsrecvmemo.sfdata" Memo
ON Inbox.RF_UNIQUEID=Memo.RF_UNIQUEID
LEFT OUTER JOIN CALLERID callid
ON Inbox.RF_UNIQUEID=callid.RF_UNIQUEID
WHERE
Inbox.FOLDER=''

the MadExcept stack trace is:
date/time          : 2018-06-06, 14:49:02, 20ms
computer name      : SERVER2
wts client name    : RECEPTION-PC
user name          : Reception <admin>
registered owner   : Microsoft / Microsoft
operating system   : Windows 2008 x64 Service Pack 2 build 6002
system language    : English
system up time     : 21 hours 46 minutes
program up time    : 44 seconds
processors         : 16x Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
physical memory    : 4886/8178 MB (free/total)
free disk space    : (CSmile381.39 GB
display mode       : 1680x1050, 16 bit
process id         : $17cc
allocated memory   : 72.91 MB
largest free block : 1.24 GB
executable         : SF5.exe
exec. date/time    : 2018-06-06 12:18
version            : 5.45.1.25
compiled with      : Delphi 2006/07
contact name       : evan musman
contact email      : doc@vtpainmanagement.com
madExcept version  : 4.0.12
callstack crc      : $28246df3, $fbf948e0, $9deb238a
exception number   : 1
exception class    : EDatabaseError
exception message  : Error creating table handle.

main thread ($424):
010f4d38 +090 SF5.exe      DB         2479   +3 DatabaseError
0113fbcb +033 SF5.exe      dbisamtb  10833   +3 TDBISAMDataSet.OpenCursor
011441ea +022 SF5.exe      dbisamtb  13150   +2 TDBISAMDBDataSet.OpenCursor
01101d39 +055 SF5.exe      DB         9245  +12 TDataSet.SetActive
01101b31 +009 SF5.exe      DB         9201   +1 TDataSet.Open
01b064d4 +0cc SF5.exe      sfmain    26349  +25 TFmSF5Main.OpenDataSpecial
01adf9e9 +33d SF5.exe      sfmain    14014  +98 ProcessServerIn
01ae09cd +3e9 SF5.exe      sfmain    14208 +102 TFmSF5Main.SetFolderFilterOnTable
01b8ce9b +2cb SF5.exe      Navigator  1449  +44 TNavigator.NavTreeChange
00e9bf6c +040 SF5.exe      ComCtrls   9629   +3 TCustomTreeView.Change
00e9ba63 +8d7 SF5.exe      ComCtrls   9458 +189 TCustomTreeView.CNNotify
00e6c3cb +2bb SF5.exe      Controls   5146  +83 TControl.WndProc
00e70417 +4fb SF5.exe      Controls   7304 +111 TWinControl.WndProc
00e9bd14 +084 SF5.exe      ComCtrls   9539  +13 TCustomTreeView.WndProc
00e6c058 +024 SF5.exe      Controls   5021   +5 TControl.Perform
00e70567 +023 SF5.exe      Controls   7353   +6 DoControlMsg
00e70f81 +00d SF5.exe      Controls   7621   +1 TWinControl.WMNotify
00e6c3cb +2bb SF5.exe      Controls   5146  +83 TControl.WndProc
00e70417 +4fb SF5.exe      Controls   7304 +111 TWinControl.WndProc
00e6fb40 +02c SF5.exe      Controls   7073   +3 TWinControl.MainWndProc
00da9e84 +014 SF5.exe      Classes   11583   +8 StdWndProc
77d8e4c7 +02b ntdll.dll                         KiUserCallbackDispatcher
767aacca +047 USER32.dll                        SendMessageW
767ac3be +016 USER32.dll                        CallWindowProcA
00e70513 +0d7 SF5.exe      Controls   7334  +23 TWinControl.DefaultHandler
00e6c9c9 +015 SF5.exe      Controls   5258   +2 TControl.WMLButtonDown
00e9c4ac +034 SF5.exe      ComCtrls   9849   +4 TCustomTreeView.WMLButtonDown
00e6c3cb +2bb SF5.exe      Controls   5146  +83 TControl.WndProc
00e70417 +4fb SF5.exe      Controls   7304 +111 TWinControl.WndProc
00e9bd14 +084 SF5.exe      ComCtrls   9539  +13 TCustomTreeView.WndProc
00e6fb40 +02c SF5.exe      Controls   7073   +3 TWinControl.MainWndProc
00da9e84 +014 SF5.exe      Classes   11583   +8 StdWndProc
767a90ce +00a USER32.dll                        DispatchMessageA
00e55426 +136 SF5.exe      Forms      8135  +23 TApplication.ProcessMessage
00e5546b +00f SF5.exe      Forms      8154   +1 TApplication.HandleMessage
00e557f3 +0c3 SF5.exe      Forms      8253  +20 TApplication.Run
01bf4003 +25f SF5.exe      SF5         974  +98 initialization
772bfdbb +00c kernel32.dll                      BaseThreadInitThunk

I have read the other posts in support forum about this error and at first blush, I thought the SQL statement was the problem, but I have gotten confirmation that this is the exact sql statement (above) that is in play.

The Query, session (stRemote) and TDBIsamDatabase component are all contained on a TDataModule.

Any ideas as to what other factors may cause this issue?  I CANNOT reproduce the issue here.

Thanks

John Taylor
Thu, Jun 7 2018 3:54 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


Its almost certainly a matter of permissions. Where is the PrivateDir set to in the session?

Roy Lambert
Thu, Jun 7 2018 9:08 AMPermanent Link

John Taylor

Roy Lambert wrote:

John


Its almost certainly a matter of permissions. Where is the PrivateDir set to in the session?

Roy Lambert

Roy,

thanks for your thoughts.  The private dir is set to a subdirectory of the data folder, it's always been that way, the customer has been with me for a long, long time and only recently started seeing this issue.  BTW, my original post left out Query.RequestLive := true

I've asked the customer to check the permissions

John
Thu, Jun 7 2018 11:19 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


>thanks for your thoughts. The private dir is set to a subdirectory of the data folder, it's always been that way, the customer has been with me for a long, long time and only recently started seeing this issue. BTW, my original post left out Query.RequestLive := true

My version of DBISAM is old (I switched to ElevateDB when it came out) but from memory and the manual

<<Multi-table queries
All queries that join two or more tables or union two or more SELECT statements will automatically produce a
canned result set.>>

That may have changed, but if not you're going to get a canned dataset which means files will be written.

Over the years almost every time this issue has arisen the answer has bee permissions. There's a small amount of AV but I can't recall anything else.

>I've asked the customer to check the permissions

I hope that's the problem otherwise its much more difficult to sort out Frown

Roy
Thu, Jun 7 2018 4:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

John,

<< Using DBIsam client server 4.43 build 3, customer is getting this error when executing: >>

Per email:

I think this may just be due to an interrupted network connection, but that should cause an exception instead of that error.   Typically, such an error is due to trying to execute a non-SELECT statement using the Open method that expects to be able to open a result set.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jun 8 2018 11:14 AMPermanent Link

John Taylor

Tim Young [Elevate Software] wrote:

John,

<< Using DBIsam client server 4.43 build 3, customer is getting this error when executing: >>

Per email:

I think this may just be due to an interrupted network connection, but that should cause an exception instead of that error.   Typically, such an error is due to trying to execute a non-SELECT statement using the Open method that expects to be able to open a result set.

Tim Young
Elevate Software
www.elevatesoft.com

The problem turned out to be a corrupt table.  Dbsys repair reported:
Invalid BLOB offset in BLOB file for physical record .... <blah blah>

That's curious because other operations on that file using Query.ExecSql were working fine, but Query.Open failed

Anyway, mystery solved

John
Image