Showing posts with label advance. Show all posts
Showing posts with label advance. Show all posts

Tuesday, March 27, 2012

delete all tables

Hi folk,

whats the SQL syntax of deleting all user tables of a specific database on a Microsoft SQL server?

thanks in advance,

mulata

use yourTable;
go
EXEC sp_MSforeachtable @.command1 = "DROP TABLE ?"

--"sp_MSforeachtable" is one of the undocumented SQL Server system stored procedures.

|||

hm sorry I don"t understand your solution.

Is there a way that you do that in a "one line SQL statement" ,

something like: "drop table (select * from usertables) "

thanks

|||I agree with limon's solution, which is really straight and easy to use. It will go through each user table in current database and perform same action on each of them.?Since?DROP TABLE command can only be followed bytablename, I don't think you can drop all tables within one single statement except using such stored procedure.

Friday, February 24, 2012

Default values for IReportViewerMessages

Hi,

Can any one point to the default values for IReportViewerMessages implementation?

Thanks in Advance

If you don't specify a custom message for your IReportViewerMesages then the default messages are set. For more on this lookup:

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportviewermessages(VS.80).aspx

............................................................................

Remember to "Mark as Answer" on the post that helped you