connection-string

What is the difference between Trusted_Connection and Integrated Security in a connection string?

强颜欢笑 提交于 2019-11-29 20:07:29
I'm curious what the difference between the token "Trusted_Connection" and "Integrated Security" in SQL Server connection strings (I believe other databases/drivers don't support these). I understand that they are equivilent. They are synonyms for each other and can be used interchangeably. In .Net, there is a class called SqlConnectionStringBuilder that is very useful for dealing with SQL Server connection strings using type-safe properties to build up parts of the string. This class keeps an internal list of synonyms so it can map from one value to another: +----------------------+----------

Secure ConnectionString in WinForm Applications

大憨熊 提交于 2019-11-29 20:06:44
问题 How Can I Secure my ConnectionString in WinForm Application? 回答1: You can't. Although you can encrypt the connection string in the app.config file, the application needs to be able to decrypt it and it is therefore always possible to retrieve the unencrypted connection string, especially with a managed application (perhaps not for your typical end user, but any skilled developer can do this). The solution to this is to not lean on security by obscurity . Use Windows Integrated Security when

Retrieving a ConnectionString through System.Configuration Throws Exception

丶灬走出姿态 提交于 2019-11-29 18:51:47
In my C# application, i am trying to connect to a DataConnection. The application is just a simple Login form but as soon as the user clicks the login button, it throws an exception error referencing the Connection String. Can anyone help? public void userLoginSuccessfull() { try { ////////////////////////////////// // This line is throwing the error ////////////////////////////////// string connString = System.Configuration.ConfigurationManager .ConnectionStrings["connectionString"].ConnectionString; if (txtUsername.Text != "" & txtPassword.Text != "") { string queryText = @"SELECT Count(*)

What's best way to secure a database connection string?

。_饼干妹妹 提交于 2019-11-29 18:26:58
问题 I am writing a set of database-driven applications in PHP. These applications will run on a Linux server as its own user. Other users will likely be on the system at times, but have very controlled access. Other servers they will not have access to at all. I will also expose a limit stored procedure API to developers who need to write Perl scripts that access the database using a DBI and a set of functions I write. My question is what the best way to secure the config files that have

Changing dataset connection string at runtime

南楼画角 提交于 2019-11-29 18:15:16
问题 I have a c# generated dataset. How can I change the connection string so I can use the dataset with another (identically structured yet differently populated) database? This has to occur at runtime as I do not know the server or database name at compile time. I am using c# 2.0. 回答1: You can modify a single instance of the table adapter. _myAdapter.Connection.ConnectionString = connectionString; 回答2: Based on the link above, I did it this way: partial class QueriesTableAdapter { public

ConnectionString For Getting An Excel File Problem

点点圈 提交于 2019-11-29 17:23:39
in have an Excel File Named (a.xlsx) in A Folder Named (ExcelFiles). the ExcelFiles Folder Is located in the root Of my project. so my connection string for getting excel file data is like this : <add name="xlsx" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=aaa\ExcelFiles\a.xlsx;Extended Properties=Excel 12.0"/> aaa = My Project Name with this connection string every thing is ok in local , but after upload web site i have an error. where is the problem?? is this path true -> ~/ExcelFiles/a.xlsx or not can u fix this path 4 me.... after solving the path problem the error is

Connection String Trouble MetaDataException

拟墨画扇 提交于 2019-11-29 17:18:49
I got two models in my project. When I added the second models I got this error in all account page: System.Data.MetadataException: The specified schema is not valid. Errors: (8.6): error 0040: the nclob type is not qualified with a namespace or alias. Only primitive types can be used without qualification. At line 34 of `InitializeSimpleMembershipAttribute.cs` : using (var context = new UsersContext()) Ligne 33 : { Ligne 34 : if (!context.Database.Exists()) Ligne 35 : { Ligne 36 : // Create the SimpleMembership database without Entity Framework migration schema and those my connection string

Google Apps Script - JDBC Connection Failed

橙三吉。 提交于 2019-11-29 17:07:49
I am attempting to open a connection from a Google Apps Spreadsheet without success, using example code from the Google Apps Developers reference ( https://developers.google.com/apps-script/jdbc ) function insert() { var conn = Jdbc.getConnection("jdbc:mysql://localhost:3306/test", "a", "a"); ERROR: Failed to establish a database connection. Check connection string, username and password. (line 56) I have tried replacing "localhost" with my specific IP address. I am able to connect successfully to my database using Access, ODBC and the above credentials so I know it's a JDBC / Google-apps

Can SimpleMembership and Entity Framework share a connection string?

不羁岁月 提交于 2019-11-29 16:12:46
Currently when using Entity Framework and SimpleMembership I need to have 2 connection strings in web.config . The first is used when calling WebSecurity.InitializeDatabaseConnection and its a simple connection string. The other is for the edmx and contains file references and the connection string info. It means the connection string info is in the file twice. As well as duplicating information, I believe it can be an issue using azure (unconfirmed). Is there a way to reduce this to one connection string and just keep the one for the edmx. Simply passing the EF one to the WebSecurity

pyodbc + MySQL + Windows: Data source name not found and no default driver specified

百般思念 提交于 2019-11-29 14:03:27
问题 I am trying to connect to MySQL 5.6 on a Windows Server 2008 R2 localhost with pyodbc. I used the full installation for the MySQL instance on the localhost, including the ODBC connector. I have it connecting to a remote SQL Server instance beautifully, but for the life of me I can't get it to connect to the local MySQL instance. I am using this guide from connectionstrings.com as reference. Here's some code: import pyodbc def create_mssql_conn(): return pyodbc.connect(r'Driver={SQL Server}