Link to home
Start Free TrialLog in
Avatar of pureauto
pureautoFlag for United States of America

asked on

MyGeneration questions.

I have been using the MyGeneration's Build inserts from Table template for quite a while and find it extremely handy. I am now trying to expand the template to accomplish some additional tasks. Most I have been able to figure out by looking at other templates and the documentation, but there is one that is giving me trouble. I was wondering if someone could just give me a nudge in the right direction.

The problem is that I dont know how to distinguish SQL functions from SQL procedures in code. I have implemented code to pull the procedures for the selected db, drop each procedure, and recreate it. However, I have noticed that functions get lumped in with stored procedures and I end up with statements like: DROP PROCEDURE <Function Name> which of course cause SQL Server to choke. Is there a property I can look at to help me distinguish between procedures and functions or a way to pull only the procedures and pull the functions separately?

Also, two other lesser questions:
Is it possible to script SQL Server jobs in MyGeneration?
Is it possible to script SQL Server logins & their associated DB users in MyGeneration?
Avatar of pureauto
pureauto
Flag of United States of America image

ASKER

Oh, and one other question.  How can I edit the template source on the "Build Inserts from Table" template to allow SQL Server image types?
Ok, I apologize.  One last question: When grabbing the procedures for scripting, how do I filter out system sprocs?

If anyone can help with ANY of these questions, I would greatly appreciate it.
ASKER CERTIFIED SOLUTION
Avatar of ralmada
ralmada
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think you missed something.  I am using a code generator called "MyGeneration" it is in MyGeneration code that I am trying to do this.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I suppose that would work, but would make the resulting code rather verbose.

I have decided to switch from MyGeneration to CodeSmith for code generation.  MyGeneration seems to be a dead project.
Thanks.