Installing stored procedures

  • Thread starter Thread starter Lance
  • Start date Start date
L

Lance

During our install process, we want to read the stored procedure from
a text file and execute it as a string using a SqlCommand object. The
process throws an error in system.data.dll saying that there is no
data in the object.
This seems to be because the first line is a comment (--ProcName)

Does anyone know how to execute a SQL command with embedded comments
and \r\n?

Thanks
 
I have not actually done this, but make sure that your Command object is set
as Text, not Stored Procedure or anything else.
 
Back
Top