datasource

What are the WCF Service Reference .datasource files?

僤鯓⒐⒋嵵緔 提交于 2019-12-17 10:47:22
问题 What are the .datasource files that are automatically generated by "Create Service Reference" in Visual Studio? The comment in the file is this: This file is automatically generated by Visual Studio .Net. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. However, it sounds like these files are optional, so I'm wondering what they are used for. I'm

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

帅比萌擦擦* 提交于 2019-12-17 10:08:19
问题 I am trying to set up the database connection properties using JNDI for a Spring web application. I am considering two approaches as below: Approach 1: In your Spring configuration you may have something like: <jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/facs"/> Then in your webapp /META-INF/context.xml file you should have something similar too: <?xml version='1.0' encoding='utf-8'?> <!-- antiResourceLocking="true" --> <Context path="/podd-apn" reloadable="true"

Using a list as a data source for DataGridView

柔情痞子 提交于 2019-12-17 07:26:07
问题 I've extracted the setting names and their respective values out of a configuration file into an ordered dictionary. The dictionary contains keys and values which are of the ICollection class. I want to bind that data and display it in a DataGridView. I've tried copying the strings to arrays and displaying those arrays, but when I ran the program the columns were blank and it did not seem to be binded at all. I've also attempted to set the DataGridView source directly to one the ordered

mySQL DataSource on Visual Studio 2012

喜夏-厌秋 提交于 2019-12-17 05:04:53
问题 I've been reading about mySQL DataSource and the ability to use mySQL with Entity Framework, but I can't really generate EF with mySQL without the use of the DataSource Dialog How can I add mySQL Database to such dialog? This is what I have done so far: Installed mySQL Connector v.6.5.4 Restarted n-times my Windows 7 machine Read all about how well mySQL Connector works on previous versions of Visual Studio 回答1: I have just read from mySQL Forums that mySQL will ship Visual Studio 2012

mySQL DataSource on Visual Studio 2012

為{幸葍}努か 提交于 2019-12-17 05:04:20
问题 I've been reading about mySQL DataSource and the ability to use mySQL with Entity Framework, but I can't really generate EF with mySQL without the use of the DataSource Dialog How can I add mySQL Database to such dialog? This is what I have done so far: Installed mySQL Connector v.6.5.4 Restarted n-times my Windows 7 machine Read all about how well mySQL Connector works on previous versions of Visual Studio 回答1: I have just read from mySQL Forums that mySQL will ship Visual Studio 2012

Configure DataSource programmatically in Spring Boot

只愿长相守 提交于 2019-12-17 04:16:48
问题 With Spring Boot I can instantiate a JdbcTemplate with the following: Code: @Autowired private JdbcTemplate jdbcTemplate; Properties: spring.datasource.url=jdbc:postgresql://my_url:my_port/my_other_stuff spring.datasource.username=my_user_name spring.datasource.password=my_password spring.datasource.driver-class-name=org.postgresql.Driver This create a DataSource of class: org.apache.tomcat.jdbc.pool.DataSource How do I set the DataSource username/password programmatically? We have a policy

DataSource initialization error within liberty profile server

别说谁变了你拦得住时间么 提交于 2019-12-14 02:53:15
问题 I am trying to set up a DataSource in liberty profile server, but I'm getting a NullPointerException (on my ds variable below) when my code tries to use it. The relevant code, and server.xml entries are below. Interestingly, if I change the jndiName to java:comp/env/jdbc/Oracle I get an IllegalArgumentException on server startup, but with the config below it doesn't even seem to try to activate the DataSource... public abstract class DAOBase { //@Resource(name = "jdbc/Oracle", type = javax

What is <OPENSHIFT_MYSQL_ENABLED> environment variable in openshift v3?

风流意气都作罢 提交于 2019-12-14 02:31:35
问题 How can I to set enabled = "true" on datasource of standalone.xml of Openshift v3 Wildfly container like below. <datasource jndi-name="java:jboss/datasources/MySQLDS" enabled="true" use-java-context="true" pool-name="MySQLDS" use-ccm="true"> I put the OPENSHIFT_MYSQL_ENABLED environment variable to "true" but nothing happended. The answer reference site is the below URL: https://developer.jboss.org/wiki/DataserviceBuilderOnOpenShiftV3Online 回答1: I was dealing with the same problem: the

How to create MVC Database First application with MySQL?

99封情书 提交于 2019-12-14 02:18:53
问题 I can use MS SQL in MVC application, but now I want to create MVC Database First application with MySQL (MVC 4, VS 2012, MySQL 5.5). I can connect to MySQL in Server Explorer window. When I create new ADO.NET Entity Data Model , there is not MySQL in data sources list. How can I create my first application with MySQL? 来源: https://stackoverflow.com/questions/12997652/how-to-create-mvc-database-first-application-with-mysql

Connecting two MySQL data source using a single Connection object

时光总嘲笑我的痴心妄想 提交于 2019-12-13 21:18:58
问题 Actually I need to connect two mysql datasource which are created in my application server. I'm using JPA2.0 I tried the following code. but i'm getting exception " java.lang.IllegalStateException: Local transaction already has 1 non-XA Resource: cannot add more resources. ". import com.google.common.collect.Lists; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import java.util.List; import javax.annotation.Resource; import javax.sql.DataSource; public