Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1534
  • Last Modified:

Microsoft Design Patterns Database Connection Problem

I have installed Microsoft Design Patterns and am in the process of attempted to learn/use the components.  I am trying to run the SimpleData sample vb.net application and cannot seem to get the SQL database to open.

The following is the inner exception :


System.Data.SqlClient.SqlException was unhandled by user code
  Message="Cannot open database \"EntLibQuckStarts\" requested by the login. The login failed.\r\nLogin failed for user 'WHITESTONE-DEV\\Howard Bash'."
  Source=".Net SqlClient Data Provider"
  ErrorCode=-2146232060
  Class=11
  LineNumber=65536
  Number=4060
  Procedure=""
  Server="(local)\\SQLEXPRESS"
  State=1
  StackTrace:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(DbCommand command)
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(CommandType commandType, String commandText)
       at CustomerManagement.MainForm.mnuCount_Click(Object sender, EventArgs e) in D:\Program Files\Microsoft Enterprise Library January 2006\labs\vb\Data Access\exercises\ex01\begin\CustomerManagement\MainForm.vb:line 23
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Please advise.
Thanks,
Howard
0
Howard Bash
Asked:
Howard Bash
  • 13
  • 6
  • 6
2 Solutions
 
YveauCommented:
Did you create both the login and user for the database ?


Use master
go
create login <SomeName> ...
go

use EntLibQuckStarts
go
create user <SomeUser>
for login <SomeName>
go

hope this helps ...
0
 
Ted BouskillSenior Software DeveloperCommented:
Remove the duplicate backslash in '(local)\SQLEXPRESS'
0
 
Howard BashSenior Software EngineerAuthor Commented:
The connection string is build by the Microsoft.Practices.EnterpriseLibrary.Data.Database CreateConnection method.  

And this is the connection string in the app.config file.

<add name="QuickStarts Instance" connectionString="Database=EntLibQuckStarts;Server=(local)\SQLEXPRESS;Integrated Security=SSPI;"  providerName="System.Data.SqlClient" />

So,  I don't see what/where the \\ happens and that the connection is with integrated security.


0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
Ted BouskillSenior Software DeveloperCommented:
I'm assuming 'WHITESTONE-DEV\Howard Bash' has been given access to the database.  Is that correct?

You can confirm by using 'Tools' and 'Connect to Server' in Visual Studio.
0
 
YveauCommented:
Use this script to accomplish it:

Use master
go
create login 'WHITESTONE-DEV\Howard Bash'
from windows
go

use EntLibQuckStarts
go
create user 'WHITESTONE-DEV\Howard Bash'
for login 'WHITESTONE-DEV\Howard Bash'
go

Hope this helps ....
0
 
Howard BashSenior Software EngineerAuthor Commented:
The server was not listed.  What kind of connection should I add?  Do I highlight the server node or the data connection node when I add EntLibQuckStarts?

I tried with change source to sql server compact edition  and run the above script.  It seemed to be working till I executed :
use EntLibQuckStarts
go
create user 'WHITESTONE-DEV\Howard Bash'
for login 'WHITESTONE-DEV\Howard Bash'
go


The errror message was :
Msg 15063, Level 16, State 1, Line 1
The login already has an account under a different user name.

0
 
Howard BashSenior Software EngineerAuthor Commented:
I think my sql server express configuration is a mess.  Is there a some relatively painless way to reset all of it, including users?  I got the script to run togreate the user but that was as far as it went.
0
 
Ted BouskillSenior Software DeveloperCommented:
If SQLEXPRESS was installed along with the Microsoft Design Patterns installation you could uninstall/reinstall.

With many Microsoft samples if you poke around in the installation folders you can find the scripts and/or batch files used for configuring the database!  I'd strongly recommend you look in the folders first.

To be honest I've learned a lot from poking through such files from Microsoft.
0
 
Howard BashSenior Software EngineerAuthor Commented:
I uninstalled and then went from the 06 to the 07 Versions.

When I issue this  :
create user "WHITESTONE-DEV\Howard Bash"
for login "WHITESTONE-DEV\Howard Bash"
go

The error is :
Msg 15063, Level 16, State 1, Line 1
The login already has an account under a different user name.




0
 
Ted BouskillSenior Software DeveloperCommented:
When a user is added to a SQL installation there are really two steps.

1) Create the user access to the SQL instance
IF NOT EXISTS(SELECT * FROM sys.server_principals WHERE [name] = 'WHITESTONE-DEV\Howard Bash')
      CREATE LOGIN [WHITESTONE-DEV\Howard Bash] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]
GO

2) Grant the user access to specific databases
USE [EntLibQuckStarts]
GO
IF NOT EXISTS(SELECT * FROM sysusers WHERE [name] = '[WHITESTONE-DEV\Howard Bash]')
BEGIN
      CREATE USER [WHITESTONE-DEV\Howard Bash] FOR LOGIN [WHITESTONE-DEV\Howard Bash]
      ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [WHITESTONE-DEV\Howard Bash]
END
GO

However a 3rd scenario can occur.  Users can be orphaned.  The table sys.server_principals in the master database could have a different user ID than the entry in sysusers in your database.  This often happens when databases are moved if the accounts are not recreated.  To fix that scenario use:

Use [EntLibQuckStarts]
go
sp_change_users_login 'auto_fix', 'WHITESTONE-DEV\Howard Bash', 'WHITESTONE-DEV\Howard Bash'
0
 
YveauCommented:
OK, so what users are present in that database ?

select l.name, u.name from sysusers u
inner join master..syslogins l
on u.sid = l.sid

and is 'WHITESTONE-DEV\Howard Bash' already in there ?

Hope this helps ...

... wait ... did you restore the database from another server ? In that case the database user sids are not matched with the server login sids of this machine. Looking at the symptoms, that could very well be the case. Just drop the users from the database and recreate them. These are called orphaned users (users with no login associated).

Hope this helps ...
0
 
Howard BashSenior Software EngineerAuthor Commented:
The above query yields:


WHITESTONE-DEV\Howard Bash      dbo

I did not do a restore the database.  It was created via the QuickStart SQL script that I ran after the install.

Thanks.


0
 
YveauCommented:
OK, so 'WHITESTONE-DEV\Howard Bash' is the owner (probably creator) of the database and has all permissions to it. It should now be associated with the login from windows. Now can you access the database with this credentials ?
0
 
Howard BashSenior Software EngineerAuthor Commented:
Nope.  Here is the Exception Detail:
System.Data.SqlClient.SqlException was unhandled by user code
  Message="Cannot open database \"EntLibQuckStarts\" requested by the login. The login failed.\r\nLogin failed for user 'WHITESTONE-DEV\\Howard Bash'."
  Source=".Net SqlClient Data Provider"
  ErrorCode=-2146232060
  Class=11
  LineNumber=65536
  Number=4060
  Procedure=""
  Server="(local)\\SQLEXPRESS"
  State=1
  StackTrace:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection(Boolean disposeInnerConnection)
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(DbCommand command)
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(CommandType commandType, String commandText)
       at CustomerManagement.MainForm.mnuCount_Click(Object sender, EventArgs e) in D:\Program Files\Microsoft Enterprise Library January 2006\labs\vb\Data Access\exercises\ex01\begin\CustomerManagement\MainForm.vb:line 23
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
0
 
Ted BouskillSenior Software DeveloperCommented:
Sigh: Did you you even read my comment?  It has everything you need to solve this problem.

Run the following and try again:
USE [EntLibQuckStarts]
GO
ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [WHITESTONE-DEV\Howard Bash]

The will make your account an database owner which is all you need for running the samples.
0
 
Howard BashSenior Software EngineerAuthor Commented:
I'm so sorry.  I missed that entire entry.  I will let you know.
0
 
Howard BashSenior Software EngineerAuthor Commented:

sp_change_users_login 'auto_fix', 'WHITESTONE-DEV\Howard Bash', 'WHITESTONE-DEV\Howard Bash'
go


Msg 15600, Level 15, State 1, Procedure sp_change_users_login, Line 174
An invalid parameter or option was specified for procedure 'sys.sp_change_users_login'.

0
 
Ted BouskillSenior Software DeveloperCommented:
Ah, my apologies, I just remembered that it won't work with Windows accounts!

I just tried the following on my computer and it works:
NOTE: I notice you are using the database name EntLibQuckStarts should the name be: EntLibQuickStarts?

USE [EntLibQuickStarts]
GO
IF EXISTS(SELECT * FROM sysusers WHERE [name] = '[WHITESTONE-DEV\Howard Bash]')
      DROP USER [WHITESTONE-DEV\Howard Bash]
GO
USE [master]
GO
IF EXISTS(SELECT * FROM sys.server_principals WHERE [name] = 'WHITESTONE-DEV\Howard Bash')
      DROP LOGIN [WHITESTONE-DEV\Howard Bash]
GO
CREATE LOGIN [WHITESTONE-DEV\Howard Bash] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]
GO
USE [EntLibQuickStarts]
GO
ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [WHITESTONE-DEV\Howard Bash]
GO
0
 
YveauCommented:
I think you need to get rid of the dbo role first:

use [EntLibQuckStarts]
go

exec sp_changedbowner 'sa'
go

use [master]
go

if not exists(select 1 from sys.server_principals where name = 'WHITESTONE-DEV\Howard Bash')
begin
    create login 'WHITESTONE-DEV\Howard Bash'
    from windows
end
go

use [EntLibQuckStarts]
go

create user 'WHITESTONE-DEV\Howard Bash'
for login 'WHITESTONE-DEV\Howard Bash'
go

This will create a regular user for your account in the database. So no special permissions, just the default.
If you want to gain all permissions in this database, you can use

use [EntLibQuckStarts]
go

execute sp_addrolemember @rolename = 'dbo', @membername = ''WHITESTONE-DEV\Howard Bash'
go

This way, the database remains owned by 'sa' and you will become a member of the dbo database role, which will give you all permissions on it.

note, I used the dbname you used. If that is incorrect, change it ... of course ...
Hope this helps ...
0
 
Howard BashSenior Software EngineerAuthor Commented:
This Line:
execute sp_addrolemember @rolename = 'dbo', @membername = '[WHITESTONE-DEV\Howard Bash]'
go


yielded this error:

Msg 15014, Level 16, State 1, Procedure sp_addrolemember, Line 36
The role 'dbo' does not exist in the current database.
0
 
Howard BashSenior Software EngineerAuthor Commented:
This is the exception after I ran the above scripts (last ran last) :

System.Data.SqlClient.SqlException was unhandled by user code
  Message="Cannot open database \"EntLibQuckStarts\" requested by the login. The login failed.\r\nLogin failed for user 'WHITESTONE-DEV\\Howard Bash'."
  Source=".Net SqlClient Data Provider"
  ErrorCode=-2146232060
  Class=11
  LineNumber=65536
  Number=4060
  Procedure=""
  Server="(local)\\SQLEXPRESS"
  State=1
  StackTrace:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection(Boolean disposeInnerConnection)
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection()
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(DbCommand command)
       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(CommandType commandType, String commandText)
       at CustomerManagement.MainForm.mnuCount_Click(Object sender, EventArgs e) in D:\Program Files\Microsoft Enterprise Library January 2006\labs\vb\Data Access\exercises\ex01\begin\CustomerManagement\MainForm.vb:line 23
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I am going to send you the app.config section also.. Perhaps it is not quite right:

  <connectionStrings>
    <add name="QuickStarts Instance" connectionString="Database=EntLibQuckStarts;Server=(local)\SQLEXPRESS;Integrated Security=SSPI;"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

0
 
Howard BashSenior Software EngineerAuthor Commented:
Ok.  It works.  The app.config that came with the Enterprise Design Patterns Library Database Quick Start Sample (a mouthful) is flawed.

The .config said :
  <connectionStrings>
    <add name="QuickStarts Instance" connectionString="Database=EntLibQuickStarts;Server=(local)\SQLEXPRESS;Integrated Security=SSPI;"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

Which is Wrong not the database spelling.  The correct section follows:
  <connectionStrings>
    <add name="QuickStarts Instance" connectionString="Database=EntLibQuickStarts;Server=(local)\SQLEXPRESS;Integrated Security=SSPI;"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

But, the suggestions and efforts were great none the less.  So,  I will split the points up and say thank you for your ideas.

0
 
Howard BashSenior Software EngineerAuthor Commented:
Duh,  I copied the corrected Database Name twice...  the top one was missing the "i" in Quick in the original and I did not see it.
0
 
YveauCommented:
Glad it is solved!
0
 
Howard BashSenior Software EngineerAuthor Commented:
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 13
  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now