Re: Stack Overflow on Insert
"James Brophy (CharcolOnline)" <[email protected]> Thu, 23 May 2002 16:08:21 +0100
| Newsgroups | gmane.comp.windows.devel.oledb.devel |
|---|---|
| Message-ID | <0C2B60E78DA5D311B20800508B61B6C0013D7C4B@JC_LINT> |
Is there any possibility of a recursive loop going on? -----Original Message----- From: Jeff Nygren [mailto:[email protected]] Sent: 23 05 2002 15:50 To: [email protected] Subject: [OLEDB_DEV] Stack Overflow on Insert I sent this to the list yesterday, but it looks like it bounced. If you have already seen this message, please ignore this copy. Jeff Nygren ----- Forwarded by Jeff Nygren/US/DataCard on 05/23/02 09:48 AM ----- I have some code that adds records to a MS Access database. If I try to add too many records, I get a stack overflow. I'm guessing there is something more I need to do, but I don't know what it is. My code is basically: CDataSource_Object.OpenFromInitializationString(sInitString); CSession_Object.Open(CDataSource_Object); CCommand<CManualAccessor> CCommand_Object; CCommand_Object.CreateAccessor(nCols, &pBuffer, nBufferSize); for (... nCols ...) CCommand_Object.AddBindEntry(col, type, size, ptr); CCommand_Object.Open(CSession_Object, sQuery, &Updatability_PropSet); for (... nRows ...) { LoadAccessorBuffers(); CCommand_Object.Insert(); } CSession_Object.Close(); CDataSource_Object.Close(); The program runs correctly as long as I don't reach the point of overflowing the stack. The number of rows I can insert depends on size and number of columns and on stack size. Is there some kind of 'flush' I need to add after the Insert()? If my pseudo-code is to cryptic to understand, I have a sample project I could send. Any help you can offer will be greatly appreciated. I am an experienced programmer, but a database novice. Thanks. Jeff Nygren