Re: Returning Null value instead of contents of field

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Royboy (Royboy_at_discussions.microsoft.com)
Date: 02/24/05


Date: Thu, 24 Feb 2005 15:23:04 -0800

Steve,

Thanks for all the references. I have found Bill's original brown book to be
very useful. I like his style. We have a large legacy VB6 program which is
still being enhanced with user requests. There is still debate over whether
we move to .Net or replace it with a J2EE web based app. So I have not looked
at his latest offering.

Our current user request is to allow data to be stored in SQL server as well
as DB2. The code with Forward only cursor works fine with a DB2 varchar
field.

Regards,

Roy

"Stephen Howe" wrote:

> > If I am correct in my understanding of the situation.
> >
> > When I use a Forward only cursor in SQL Server I can only read the
> contents
> > of the a nText field once.
> >
> > Does this mean that I should copy the contents of the nText field into a
> > local variable before I use it or change my cursor?
>
> Very likely. I have never tested this (but I will do so sometime). The
> ForwardOnly cursor is very, very very limited in what functionality it
> provides you. It is the price you pay for its speed. I like it. I use
> ForwardOnly cursors to build small lookup-tables in memory using binary
> search.
>
> > Is there a best practice article I can read to explain how I should be
> doing
> > this?
>
> No <groan> unfortunately. I wish there was.
> I draw my knowledge from a variety of sources:
>
> 1. Bill Vaugns books and articles. It is the closest you will get to "Best
> Practice".
> I liked the original brown-covered "ADO Examples and Best Practices" which I
> have.
> I also have the purple-covered successor which covers ADO.NET in the 2nd
> half.
> See
> http://www.betav.com/Files/Books/books.htm
> See Articles
> http://www.betav.com/articles.htm
> See also
> http://www.windowsitpro.com/SQLServer/Article/ArticleID/16272/16272.html
> ADO Performance "Best Practices"
> http://www.betav.com/Files/Content/Whitepapers/ADO%20Performance.htm
>
> 2. Microsofts MSDN site on ADO. I have noticed that Microsoft over the years
> have, very quietly updated the documentation. So it pays to go and relook on
> various ADO methods, properties, events just to see if Microsoft have added
> any extra info on it that might make a difference to your code.
> See
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/dasdkadooverview.asp
> and click on the links at the bottom
>
> 3. There is the MDAC document on improving ADO performance by Suresh Kannan.
> Very good. A little dated by now (nothing about ADO's Record object for
> singleton SELECTs) but still very relevant. See
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html
> /improvperf.asp
> I also pay attention to dynamic properties that only exist once object is
> opened etc.
>
> You can also read up on various providers in OLE DB documentation but it is
> hard work and can be unrewarding. It is very esoteric and you maybe asking
> yourself, "when would I ever use such a property or change the default?".
>
> 4. Carl Prothmans ADO & ADOX FAQ site is worth reading.
> See
> http://www.able-consulting.com/ADO_Faq.htm
> http://www.able-consulting.com/ADOX_Faq.htm
>
> 5. If you use VC++, the temporary headers and inlines generated by #import
> are worth looking at . I have sometimes compared different versions produced
> by using different MDACs to try and work out what Microsoft have "improved
> in ADO" that is not mentioned.
>
> Stephen Howe
>
>
>



Relevant Pages

  • Re: Returning Null value instead of contents of field
    ... > When I use a Forward only cursor in SQL Server I can only read the ... I liked the original brown-covered "ADO Examples and Best Practices" which I ... I have noticed that Microsoft over the years ... You can also read up on various providers in OLE DB documentation but it is ...
    (microsoft.public.data.ado)
  • Re: Recommended data access model
    ... This is from MDAC 2.8 SDK. ... "The Role of ADO in MDAC ... The Microsoft Data Access Components provide data access that is ... easy-to-use interface to OLE DB. ...
    (comp.databases.ms-access)
  • Re: ADO connection Open failure
    ... Jet database, the user must have read/write permission to the folder where ... the user has read/write permission to the shared drive. ... That is, either use ADO, or use DAO, not both. ... Microsoft Office 11.0 Object Library ...
    (microsoft.public.excel.programming)
  • Re: ADO error code 800a0c93
    ... Yes, it works now, without ADO Record Binding. ... Well the problem is in your RecordBinding code. ... It is this that Microsoft has never adequately documented. ... newsgroups with more experienced programmers and read their responses (in ...
    (microsoft.public.data.ado)
  • Re: SelectMethod=cursor and SelectMethod=direct
    ... Produced By Microsoft MimeOLE V6.00.2900.2180 ... After processing a resultset the prepared statement is ... | concern is the memory usage as a direct cursor reads the complete ... |>> Frank Brouwer ...
    (microsoft.public.sqlserver.jdbcdriver)