Click here to Skip to main content
15,896,545 members
Home / Discussions / Database
   

Database

 
GeneralSQL Server OLEDB Provider and Narrow Characters Pin
Jörgen Sigvardsson20-Nov-02 22:57
Jörgen Sigvardsson20-Nov-02 22:57 
GeneralSQL Server Syntax for a CROSSTAB QUERY from MSAccess Pin
acosmin19-Nov-02 22:42
acosmin19-Nov-02 22:42 
GeneralRe: SQL Server Syntax for a CROSSTAB QUERY from MSAccess Pin
Nick Parker20-Nov-02 8:30
protectorNick Parker20-Nov-02 8:30 
GeneralSQL Server Syntax for a CROSSTAB QUERY in MSAccess Pin
acosmin19-Nov-02 22:39
acosmin19-Nov-02 22:39 
GeneralUser / system objects Pin
leppie19-Nov-02 12:22
leppie19-Nov-02 12:22 
QuestionCreate table and choosing a datetime format ? Pin
Bart-Man19-Nov-02 9:05
Bart-Man19-Nov-02 9:05 
AnswerSolution to my problem Pin
Bart-Man19-Nov-02 10:34
Bart-Man19-Nov-02 10:34 
GeneralMove data from SQL Srever to Access Pin
Ravish18-Nov-02 23:28
Ravish18-Nov-02 23:28 
GeneralRe: Move data from SQL Srever to Access Pin
Michael P Butler18-Nov-02 23:38
Michael P Butler18-Nov-02 23:38 
GeneralRe: Move data from SQL Srever to Access Pin
Paul Watson19-Nov-02 10:57
sitebuilderPaul Watson19-Nov-02 10:57 
GeneralSQL help...actually mySQL sorry Pin
Hockey17-Nov-02 19:52
Hockey17-Nov-02 19:52 
GeneralRe: SQL help...actually mySQL sorry Pin
Mazdak17-Nov-02 20:12
Mazdak17-Nov-02 20:12 
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 

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.