List:MySQL ODBC« Previous MessageNext Message »
From:Calistra Research Labs Date:May 9 1999 4:29pm
Subject:Re: client gets complete result-set after SQLExecDirect
View as plain text  
I dont think so - but you can limit the number of rows returned with

select * from mystuff limit 20

to get 20 rows - just in mySQL

----------
> From: Paul Schwarzl <schwarzl@stripped>
> To: myodbc@stripped
> Subject: client gets complete result-set after SQLExecDirect
> Date: Thursday, May 06, 1999 8:22 PM
> 
> Hi there!
> 
> I do an db-application with VB6 which works ok right now.
> I use the odbc-api to connect to mysql.
> Now I wanted to optimise the the connection between my app an mysqld.
> 
> Everything is very fast except the following:
> 
> ----cut-start------
> ;The connect stuff is alredy done, now I want to make a select on the
table
> 
> SQLSetStmtOption(hstmt, SQL_ROWSET_SIZE, 1)
> SQLSetStmtOption(hstmt, SQL_CURSOR_TYPE, SQL_CURSOR_STATIC)
> SQLSetStmtOption(hstmt, SQL_CONCURRENCY, SQL_SCCO_READ_ONLY)
> SQLSetStmtOption(hstmt, SQL_MAX_ROWS, 0)
> SQLExecDirect(hstmt, "select * from bigtable", SQL_NTS)
> 
> ;After this the odbc-driver gets the complete result-set over my slow
> network connection
> ;and that, if the result-set is big, takes a long time.
> 
> 
> 
> Call SQLRowCount(gHstmt, RowCount)
> ;Here the app tells the user how many rows are available
> ;(On some other db-systems I have to do an extra select count(*))
> 
> 
> SQLExtendedFetch(gHstmt, SQL_FETCH_FIRST, 1, 1, 0) <> SQL_NO_DATA_FOUND
> ;Here the app-user fetches as many rows as he wants to see. (maybe only
10,
> maybe 100.000...)
> ----cut-end------
> 
> 
> Are there any options (SQLSetStmtOption) that odbc-SQLExtendedFetch
fetches
> row by row over the network? (Only those the user need)
> 
> (My app does(should) work with some other db's
(oracle,ms-sqlserver,access)
> so I don't wanna use  "limit" in the select statement.)
> 
> thank you
> Paul
> 
> 
> P.S:
> Is it possible that in the last releases of myodbc somthing with
> SQLExecDirect has changend?
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail myodbc-thread202@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail myodbc-unsubscribe@stripped instead.
Thread
client gets complete result-set after SQLExecDirectPaul Schwarzl6 May
  • client gets complete result-set after SQLExecDirectMichael Widenius11 May
Re: client gets complete result-set after SQLExecDirectCalistra Research Labs9 May