Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help to understand this code

Status
Not open for further replies.

Trekk

Programmer
Aug 16, 2001
66
US
Hi I am new to SQL programming and I am trying to learn the language. Someone gave me some code to use that had to be modified but I need to understand what the code is doing could someone break it down for me.

What does the '" stand for and why all the brackets

strSQL = AddWhere(strSQL, "[CareCoordinators]='" & session("UserID") & "'")

Thank you for any help
 




hi,

"What does the '" stand for and why all the brackets"
Code:
strSQL = AddWhere(strSQL, "[CareCoordinators]='" & session("UserID") & "'")
Brackets [] delimit field & table names.

When a criteria value is a string, the string is delimited with single quotes ''

So the AddWhere function is appending to strSQL the string
Code:
"[CareCoordinators]='" & session("UserID") & "'"
so the string might look something like this...
[tt]
[CareCoordinators]='SkipVought'
[/tt]


Skip,
[sub]
[glasses] When a wee mystic is on the loose..
It's a Small Medium at Large! [tongue][/sub]
 
Skip

Thank you so much for explaining this, it makes sense now, all these programming books forget the small stuff like this

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top