Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 184
Product JTurbo
Category Supported Features
Question Can JTurbo be used to send DBCC commands to SQL Server ?
Answer Yes, if you are using JTurbo 3.0.2 or greater.
With DBCC commands that return a result set or update count, they should work just like any other SQL statement.
With DBCC commands that return a message, the following code can be used to retrieve the message:

	Statement stmt = connection.createStatement();
	stmt.executeUpdate( "DBCC SHOWCONTIG" );

	SQLWarning warning = stmt.getWarnings();
	while ( warning != null )
		System.out.println( warning.getMessage() );
		warning = warning.getNextWarning();

Note, that this code won't work with JTurbo 3.0.1 due to bug #586 (which was fixed in JTurbo 3.0.2)

company media information terms of use privacy policy contact us