473,327 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

c++ ole DB stack overflow during sql server compilation

hi,
when i execute :
CCommand<CManualAccessor, CBulkRowset, CNoMultipleResults> rs;
rs.SetRows(100);
HRESULT code_resultat = rs.Open(session, requete, &propset, NULL,
DBGUID_DBSQL, FALSE);

with a requete with length = 13000, it works perfectly
but when my requete length is 200000 (example : SELECT * FROM myTABLE
WHERE id_table IN("lot of number : more then 30000 number"))
i have code_resultat = DB_E_ERRORSINCOMMAND (= 0x80040e14)
and when i explore the IErrorInfo message, i have :
minor = 565 and the message is
source :Microsoft OLE DB Provider for SQL Server
serveur has made a stack overflow during compilation...

Is there a solution to extract to data ?
in a fast way ...

thanks in advance ...
Mike
Jul 20 '05 #1
1 2481
[posted and mailed, please reply in news]

michael (mm*****@caramail.com) writes:
when i execute :
CCommand<CManualAccessor, CBulkRowset, CNoMultipleResults> rs;
rs.SetRows(100);
HRESULT code_resultat = rs.Open(session, requete, &propset, NULL,
DBGUID_DBSQL, FALSE);

with a requete with length = 13000, it works perfectly
but when my requete length is 200000 (example : SELECT * FROM myTABLE
WHERE id_table IN("lot of number : more then 30000 number"))
i have code_resultat = DB_E_ERRORSINCOMMAND (= 0x80040e14)
and when i explore the IErrorInfo message, i have :
minor = 565 and the message is
source :Microsoft OLE DB Provider for SQL Server
serveur has made a stack overflow during compilation...


That sounds like there is a bug or limitation somewhere.

Anyway, SQL Server does not perform well with very long IN clauses.
It could take over 15 seconds just to compile that query.

Take a look at http://www.sommarskog.se/arrays-in-sql.html for alternative
methods to pose the query.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
4
by: Victor | last post by:
Hello, I've got a situation in which the number of (valid) recursive calls I make will cause stack overflow. I can use getrlimit (and setrlimit) to test (and set) my current stack size. ...
20
by: Sushil | last post by:
Hi gurus I was reading FAQ "alloca cannot be written portably, and is difficult to implement on machines without a conventional stack." I understand that the standard does not mandate...
1
by: Harvey | last post by:
Hello: I would appreciate if anyone could tell me why the following occurred in my WinForms app. I am using a User control and everything was running ok until I defined the following property:...
5
by: sunny | last post by:
Hi All Is there any way to determine stack and heap size, during runtime. i.e can we predict stack overflow. etc
5
by: samuraign | last post by:
Hi, My C-code is working properly in Cygwin. But when I run the same code in VC++ or LCC, I use to get stack overflow exception during run time. It is not entring into my function from testbench....
6
by: rhle.freak | last post by:
This is a very simple implementation of push and pop functions of a stack.ive compiled it on msvc++ on windows platform and it wrks fine. ive used 'int' as the data for the push operations,however...
4
by: asit | last post by:
we kno during call of a subroutine, the address of next instruction( from which the execution is supposed to start after the subroutine is executed ) is stored in stack. in case of recursion (e.g....
87
by: CJ | last post by:
Hello: We know that C programs are often vulnerable to buffer overflows which overwrite the stack. But my question is: Why does C insist on storing local variables on the stack in the first...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.