Installing stored procedures

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lance

    Installing stored procedures

    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
  • Peter Rilling

    #2
    Re: Installing stored procedures

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

    "Lance" <lance@cuserv.c om> wrote in message
    news:4fafabc0.0 310161244.5fc66 f78@posting.goo gle.com...[color=blue]
    > 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[/color]


    Comment

    Working...