Re: ADO Shape and Subqueries

From: Stephen Howe (stephenPOINThoweATtns-globalPOINTcom)
Date: 02/19/05

  • Next message: rgutter_at_bctf.ca: "ADO GetRows array to XML?"
    Date: Sat, 19 Feb 2005 18:23:38 -0000
    
    

    > how would you reference the previous recordset in
    > the second recordset, since you suggest making two recordsets insted of
    > doing this in one.

    I am not suggesting anything at all. I am just pointing out a known fact
    about SQL Server.
    I have no idea if it is a limitaiton of the provider or SQL Server or ADO.
    Consequentially to avoid this you have change the parameters to Recordset
    Open() so that it is not this set of properties.

    I have never used Shapes.

    > My reasoning for neededing a shape clause that includes
    > the same table is because i want to create a hiararchial tree of Employees
    > and there Managers. is this the right direction for me to be researching
    to
    > solve my problem?

    I guess so.
    The problem with this newsgroup is that there are so many variations to
    using ADO:

    Language: VC++, VB, VBScript, JavaScript, Delphi etc
    MDAC version: 2.1, 2.5, 2.6, 2.7, 2.8
    Database: Oracle, Access, SQL Server, Sybase, MDE, etc
    Providers: SQLOLEDB, etc
    Windows: 95,98, ME, NT 4.0, 2000, XP

    including different versions of Language,Database,Providers etc
    it is impossible to be an expert at all combinations.
    I just know the combinations I have used and read up on other combinations.
    Thats all.

    The best that can be done, if you have not used that combination, is to
    provide "hints" if you know that a programmer is going down a dead-end in
    terms of solution. And that is what I do. _BUT_ it is no more than that, a
    hint.

    That means the programmer asking for help here has got to be prepared to do
    their own research, I am not going to do that for them. If they expect to be
    spoon-fed and are not prepared to do their own research, then they should do
    a different job.

    Programmers also have to think laterally. And that means back-tracking.
    They have to ask, "Is the solution I am thinking of for my problem, the best
    one?"
    "Are there alternative solutions that might be better?".
    And if I was doing 1000's of financial transactions I would asking, "Is my
    solution scalable?"

    Frequently I have seen programmers who are trying to implement a solution
    that is very poor. It should have been "obvious" them some time ago, if they
    had done the analysis, it was technically flawed. But they still persist
    trying to flog a dead horse. You would have thought the fact that they have
    hit problem-after-problem would tell them something. Then they ask
    the newgroup, "How do I get this [brain-dead] solution to work?". Usually
    they are stuck in the details of how to get their solution to work?". When
    they do ask for help, they don't mention the big picture, just the tiny tiny
    tiny details that they think is stopping their solution from working.

    Generally, if things flow easily, it is a sign that your solution might be
    good. It is not a conclusive sign but you could say it is a good omen.

    A better thing for that programmer is to back-track up one level, and ask,
    "I am thinking of doing this solution for this class of problem - is this
    the best solution or are their better alternatives? If there are multiple
    better alternatives, under what circumstances would you choose one rather
    than another?"

    Google will help.
    There are also numerous articles and some examples in Microsoft docs on
    MSDN.
    But you do have to read every line of Microsoft documentation I find and
    search related items.
    There are ADO practices on http://www.able-consulting.com/tech.htm
    There are quite a few articles under SQL Server magazine.
    All of Bill Vaughn's material as books or articles is worth reading.

    So I don't go to one place, I go to many and at the end of the day, I
    experiment with ADO to confirm that the documentation is correct (because
    occasionally the documentation is wrong, occasionally there is a bug in
    ADO - you have to use your judgement on this).

    On your Shape Problem, I would keep experimenting, keep Googling, keep
    reading up on Shapes and avoid known proven dead-ends or "gotchas".
    Eventually, you will get there.

    Cheers

    Stephen Howe

    Stephen Howe


  • Next message: rgutter_at_bctf.ca: "ADO GetRows array to XML?"

    Relevant Pages

    • Re: Problem with find method
      ... I am sorry that this is not my original question. ... SQL server when the field property is set to not allow NULL. ... Does anyone know whether this is a bug in ADO? ... >> My recordset does not contain only user name. ...
      (microsoft.public.vb.database.ado)
    • Tempdb Permissions Problems
      ... we're using SQL Server 2000 on Windows Server 2003 and XP Pro. ... an ADO Recordset, the Recordset field for the primary key column will not ... column information for updating or refreshing". ... This must be because ADO ...
      (microsoft.public.sqlserver.programming)
    • Re: Cross Database Join, C++ program set up confusion
      ... Well what kind of data are you returning if it is not in Recordset? ... Recordset is returned (it is fractionally faster as ADO does not waste time ... If the default database is db1 on the ... It is a function of SQL Server. ...
      (microsoft.public.vc.database)
    • Re: Problem with find method
      ... My recordset does not contain only user name. ... I would like to know if this is already a known issue with ADO and can be ... > SELECT fldNames FROM tblName WHERE fldName = 'something' ORDER BY fldName ... >> I am creating an VB application which connect to SQL Server. ...
      (microsoft.public.vb.database.ado)
    • Re: Problem with find method
      ... Dear David ... recordset is beyound bof or eof. ... > SQL server when the field property is set to not allow NULL. ... > Does anyone know whether this is a bug in ADO? ...
      (microsoft.public.vb.database.ado)