Article View: borland.public.cppbuilder.database.ado
Article #2063same datamodule to different middle-tier classes
From: Wolfgang Unger
Date: Sat, 29 Nov 2003 16:52
Date: Sat, 29 Nov 2003 16:52
16 lines
1718 bytes
1718 bytes
Hi, I'm new in C++ and have a general problem. In Java this would be easy to me. I want to write a database-application which uses a couple of middle-tier classes for the logic. For example, each form has one middle-tier class. I want to use the same database-connection (which is in a datamodule, lets call it dm1)for all middletier-classe. If I use pointers (dm1 = new dm(NULL)) I create a new instanc each time, right? So I couldn't check if the connection is already opened by another class... What would be the correct way to handle this in C++? Greetings Wolfgang
Technical Details
Message-ID:
<bqaj1q$hot$00$1@news.t-online.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,2ee38b8940373ea6,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-11-29 08:58:12 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: "Wolfgang Unger" <wolfgangunger@gmx.de> Newsgroups: borland.public.cppbuilder.database.ado Subject: same datamodule to different middle-tier classes Date: Sat, 29 Nov 2003 17:52:19 +0100 Organization: SFS Lines: 18 Message-ID: <bqaj1q$hot$00$1@news.t-online.com> Reply-To: "Wolfgang Unger" <wolfgangunger@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 1070124922 00 18205 qQ8WVHhv4gnvSrfD 031129 16:55:22 X-Complaints-To: usenet-abuse@t-online.de X-ID: ZKNIecZJgeFudsa24w3+bsoVbqTX-eTrS1LaFjlA0r9SSbsMPZJkk- X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300