Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent & Child
Message
From
08/08/2002 11:13:27
 
 
To
08/08/2002 10:57:33
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00686093
Message ID:
00687545
Views:
31
We just wrote a little VFP prg that can take a table from SQL, get all the column names, and generate all the T-SQL commands to the clipboard which you can then paste into Query Analyzer, tweak where necessary and then run in Query Analyzer to create the SP. (We then save all the generated SPs into .sql files, so we can automate the process of recreating the SPs when we need to). If you make a few assumptions about naming conventions (such as having your PKs named the same as your table ... so the PK for Customer would be CustomerKey) ... then all the basic SPs (select/delete/update) need no tweaking at all. IN fact, we skip the "pasting them into Query Analyzer" step and have the VFP .prg just save them to a .sql file and run them against the database directly from VFP to create the SPs (using SQLDMO). The tweaking in Query Analyzer is only necessary for the custom SPs, that do more.

Food for thought ...

~~Bonnie


>>>If you've read some of my other posts, you may remember me mentioning that we automate a lot of our stuff (using VFP) and generating SPs is just one more thing that we automate, so creating parameters for every column is no big deal.
>
>
>I'm sorry I don't understand. What do you mean by generating SP's. I have written to SQL 6.5 and I wrote (by hand) all my SP's. Could you please explain.
>
>TIA
>John
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform