Options

Error while generating the data

nee_609nee_609 Posts: 4
Hi there,

I am trying to generate the test data for my database in dev environment.
This is relational database and properly normalizaed. Now when i try to generate data using Data Generator i am getting below error for most of tables. Please Advice.

Thanks !

[dbo].[tbltestTable] ExecuteScalar requires an open and available Connection. The connection's current state is closed.
System.InvalidOperationException: ExecuteScalar requires an open and available Connection.
The connection's current state is closed.at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)
at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) at
System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior,
Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior,
Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at
az.a(CancellableController , Int32 , Int32 , ConnectionProperties , GenerateAction , SqlConnection ,
SDGProject , GenerationReport )
System.InvalidOperationException: ExecuteScalar requires an open and available Connection. The connection's current state is closed. at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method) at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command) at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at az.a(CancellableController , Int32 , Int32 , ConnectionProperties , GenerateAction , SqlConnection , SDGProject , GenerationReport )

Comments

  • Options
    Hello,

    Sorry this hasn't been answered in such a long time, but we don't have a ready answer to this problem. The connection to the SQL Server is closed when it should be in an open state, and this could mean that the connection was closed by the server for some reason, the network had experienced a problem, or the .NET Framework installation had malfunctioned and freed resources being used by the connection.

    There is an implication that the connection was initially successful, otherwise there would have been a connection failure error thrown by the software. Some places that may have useful information are the SQL Server logs, and the application event logs on the client computer.

    Sorry I can't be more helpful.
Sign In or Register to comment.