December 13, 2004 at 9:50 am
We are working on some SQL Server utility software. The software uses the SQL-DMO library to interact with a SQL Server instance. We are having trouble handling information messages from the server.
We have stored procedures that produce output with PRINT statements. The output may be less than 1K or it may be several megabytes. The stored procedures work fine through Query Analyzer. The output is presented intact under the Messages tab. The same stored procedures do not always produce the same results when we execute them through SQL-DMO in our application. If the output is a small volume (less than roughly 60K), then things seem to be in order. If the output is a larger volume, then the results are less predictable. Sometimes the results are simply truncated at a certain point. This seems to happen with a modest volume. Sometimes the first part of the output seems correct while the rest is garbled. In those cases, it appears that the vast majority of lines are missing (after the first part) and the lines that are returned seem to be in a randomly interleaved order (after the first part). We get the same results whether we accept the string through the ExecuteWithResultsAndMessages method or build the string by handling the ServerMessage event. It happens with both VB6 and VB.NET applications.
We would like to know what Query Analyzer is doing to successfully receive the server messages, or what we might be missing in order to accomplish the same thing.
December 16, 2004 at 8:00 am
This was removed by the editor as SPAM
December 20, 2004 at 6:08 pm
Havent touched Vb for years but my best bet would be that your problem would be in the interaction between the parameters of the ole db provider and possibly event handlin gin your app. Once the data returned gets over a certain size the ole db provider will send it in chunks to the client app i.e. the transmit mechanism is different. It may be that the context in which you are trying to display the data cannot be determined. Try writing the data through select statements rather than with print statements .... might help
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply