Re: Creating a SQL Procedure from text file



Terrance wrote:
I have a question and I'm not quite sure if this can be done or not.
Does any have any idea(s) on how to create a SQL stored procedure
from a text file using C#.

There was no way for you to know it (except maybe by browsing through
some of the previous questions in this newsgroup before posting yours -
always a recommended practice) , but this is a classic ADO newsgroup.
ADO.Net bears very little resemblance to classic ADO so, while you may
be lucky enough to find a dotnet-knowledgeable person here who can
answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.adonet.


You see a developer has given me a text
file that creates some stored procedures for a database. I am in the
process of creating a app that will create the database along with
the stored procedures.

I don't want to rewrite what the developer wrote I just want to be
able to read the file content and run it to create the stored
procedures. Will using SQLDMO help?

Just read the text into a variable, parse it to remove all GO
statements, and run it via a SQLCommand object ...

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages