datasource

Microsoft Word Mail Merge Data Source auto location

◇◆丶佛笑我妖孽 提交于 2019-12-06 09:29:34
I have written an Excel > Word Mail merge where the word document is the mail merge template. At the moment the location of the excel file (data source) has to be hard coded. I want to be able to move the files about the network, as long as they are in the same folder as each other, so it recognizes the data source is still the excel file. I currently have this piece of code which i thought would work. When the word document is opened at any point, it will re-create the data source by looking to the current directory of the file and looking for the file name PM MailMerge.xlsm. Then when it has

Jetty Bind DataSource in JNDI Context

安稳与你 提交于 2019-12-06 08:02:18
问题 I would like to bind DataSource object to (eclipse) jetty's JNDI context programatically. I need for testing purpose. Here's a piece of code I have now: server = new Server(SERVER_PORT); webAppContext = new WebAppContext(); webAppContext.setResourceBase("."); webAppContext.setContextPath("/" + SERVER_CONTEXT); webAppContext.addEventListener(prepareServletContextListener()); webAppContext.addFilter(GuiceFilter.class, "/*", null); webAppContext.addServlet(DefaultServlet.class, "/"); Resource r

Unable to access datasource remotely through JBoss

大憨熊 提交于 2019-12-06 07:20:20
问题 Context I have a JBoss where I have sucessfully deployed a datasource mydatasource-ds.xml . It's JNDI name is java:mydatasourceDS . JBoss claims that the datasource is succesfully deployed. The JMX console agress too. Problem I want to use this datasource from a client java app launched on a separate JVM. But I get an exception saying the java:mydatasourceDS cannot be found. java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.sql.DataSource Details Here is the

Cake php Datasource class MySQL could not be found

北城余情 提交于 2019-12-06 07:18:36
问题 I have ubuntu 10.04 on server. I am trying to set up the cake php project but it gives me following error Cake is NOT able to connect to the database. Datasource class MySQL could not be found. I have searched lot on the web regarding it. my config file looks like this class DATABASE_CONFIG { public $default = array( 'datasource' => 'Database/MySQL', 'persistent' => false, 'host' => 'localhost', 'login' => 'root', 'password' => 'mypassword', 'database' => 'dbname', 'prefix' => '', //'encoding

Tomcat6 MySql JDBC Datasource configuration

安稳与你 提交于 2019-12-06 07:16:39
问题 I've always used Spring's dependency injection to get datasource objects and use them in my DAOs, but now, I have to write an app without that. With Spring I can write something like this: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://127.0.0.1/app?characterEncoding=UTF-8" /> <property name="username" value="u" /> <property name="password"

Populating a programatically declared datagridview using datasource and entity framework

断了今生、忘了曾经 提交于 2019-12-06 07:01:23
just having some small issues with c# winforms datagridview. Here's my scenario I am using entity framework and am trying to bind certain entity models to my datagridview datasource. var query = from q in context.foo select q; dgv_Disp.DataSource = query.ToList(); When I ran this piece of code above on a form class which had a datagridview in the GUI, it all worked fine. The datagridview will automatically generate columns and the number of rows. But when I run this exact same code with the exception that I don't have a datagridview in the GUI, I just declare it programmatically and then set

A data source instance has not been supplied for the data source 'Request'

拈花ヽ惹草 提交于 2019-12-06 06:54:18
问题 I'm getting an error on my reportviewer which I am not sure how to correct this.... The error that I am gettings is : " A data source instance has not been supplied for the data source 'Request'." I have tried searching for this, but can't find anything that I can see that is wrong, can somebody please point me in the right direction? This is how my reportvierer looks like: <rsweb:ReportViewer ID="rptViewer" runat="server" Height="654px" Width="924px" Font-Names="Verdana" Font-Size="8pt"

Setting up Play 2.4.0 with Postgres and HikariCP yields configuration error

怎甘沉沦 提交于 2019-12-06 06:24:01
I'm trying to set up a play framework server with a connection to a local postgres. My current applications.conf is like this: dbplugin=disabled db { default { dataSourceClassName=org.postgresql.ds.PGSimpleDataSource dataSource { user="postgres" password="postgres" databaseName="timeseries" serverName="localhost" } hikaricp { connectionTestQuery = "SELECT 1" } } } My build.sbt has only the newest jdbc for postgres added: lazy val root = (project in file(".")).enablePlugins(PlayJava) scalaVersion := "2.11.6" libraryDependencies ++= Seq( javaJdbc , cache , javaWs , "org.postgresql" % "postgresql

Datasource configuration in wildfly 10

依然范特西╮ 提交于 2019-12-06 06:11:31
问题 I am trying to configure a PostgreSQL datasource in Wildfly 10 Application Server on Mac OS. I am doing what the instructions prescribe. I have created an order: /wildfly-10.1.0.Final/modules/system/layers/base/org/postgresql/main. In this order I have put the JDBC driver: postgresql-9.3-1104.jdbc4.jar and I have created a module.xml file: <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.3" name="org.postgresql“> <resources> <resource-root path="postgresql-9.3-1104

Specify separate datasource for Activiti in a Spring Boot app

假如想象 提交于 2019-12-06 05:57:25
How would I use two separate dataSources in my Spring Boot application? I would like one dataSource to be used by my application, to be used for persisting my models and a separate dataSource for use by the Activiti engine, so it can keep it's entities in a separate database. As of now Activiti's tables and my app's tables are created in the same database. [Edited]: I know I can define two separate DataSource beans like: @Bean public DataSource appDataSource() { BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName("org.hsqldb.jdbcDriver"); dataSource.setUrl("xxx");