Re: How do I give same value as primary key to other field

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

From: Bob Barrows (reb01501_at_NOyahoo.SPAMcom)
Date: 04/04/04

  • Next message: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"
    Date: Sun, 4 Apr 2004 09:21:26 -0400
    
    

    Bob The ASP Builder wrote:
    > Thank you Bob!
    >
    > That work just perfect with minor syntax fiddling -and I'm actually
    > running below code.
    >
    > I see you use brackets: [Table 1]
    >
    > I dont - is there a reason for why I should? other than possible
    > visual readability of the code ?

    Actually, IMO, it makes the code less readable. I used the brackets because
    I was not sure whether or not your actual table name contained spaces or
    other "illegal" characters that would make the query parser generate an
    error. To prevent the parser from generating an error, I used the brackets,
    which tell the parser to ignore the contents of the brackets.

    Your table isn't really called "Table 1" is it? In your question up above,
    you say the table is called "[Table 1]" (with a space). In your code below,
    you leave out the space.

    Beyond this confusion, I hope that you've given your database and table more
    meaningful names than "Dabase" and "Table1".

    >
    > sSQL = "UPDATE Table1 SET ParID = " & newID & " WHERE ID = " & newID &
    > ""

    Bob Barrows

    -- 
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    

  • Next message: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"

    Relevant Pages

    • Re: NEWBIE NEEDS DIRECTION
      ... > In all fairness, Bob, depending on his learning abilities, he may be ... I realize you are making a joke, but the "fairness" word makes me realize ... that my request for information may have been interpreted as an attack. ... This email account is my spam trap so I ...
      (microsoft.public.inetserver.asp.general)
    • Re: Record Locking
      ... Thanks Bob, ... >> I've tried different cursors / locktypes when opening the recordset ... This email account is my spam trap so I ...
      (microsoft.public.inetserver.asp.db)
    • Re: ADODB.Field error 800a0bb9 - Working with SQL Server ntext fields
      ... I am trying to import an ntext column ... >>> from one SQL Server table to another. ... > Not to detract from what Bob said but there's ... This email account is my spam trap so I ...
      (microsoft.public.inetserver.asp.db)
    • Re: ASP, Access and time problem
      ... > Hi again Bob. ... >> Terry Murray wrote: ... This email account is my spam trap so I ...
      (microsoft.public.inetserver.asp.db)
    • Re: What am I doing wrong?
      ... Martin Walke wrote: ... > homework, perhaps I shouldn't have given the complete code. ... > You're right Bob. ... This email account is my spam trap so I ...
      (microsoft.public.scripting.jscript)