Click here to Skip to main content
15,885,244 members
Home / Discussions / Database
   

Database

 
GeneralRe: Unicode help!!! Pin
Atul Thakor13-Jun-05 22:57
sussAtul Thakor13-Jun-05 22:57 
GeneralADO Recordset open problem in Windows 98 Pin
rajas11-Jun-05 7:11
rajas11-Jun-05 7:11 
GeneralSql Index/key Pin
webhay10-Jun-05 23:18
webhay10-Jun-05 23:18 
GeneralRe: Sql Index/key Pin
Atul Thakor13-Jun-05 22:58
sussAtul Thakor13-Jun-05 22:58 
GeneralSQL Messages. Pin
HahnTech10-Jun-05 12:28
HahnTech10-Jun-05 12:28 
GeneralRe: SQL Messages. Pin
Scott Serl11-Jun-05 15:47
Scott Serl11-Jun-05 15:47 
GeneralRe: SQL Messages. Pin
HahnTech13-Jun-05 8:11
HahnTech13-Jun-05 8:11 
GeneralRe: SQL Messages. Pin
Scott Serl13-Jun-05 14:03
Scott Serl13-Jun-05 14:03 
If you want to see messages generated by 'PRINT', you have to trap the InfoMessage event of the connection object.
If you want to see the rows affected by a query, and the query is run using ExecuteNonQuery, then the return value is the number of rows affected.
You can also return any info you want from your stored procedures as output parameters, which you can read after running the query.

When running a stored procedure from query analyzer, messages con come from several sources:
1. Query analyzer can generate a friendlier message from info it receives (such as the 17 rows affected messages). You catch this in code using the return value of 'ExecuteNonQuery'.
2. The stored procedure can use the 'PRINT' statement, which causes query analyzer to display some info. You catch this in code in the IfoMessage event of the connection.
3. The stored procedure uses RAISEERROR. In code, if the severity level in RAISEERROR is less than 11, the the message can be caught in the InfoMessage event of the connection. If the severity level is greater than 10, I think it shows up as an exception, which you can catch in a try block.

So, you can collect any messages from dbcc by attching code to the InfoMessage event of the connection, and looking at the messages you collected after running the query.
GeneralRe: SQL Messages. Pin
HahnTech14-Jun-05 3:54
HahnTech14-Jun-05 3:54 
GeneralRe: SQL Messages. Pin
Scott Serl14-Jun-05 10:00
Scott Serl14-Jun-05 10:00 
GeneralRe: SQL Messages. Pin
HahnTech13-Jun-05 12:03
HahnTech13-Jun-05 12:03 
GeneralStop SQL Pin
HahnTech10-Jun-05 12:22
HahnTech10-Jun-05 12:22 
GeneralRe: Stop SQL Pin
Colin Angus Mackay10-Jun-05 22:28
Colin Angus Mackay10-Jun-05 22:28 
GeneralRe: Stop SQL Pin
HahnTech11-Jun-05 12:21
HahnTech11-Jun-05 12:21 
GeneralRe: Stop SQL Pin
Atul Thakor13-Jun-05 23:01
sussAtul Thakor13-Jun-05 23:01 
GeneralConnecting mySQL to Dreamweaver Pin
crazypilot310-Jun-05 12:04
crazypilot310-Jun-05 12:04 
QuestionNHibernate - proper DELETE/UPDATE? Pin
devvvy9-Jun-05 18:00
devvvy9-Jun-05 18:00 
QuestionNHibernate Query Analyzer? Any Tutorial? Pin
devvvy9-Jun-05 17:22
devvvy9-Jun-05 17:22 
Generalremove space in data/string Pin
GoldenStar9-Jun-05 16:55
GoldenStar9-Jun-05 16:55 
GeneralRe: remove space in data/string Pin
Christian Graus9-Jun-05 17:16
protectorChristian Graus9-Jun-05 17:16 
Generalread field description and display on webpage Pin
wpiass9-Jun-05 7:45
wpiass9-Jun-05 7:45 
GeneralError when export data from SQL to Ms Excel Pin
Mekong River9-Jun-05 3:59
Mekong River9-Jun-05 3:59 
GeneralRe: Error when export data from SQL to Ms Excel Pin
Lasse11-Jun-05 12:23
Lasse11-Jun-05 12:23 
GeneralConnecting to pastel using VB6.0 Pin
Member 20223418-Jun-05 23:17
Member 20223418-Jun-05 23:17 
GeneralRe: Connecting to pastel using VB6.0 Pin
toxcct9-Jun-05 5:43
toxcct9-Jun-05 5:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.