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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access SQL Comments 1

Status
Not open for further replies.

AtomicChip

Programmer
May 15, 2001
622
CA
Hey all,

I'm a SQL programmer, just needing to do a couple things in Access - I've been trying to comment stuff by using -- to no avail. How do you comment in Access?

Thanks

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Commenting sql in the query builder? Don't think so, closest is using the description property of the stored query (right click in the database window...) In VBA, a single quote preceding the code line makes it a comment.

Roy-Vidar
 
Bah, that sucks. Next question - If I'm building a string command in, say an asp.net application, is there a way of executing multiple commands in a single string instead of creating two seperate command objects?

Something like (my syntax may be way out):
UPDATE table SET column='asd' WHERE id=2; UPDATE table2 SET column='asd' WHERE id=2;

Is the ";" a legal command delimeter, or is there another one used in Access?

Thanks again,

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
I can't quarantee this answer, but I've never seen it performed with Access, and on a little test now, I get "Invalid characters after the end of SQL statement" -> meaning it doesn't particularly fancy characters after the ";". I suspect you need a database server of some kind for that, not Access, so I think you'll need to perform it separately. Wouldn't it be possible to re-use the command object?

Perhaps visit the asp.net forum (forum855) for the most effective way?

Roy-Vidar
 
Yeah, I was just wondering if it was possible to do it with one database hit instead of two... Access is slow enough as it is. Thanks for your help though :)

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top