Unable to find the requested .Net Framework Data Provider in Visual Studio 2010 Professional

I have seen reports of people having and additional, self terminating node in the machine.config file. Removing it resolved their issue. machine.config is found in \Windows\Microsoft.net\Framework\vXXXX\Config. You could have a multitude of config files based on how many versions of the framework are installed, including 32 and 64 bit variants. <system.data> <DbProviderFactories> <add name=”Odbc Data … Read more

Spring Data JPA – Multiple EnableJpaRepositories

In order to let spring knows what DataSource is related to what Repository you should define it at the @EnableJpaRepositories annotation. Let’s assume that we have two entities, the Servers entity and the Domains entity and each one has its own Repo then each Repository has its own JpaDataSource configuration. 1. Group all the repositories … Read more

C# dictionary – one key, many values

As of .NET 3.5+, instead of using a Dictionary<IKey, List<IValue>>, you can use a Lookup from the LINQ namespace: // Lookup Order by payment status (1:m) // would need something like Dictionary<Boolean, IEnumerable<Order>> orderIdByIsPayed ILookup<Boolean, Order> byPayment = orderList.ToLookup(o => o.IsPayed); IEnumerable<Order> payedOrders = byPayment[false]; From MSDN: A Lookup<TKey, TElement> resembles a Dictionary<TKey, TValue>. The … Read more

Binding Combobox Using Dictionary as the Datasource

SortedDictionary<string, int> userCache = new SortedDictionary<string, int> { {“a”, 1}, {“b”, 2}, {“c”, 3} }; comboBox1.DataSource = new BindingSource(userCache, null); comboBox1.DisplayMember = “Key”; comboBox1.ValueMember = “Value”; But why are you setting the ValueMember to “Value”, shouldn’t it be bound to “Key” (and DisplayMember to “Value” as well)?

Should you set up database connection properties in server.xml or context.xml

I prefer a third approach that takes the best from Approach 1 and Approach 2 described by user1016403. Approach 3 Save database properties on the server.xml reference the server.xml database properties from the web application META-INF/context.xml Approach 3 benefits While the first point is useful for security reasons the second point is useful for referencing … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)