connection-string

Help with a OleDB connection string for excel files

China☆狼群 提交于 2019-11-26 09:03:32
问题 The problem i\'m having is that the data adapter is looking at only the first row in each column to determine the data type. In my case the first column \"SKU\" is numbers for the first 500 rows then I happen to have SKU\'s which are mixed numbers and letters. So what ends up happening is rows in the SKU column are left blank, but I still get the other information for each column row. I believe it is the connection string that controls that and with my current settings it should work, however

SQL Server Express connection string for Entity Framework Code First

纵然是瞬间 提交于 2019-11-26 07:27:28
问题 I am working in Visual Web Developer 2010 Express, and using the Entity Framework code-first CTP. I am able to do this with the new SQL Server CE but I am unable to find a connection string to work with SQL Server Express. This one, using the SQL Server CE beta, works fine (database is created and recreated on model changes). <add name=\"TrempimModel\" connectionString=\"data source=|DataDirectory|TrempimModel.sdf\" providerName=\"System.Data.SqlServerCe.4.0\" /> This one, which I copied from

How to configure ProviderManifestToken for EF Code First

独自空忆成欢 提交于 2019-11-26 06:43:19
问题 I have a asp.net MVC3 project using EF code-first. For my unit testing I have been using SQL Server CE 4.0 and SQL Server 2008 Express. Both have worked perfectly with EF generating my database as expected. However, when I run my application outside of a unit test and point it at my connection strings I get the error ProviderIncompatibleException: The provider did not return a ProviderManifestToken string I have read the MS documentation on this and it appears this is a SqlVersion token that

SQL Server Connection Strings - dot(“.”) or “(local)” or “(localdb)”

 ̄綄美尐妖づ 提交于 2019-11-26 06:41:24
问题 I\'ve recently had to install SQL Server and restore a database to 2 laptops, the first took me a couple of days to figure out, the second I\'m still struggling on. On both I was getting this error here: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error:

What is IMEX within OLEDB connection strings?

雨燕双飞 提交于 2019-11-26 06:41:18
问题 \"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=localhost;Extended Properties=\"\"Excel 8.0;HDR=Yes;IMEX=2\" What is the purpose of IMEX=2 in the above connection string? 回答1: From ConnectionStrings "If you want to read the column headers into the result set (using HDR=NO even though there is a header) and the column data is numeric, use IMEX=1 to avoid crash. To always use IMEX=1 is a safer way to retrieve data for mixed data columns. .." Please note that the IMEX value can be very important

How to fix “The ConnectionString property has not been initialized”

强颜欢笑 提交于 2019-11-26 06:37:51
问题 When I start my application I get: The ConnectionString property has not been initialized. Web.config: <connectionStrings> <add name=\"MyDB\" connectionString=\"Data Source=localhost\\sqlexpress;Initial Catalog=mydatabase;User Id=myuser;Password=mypassword;\" /> </connectionStrings> The stack being: System.Data.SqlClient.SqlConnection.PermissionDemand() +4876643 System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +20 System.Data.ProviderBase

Error: “Could Not Find Installable ISAM”

做~自己de王妃 提交于 2019-11-26 05:56:49
问题 I\'ve written some VBA code in an Excel workbook to retrieve data from an Access database in the same directory on a desktop. It works fine on my machine and several other machines running Windows XP, but when we tested this on a Vista machine, we encountered the following error: Could not find installable ISAM I\'ve done a bunch of searching online but can\'t seem to find a concrete answer. The connection string seems to be fine, and, as I mentioned, it works on several machines. Does anyone

How to securely store Connection String details in VBA

会有一股神秘感。 提交于 2019-11-26 03:57:04
问题 I have an Excel Template that has hardcoded Ms Access MDB path in the VBA code used to connect to the Access tables and save, retrieve data. I migrated the MS Access Database over to SQL Server with Integrated Authentication for the Excel Template Users. My question is, What is the Recommend Way / Best Practice for storing the SQL Server DB connection string and retreiving it in Excel 2007 VBA to save and retrieve data? In the past, I have done the following. Use a Registry Key setting that

EntityFramework code-first custom connection string and migrations

浪子不回头ぞ 提交于 2019-11-26 03:54:52
问题 When I create a context with a default connection string (as read from the app.config ) the database is created and the migrations work - basically everything is in order. Whereas when the connection string is created programatically (using SqlConnectionStringBuilder ): database isn\'t created when the database is not present (scenario A ); CreateDbIfNotExists() creates the newest version of database model but the migration mechanisms are not invoked (scenario B ). In A an exception is thrown

Setting up connection string in ASP.NET to SQL SERVER

时光怂恿深爱的人放手 提交于 2019-11-26 03:49:48
I'm trying to set up a connecting string in my web.config file (Visual Studio 2008/ASP.NET 3.5) to a local server (SQL server 2008). In my web.config, how and where do I place the connection string? Here's what web.config file looks like right now: http://imwired.net/aspnet/Online_web.config You can also use this, it's simpler. The only thing you need to set is "YourDataBaseName". <connectionStrings> <add name="ConnStringDb1" connectionString="Data Source=localhost;Initial Catalog=YourDataBaseName;Integrated Security=True;" providerName="System.Data.SqlClient" /> </connectionStrings> Where to