Executes the Export of the Schema in the given connection

Namespace:  NHibernate.Tool.hbm2ddl
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
Public Sub Execute ( _
	script As Boolean, _
	export As Boolean, _
	justDrop As Boolean, _
	format As Boolean, _
	connection As IDbConnection, _
	exportOutput As TextWriter _
)
C#
public void Execute(
	bool script,
	bool export,
	bool justDrop,
	bool format,
	IDbConnection connection,
	TextWriter exportOutput
)
Visual C++
public:
void Execute(
	bool script, 
	bool export, 
	bool justDrop, 
	bool format, 
	IDbConnection^ connection, 
	TextWriter^ exportOutput
)
JavaScript
function execute(script, export, justDrop, format, connection, exportOutput);

Parameters

script
Type: System..::.Boolean
trueTruetruetrue (True in Visual Basic) if the ddl should be outputted in the Console.
export
Type: System..::.Boolean
trueTruetruetrue (True in Visual Basic) if the ddl should be executed against the Database.
justDrop
Type: System..::.Boolean
trueTruetruetrue (True in Visual Basic) if only the ddl to drop the Database objects should be executed.
format
Type: System..::.Boolean
trueTruetruetrue (True in Visual Basic) if the ddl should be nicely formatted instead of one statement per line.
connection
Type: System.Data..::.IDbConnection
The connection to use when executing the commands when export is trueTruetruetrue (True in Visual Basic). Must be an opened connection. The method doesn't close the connection.
exportOutput
Type: System.IO..::.TextWriter
The writer used to output the generated schema

Remarks

This method allows for both the drop and create ddl script to be executed. This overload is provided mainly to enable use of in memory databases. It does NOT close the given connection!

See Also