Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: GetChunk vs. Field.Value


Message #1 by "Chris" <chris@h...> on Tue, 27 Mar 2001 19:29:26
   I'm accessing text/ntext fields of various sizes from a SQL 2000 

database, and I'm confused as to the best way to handle the data.  My 

first thought was to use essentially use GetChunk and a Do...While loop to 

sweep through the data, however, I stumbled across this comment on 

Microsoft's FAQ for ASP 

(http://support.microsoft.com/Support/ActiveServer/faq/data/adofaq.asp#Usin

GetC):



"ANSWER: You should try to avoid using GetChunk on a Forward-Only cursor 

(which is what happens when you call Execute and pass only your SQL query 

statement). If you must use chunks, then open the recordset as a Keyset or 

Static cursor. If you need to get the "complete field" then you should use 

Field.Value instead of GetChunk."



  This has me confused.  It seems that Field.Value would be rather 

inefficient compared to reading and writing the data in smaller pieces.  

Does the last line in the quote refer to Forward-Only cursors?  Have newer 

libraries and whatnot eliminated the use of GetChunk?  Thanks for your 

help.





-Chris



Message #2 by "Ken Schaefer" <ken@a...> on Wed, 28 Mar 2001 22:54:53 +1000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:    I'm accessing text/ntext fields of various sizes from a SQL 2000

: database, and I'm confused as to the best way to handle the data.  My

: first thought was to use essentially use GetChunk and a Do...While loop to

: sweep through the data, however, I stumbled across this comment on

: Microsoft's FAQ for ASP

:

(http://support.microsoft.com/Support/ActiveServer/faq/data/adofaq.asp#Usin

: GetC):



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



I think that page is rather dated...looking at comments like:



<quote>

QUESTION: I installed ADO previously when I installed the OLE DB SDK 1.0

last August. The ADO that is delivered in Active Server Pages is different

and my previous ADO code does not run. Why?



ANSWER: ADO was shipped as a preview technology in the OLE DB SDK. There

will be a 1.1 upgrade to the OLE DB SDK in the December/January timeframe.

</quote>



I'd have a look at:

http://support.microsoft.com/support/kb/articles/Q200/1/24.ASP

However that article also has an old date (1999) and probably refers to

older MDACs no longer in use...though the principle explained in the link

(Q175239) seems to make sense.



Cheers

Ken




  Return to Index