Public Function GetCompanyNameData() As List(Of String)
Dim myReader As SqlDataReader
cn = New SqlConnection("Data Source=.\SQLEXPRESS;Initial Catalog=NORTHWIND;Integrated Security=True")
cm = New SqlCommand(cmString, cn)
cn.Open()
Non mi fa aprire il database, qualsiasi archivio e con qualsiasi tipo di autentificazione.
Posto il dettaglio eccezione,
System.Data.SqlClient.SqlException non è stata gestita dal codice utente
Class=11
ErrorCode=-2146232060
HResult=-2146232060
LineNumber=65536
Message=Impossibile aprire il database "NORTHWIND" richiesto dall'account di accesso. Accesso non riuscito.
Accesso non riuscito per l'utente 'xy\xy'.
Number=4060
Procedure=""
Server=.\SQLEXPRESS
Source=.Net SqlClient Data Provider
State=1
StackTrace:
in System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
in System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
in System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
in System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
in System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
in System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
in System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
in System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
in System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
in System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
in System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
in System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
in System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
in System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
in System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
in System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
in System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
in System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
in System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
in System.Data.SqlClient.SqlConnection.Open()
in WAOperazioni_ado_comuni._Default.GetCompanyNameData() in c:\users\loris\documents\visual studio 2010\Projects\WAOperazioni ado comuni\WAOperazioni ado comuni\Default.aspx.vb:riga 16
in WAOperazioni_ado_comuni._Default.Page_Load(Object sender, EventArgs e) in c:\users\loris\documents\visual studio 2010\Projects\WAOperazioni ado comuni\WAOperazioni ado comuni\Default.aspx.vb:riga 30
in System.Web.UI.Control.OnLoad(EventArgs e)
in System.Web.UI.Control.LoadRecursive()
in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
Grazie a tutti