Hi,
I want to call a stored proc. on SQL 2000 from VC 6.0. This stored proc
can return 1-4 rows. After extensive reading and overwhelming myself with
help files from MSDN 6.0, MDAC 2.8, SQL 2000 and hte platform SDK, I want
to optimize my software performance. I want to do only one round trip to
the server which will include a request to the server and its response
should be all 4 rows of data as a block.
some help files say for read-only-Fast-forward cursors wit ha small result
set, client mode with auto-fetch option is the best way. other help files
say odbc client mode library cursors are slower and way more memory
intensive than native SQL server libraries so caution should be used. what
should i do?
currently i use:
SQLSetConnectAttr(*hdbc, SQL_ATTR_ODBC_CURSORS, (SQLPOINTER)
SQL_CUR_USE_ODBC,0); ////odbc test
SQLDriverConnect(...)
SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_BIND_TYPE, (PTR)sizeof(SQLARRAY), 0);
SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (PTR) 4, 0);
SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_STATUS_PTR, (SQLPOINTER)RowStatusArray,
0);
SQLSetStmtAttr(hstmt, SQL_ATTR_ROWS_FETCHED_PTR, &NumRowsFetched, 0);
is this optimized?
LeonLeon McCalla wrote:
> Hi,
> I want to call a stored proc. on SQL 2000 from VC 6.0. This stored proc
> can return 1-4 rows. After extensive reading and overwhelming myself with
> help files from MSDN 6.0, MDAC 2.8, SQL 2000 and hte platform SDK, I want
> to optimize my software performance. I want to do only one round trip to
> the server which will include a request to the server and its response
> should be all 4 rows of data as a block.
Why? What do you have that is so time critical?
Aaron|||I'm working on a calling card application. millions of callingcards are
already on the street and sometimes i get 10-20 requests per second.
PS i already solver the problem.
Leon
"Aaron Lawrence" <aaronlNOT@.HEREintegration.co.nz> wrote in message
news:eu5N0MZ$GHA.3836@.TK2MSFTNGP02.phx.gbl...
> Leon McCalla wrote:
proc[vbcol=seagreen]
with[vbcol=seagreen]
want[vbcol=seagreen]
to[vbcol=seagreen]
> Why? What do you have that is so time critical?
> Aaron
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment