Sql Help!!

Milan

Registered User.
Local time
Today, 21:23
Joined
Feb 17, 2002
Messages
85
How can i use the code created in a query (sql view) into a sub procedure. I know you can cut and paste it , but it needs to be altered?. Would appreciate your help!

Thanks

Milan
 
Post what you've got and how it needs to be altered.
 
Hi Milan. I'm glad to see someone else is making the transition from queries to ADO (I assume that's what you're doing). I started getting away from queries and coding my SQL in modules about a month ago (I was sick of having dozens or even hundreds of objects in my db, each of which only performed one task), and there is really no comparison. Anyway, as far as the syntax, it's pretty much the same, you just have to make sure that you use double quotes and where the SQL code in the query window wraps, you end that line with
Code:
& _
So:
Code:
SELECT * FROM Some_Table Where Some_Condition_Is_True
would be
Code:
"SELECT * FROM Some_Table Where " & _
"Some_Condition_Is_True"
As for how to properly use ADO, just search the forums, there are probably 1000's of examples.
 
Thanks for that advice !. It has cleared things up. So i will now use Quotes when i paste. One more question if i may trouble you!. Well i am quite interested in the way access makes the sql part of the code for you when you create a query in design view, then view it in sql view. I want to begin to learn how this is done , and can i write my own sql code?. Any tips , or am i in fantasy land?.

Thanks For Your Help!
 
Hey! Thanks for that site . Real useful!!!
Will hopefully get better at sql!!

Thanks
 

Users who are viewing this thread

Back
Top Bottom