Re: How do I give same value as primary key to other field
From: Bob Barrows (reb01501_at_NOyahoo.SPAMcom)
Date: 04/04/04
- Previous message: Ken Fine: "Apologies, disregard Re: Adjusting string handling function for exceptions?"
- In reply to: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"
- Next in thread: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"
- Reply: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"
- Messages sorted by: [ date ] [ thread ]
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"
- Previous message: Ken Fine: "Apologies, disregard Re: Adjusting string handling function for exceptions?"
- In reply to: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"
- Next in thread: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"
- Reply: Bob The ASP Builder: "Re: How do I give same value as primary key to other field"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|