Article View: borland.public.cppbuilder.database.dbexpress
Article #199Blackfish SQL in CGB2007
From: Steven Haworth
Date: Mon, 04 Aug 2008 06:07
Date: Mon, 04 Aug 2008 06:07
83 lines
3951 bytes
3951 bytes
Hi,
I am trying to use Blackfish SQL in Codegear C++ Builder 2007 but I am
having issues on getting the program to close down after I have connected.
I have a simple 1 form (with a button on it) application that works ok when
connecting to the application, but when I try to close it, it will not close
at all.
//---------------------------------------------------------------------------
#include <vcl.h>
#include <DBXCommon.hpp>
#pragma hdrstop
#include "Main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
try
{
TDBXConnectionEx *connection = static_cast<TDBXConnectionEx
*>(TDBXConnectionFactory::GetConnectionFactory()->GetConnection("blackfishsqlconnection",
"", ""));
if(connection)
{
ShowMessage("Connected ok");
delete connection;
}
}
catch(Exception& ex)
{
ShowMessage("Connection failed with message " + ex.Message);
}
}
//---------------------------------------------------------------------------
I have built the application with the usual defaults, build with packages
and include the dbxcommondriver package.
When I pause the application while it is hung after the main form has
disappeared, I get the following callstack:
:771e9a94 ntdll.KiFastSystemCallRet
:771e83b4 ntdll.ZwDelayExecution + 0xc
:761e1c7a kernel32.Sleep + 0xf
:2115441e ; C:\Borland\BDS5\bin\BORLNDMM.DLL
:200180bf ; C:\Windows\system32\rtl100.bpl
:20006d25 rtl100.@System@@HandleAnyException$qqrv + 0x35
:771e9b6b ntdll.RtlRaiseStatus + 0x86
:771e99f7 ntdll.KiUserExceptionDispatcher + 0xf
:200180bf ; C:\Windows\system32\rtl100.bpl
:20006d25 rtl100.@System@@HandleAnyException$qqrv + 0x35
:771e9b6b ntdll.RtlRaiseStatus + 0x86
:771e99f7 ntdll.KiUserExceptionDispatcher + 0xf
:2000a204 rtl100.@System@UnregisterModule$qqrp17System@TLibModule + 0x20
:002C13E6 Sysinit::UninitializeModule()
:771ce1c4 ; ntdll.dll
:771ba8dd ntdll.RtlExitUserProcess + 0xe6
:771ba85f ntdll.RtlExitUserProcess + 0x68
:76203b69 kernel32.ExitProcess + 0x15
:32887640 ; C:\Windows\system32\CC3280MT.DLL
:328848e9 CC3280MT.__wexecvpe + 0x85
:32884904 CC3280MT._exit + 0x10
:32887918 ; C:\Windows\system32\CC3280MT.DLL
So there seems to be an exception when in System::UnregisterModule() that is
causing the issue.
Does anybody have a simple application that uses BlackfishSQL in C++ Builder
(all examples are in Delphi, and the Delphi equivalent of this program
closes properly) without using the design time components, or have any clues
on what else I should include to get this to work?
Thanks
Steve
Technical Details
Message-ID:
<48969cb4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fb4e2,8cd9b9537f864609,start X-Google-Attributes: gidfb4e2,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Steven Haworth" <SHaworthatbigponddotnetdotau> Newsgroups: borland.public.cppbuilder.database.dbexpress Subject: Blackfish SQL in CGB2007 Date: Mon, 4 Aug 2008 16:07:39 +1000 Lines: 84 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 NNTP-Posting-Host: 58.166.50.239 Message-ID: <48969cb4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1217830068 58.166.50.239 (3 Aug 2008 23:07:48 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail