Add space between Data Source
con.ConnectionString = @"Data Source=.\SQLEXPRESS;
AttachDbFilename=c:\folder\SampleDatabase.mdf;
Integrated Security=True;
Connect Timeout=30;
User Instance=True";
More Related Contents:
- C# Data Connections Best Practice?
- Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints
- SQL WHERE clause matching values with trailing spaces
- How to access ssis package variables inside script component
- SqlConnection.Close() inside using statement
- When executing a stored procedure, what is the benefit of using CommandType.StoredProcedure versus using CommandType.Text?
- Calling SQL Defined function in C#
- How to use String property as primary key in Entity Framework
- Is SqlConnection.Close() need inside a Using statement?
- Update-Database command is not working in ASP.Net Core / Entity Framework Core because object in database already exists
- Taking lot of time to read from SQL Server using c#
- SQL Date format BETWEEN query
- How do I clean SqlDependency from SQL Server memory?
- How do I connect to an .mdf (Microsoft SQL Server Database File) in a simple web project?
- Getting return value from stored procedure in C#
- C# guid and SQL uniqueidentifier
- Local sequence cannot be used in LINQ to SQL implementation of query operators except the Contains() operator
- Visual Studio designer in x64 doesn’t work
- Multi threading C# application with SQL Server database calls
- Use linq to generate direct update without select
- Local database, I need some examples
- How can I update a cell value in a dB table, using SQL Server CE and C# (Visual Studio 2010)
- Writing to output window of Visual Studio
- Received an invalid column length from the bcp client for colid 6
- How to create an Access database at runtime in C#?
- Visual Studio 2010 Compiling with the Debug or Release version of third party library depending on if my project is being compiled Build or Release?
- Why does TestInitialize get fired for every test in my Visual Studio unit tests?
- Getter and Setter declaration in .NET [duplicate]
- How can I make implementation of an interface produce an auto property instead of NotImplementedException?
- Must declare the table variable @table