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!

Auto code generator to call stored proc's - help

Status
Not open for further replies.

baden

Programmer
Feb 6, 2002
125
US
Regarding:
This is a stored procedure that takes the in the name of another stored procedure, and generateds the code to call it.

Whenever I use it, nothing happens, all I get is:
Query OK, -1 rows affected (0.31 sec)
Return Code: 0

It doesn't even return any error msgs if I use an invalid stored proc. name.

Can someone assist me with this please?
 
Have you run this SP in Query Analyzer? The way it's constructed, all it does is return the generated code in a series of PRINT statements. You have to cut and paste the code from the QA results pane into your application.

Also, the SP must be in the same database as the object you're inspecting.

HTH,

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Eschewing obfuscation diurnally.
 

Ah, my mistake, I wasn't using Query Analyzer.

Well, I'm happy to say that we just had a few thousand lines of code generated for our DAL using CodeSmith and that stored procedure.

I've created a tutorial named "C#.Net - Simplifying CRUD - Data Access Layer (DAL)" that should be validated in the FAQ section shortly.

 
Just for the heck of it...

if you want dotnet code for a sql stored proc (vb dot net)

check out



I wrote it a couple of years ago and has saved me hours of coding.

For what it is worth.. :)

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top