🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3395

Re: Simple e-mail server

#3395
From: Remy Lebeau (TeamB)
Date: Tue, 27 Sep 2005 19:26
20 lines
1648 bytes
"Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote in message
news:43399502@newsgroups.borland.com...

> The only protection I know for are CriticalSections

A critical section is just one of many ways to provide thread safety to
code.

>    DB->Open();
>    DB->TABLE->InsertNewRow(DATA);
>    DB->Close();

Why are you re-opening and closing the database each time you insert a new
record?  Why not leave the DB open while the service is running?  Or, if
each client is getting its own connection to the DB, then open the DB when
the client connects and then close it when the client disconnects.


Gambit
Technical Details
Message-ID: <43399ca4$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4337dfe1$1@newsgroups.borland.com> <4338297e@newsgroups.borland.com> <43396990@newsgroups.borland.com> <43397d3c$3@newsgroups.borland.com> <43399502@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,97b4b095375844bd
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4337dfe1$1@newsgroups.borland.com> <4338297e@newsgroups.borland.com> <43396990@newsgroups.borland.com> <43397d3c$3@newsgroups.borland.com> <43399502@newsgroups.borland.com>
Subject: Re: Simple e-mail server
Date: Tue, 27 Sep 2005 12:26:39 -0700
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <43399ca4$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1127849124 68.69.17.41 (27 Sep 2005 12:25:24 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail