SQL-DMO Messages

  • When retrieving messages with an ExecuteWithResultsAndMessages call the line termination characters are sometimes messed up in the message string.  Most lines end with the normal CR/LF combination, but some lines are missing the CR (other lines may be missing the LF).  The same problem may also be affecting the Enterprise Manager code editor because editing code there can cause the symptom in stored procedure script.

    Does anybody have an explanation and/or a solution?

    Thanks.

  • This was removed by the editor as SPAM

  • Hi Newbie,

    I have not used ExecutewithResultandmessages but i have used ExecuteWithResults.

    Dim q

    q = SQLDMO.QueryResults()

    q = dmoServer.databases.item("your database name").ExecuteQueryWithResult("Select count(*) from Table1")

    Dim stra as long

    stra = q.GetColumnLong(1,1)

    Msgbox (str.toString)

     

    what it does is give you the result from query and then you can capture the result from queryresult into your local variables.

    I know it has nothing to do with your question, but just for the reference may be somebody out there need to use ExecuteQueryWithResult().

     

    Abid Malik

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply