Re: Returning Null value instead of contents of field
From: Royboy (Royboy_at_discussions.microsoft.com)
Date: 02/24/05
- Next message: Anders Eriksson: "Re: Unicode and Microsoft Text Driver"
- Previous message: Scott McBurney: "RE: Unicode and Microsoft Text Driver"
- In reply to: Stephen Howe: "Re: Returning Null value instead of contents of field"
- Messages sorted by: [ date ] [ thread ]
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
>
>
>
- Next message: Anders Eriksson: "Re: Unicode and Microsoft Text Driver"
- Previous message: Scott McBurney: "RE: Unicode and Microsoft Text Driver"
- In reply to: Stephen Howe: "Re: Returning Null value instead of contents of field"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|