Click here to Skip to main content
15,887,428 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL help...actually mySQL sorry Pin
Jason Henderson18-Nov-02 5:52
Jason Henderson18-Nov-02 5:52 
Questionwhat kind of DB uses .idx and .dat files Pin
Robert Smit14-Nov-02 23:32
Robert Smit14-Nov-02 23:32 
AnswerRe: what kind of DB uses .idx and .dat files Pin
Michael P Butler14-Nov-02 23:45
Michael P Butler14-Nov-02 23:45 
GeneralRe: what kind of DB uses .idx and .dat files Pin
Robert Smit15-Nov-02 0:48
Robert Smit15-Nov-02 0:48 
GeneralRe: what kind of DB uses .idx and .dat files Pin
Michael P Butler15-Nov-02 1:07
Michael P Butler15-Nov-02 1:07 
QuestionBest way to protect MDB file? Pin
LukeV13-Nov-02 9:59
LukeV13-Nov-02 9:59 
AnswerRe: Best way to protect MDB file? Pin
Vasudevan Deepak Kumar17-Nov-02 23:44
Vasudevan Deepak Kumar17-Nov-02 23:44 
QuestionADO Memory usage - leak? Pin
Gizz13-Nov-02 5:43
Gizz13-Nov-02 5:43 
Hi.

I've got a basic ADO AddNew call, running in a loop, against Access 2002. Running on VC++6, Win2K, MDAC 6 sp2. See code below.

It seems to use memory constantly, even when the recordset object is released. It uses approx 10MB per 100,000 rows written. My system needs to be on line and writing data for a week at a time so this is going to be a problem for me. Any ideas?

Ta.
Gizz.

The following function is called from another big loop...

void fn()
{
using namespace ADODB;

_RecordsetPtr pRst = NULL;
_ConnectionPtr pConnection = NULL;

_bstr_t strCnn("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\data.MDB");

try
{
TESTHR(pConnection.CreateInstance(__uuidof(Connection)));
pConnection->Open(strCnn,"","",adConnectUnspecified);

TESTHR(pRst.CreateInstance(__uuidof(Recordset)));

pRst->Open("tblMyTable",_variant_t((IDispatch *) pConnection, true),
adOpenKeyset,adLockOptimistic,adCmdTable);

_variant_t strGBID("GBID");
_variant_t strTSID("TimestampID");

static long i = 0;
static long imax = 1000;
for (;i < imax; i++)
{
pRst->AddNew();

{_variant_t vtFld;
vtFld.vt = VT_I4;
vtFld.lVal = i;
pRst->Fields->GetItem(strGBID)->Value = vtFld;}

{_variant_t vtFld;
vtFld.vt = VT_I4;
vtFld.lVal = i+1;
pRst->Fields->GetItem(strTSID)->Value = vtFld;}

pRst->Update();
}

imax += 1000;
pRst->Close();
pConnection->Close();
pConnection.Release();
pRst.Release();
}
catch(_com_error &)
{}
}
AnswerRe: ADO Memory usage - leak? Pin
Mazdak14-Nov-02 5:47
Mazdak14-Nov-02 5:47 
GeneralTerminal Services Web Connection via ado(using c++) Pin
BP potato12-Nov-02 16:44
sussBP potato12-Nov-02 16:44 
GeneralDecimal precision Creating Table Pin
Anonymous12-Nov-02 8:19
Anonymous12-Nov-02 8:19 
GeneralRe: Decimal precision Creating Table Pin
Mazdak12-Nov-02 18:56
Mazdak12-Nov-02 18:56 
GeneralRe: Decimal precision Creating Table Pin
Anonymous13-Nov-02 5:40
Anonymous13-Nov-02 5:40 
GeneralRe: Decimal precision Creating Table Pin
Mazdak13-Nov-02 8:07
Mazdak13-Nov-02 8:07 
GeneralRe: Decimal precision Creating Table Pin
José Luis Sogorb14-Nov-02 5:03
José Luis Sogorb14-Nov-02 5:03 
GeneralRe: Decimal precision Creating Table Pin
Mazdak14-Nov-02 5:08
Mazdak14-Nov-02 5:08 
Generalproblem saving binary data into a file Pin
trozner12-Nov-02 6:16
trozner12-Nov-02 6:16 
QuestionYukon (SQL Server 2003) Questions? Pin
Larry Maccherone12-Nov-02 5:50
Larry Maccherone12-Nov-02 5:50 
GeneralHelp with ADO namespace error Pin
Paul Silvernail12-Nov-02 5:22
Paul Silvernail12-Nov-02 5:22 
GeneralRe: Help with ADO namespace error Pin
Mazdak12-Nov-02 5:31
Mazdak12-Nov-02 5:31 
GeneralRe: Help with ADO namespace error Pin
Paul Silvernail12-Nov-02 7:12
Paul Silvernail12-Nov-02 7:12 
GeneralDataSets or Direct Manipulation Pin
Sijin12-Nov-02 1:55
Sijin12-Nov-02 1:55 
GeneralRe: DataSets or Direct Manipulation Pin
Rob Graham18-Nov-02 10:58
Rob Graham18-Nov-02 10:58 
GeneralRe: DataSets or Direct Manipulation Pin
Sijin18-Nov-02 13:59
Sijin18-Nov-02 13:59 
GeneralRe: DataSets or Direct Manipulation Pin
Rob Graham18-Nov-02 17:14
Rob Graham18-Nov-02 17:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.