datasource

How to Define a MySql datasource bean via XML in Spring

為{幸葍}努か 提交于 2019-11-28 07:37:21
I've looked over the documentation to define a bean. I'm just unclear on what class file to use for a Mysql database. Can anyone fill in the bean definition below? <bean name="dataSource" class=""> <property name="driverClassName" value="" /> <property name="url" value="mysql://localhost/GameManager" /> <property name="username" value="gamemanagertest" /> <property name="password" value="1" /> </bean> Both the answers are appropriate for the question. But just for an FYI if you're going to use DriverManagerDataSource as your datasource, every call to your datasource bean will create a new

Custom column names for DataGridView with associated DataSource

与世无争的帅哥 提交于 2019-11-28 07:23:09
How can I setup custom column names for DataGridView with associated DataSource? Here is some code: class Key { public string Value { get; } public DateTime ExpirationDate { get; } } List<Key> keys = new List<Key>(); ...// fill keys collection DataGridView dataGridView = createAndInitializeDataGridView(); dataGridView.DataSource = keys; This gives me dataGridView with column names "Value" and "ExpirationDate". How should I proceed to change names to "Key" and "Expire" for example? Use the DisplayName attribute on your properties to specify column names in your DataGridView: class Key { [System

Kendo ui datasource refresh?

谁说我不能喝 提交于 2019-11-28 07:00:39
问题 I have used kendo grids and charts fine and refreshed them with the following example code: $("#Product").data("kendoGrid").dataSource.read(); However, I have used the datasource just to provide some basic data in a different view, like in this example where it does not use the grid http://demos.kendoui.com/web/datasource/index.html Is there a way to refresh this datasource in the same kind of way as the above code does for the grids and charts? Thanks, Matt 回答1: It seems to be that only the

how to get the xtragrid filtered and sorted datasource?

假装没事ソ 提交于 2019-11-28 06:30:00
问题 I have an xtraGrid control (v12.1) binded to a bindingSource, this last gets its data from a LINQ to entities query (EF4.3.1), the end user can filter and sort the gridView, I have a Stimulsoft report that shows the content of the gridView when the user clicks on a PrintListButton, how to get the xtragrid filtered and sorted datasource, in order to attach it to the report? Thanks. 回答1: var data = GetDataView(xtraGridControl1); report.RegData("List", data.ToTable()); public DataView

Location data for filling the report in JasperServer

六月ゝ 毕业季﹏ 提交于 2019-11-28 06:17:21
问题 I have developed a template design in JasperSoft Studio and upload jrxml file to JasperServer. I want to send data (JSON or XML) to filling report template from my python application and take back report in some popular formats like PDF, XLS using REST API. I do not want to store the data on the server . How can I do this? Or data must be stored on the server and there is no alternative way of their transmission by WEB-Service? 回答1: The data does not necessarily have to reside on the server.

How can I bind a DataSource to an InitialContext for JUnit testing? [duplicate]

别来无恙 提交于 2019-11-28 05:29:05
This question already has an answer here: Setting up JNDI Datasource in jUnit 6 answers I'm trying to run JUnit tests on database "worker" classes that do a jndi lookup on an InitialContext to get a DataSource . The worker classes are usually running on a Glassfish v3 App Server which has the appropriate jdbc resources defined. The code runs just fine when deployed on the App Server but doesn't run from the JUnit testing environment, because obviously it can't find the jndi resources. So I tried to setup an InitialContext in the test class that binds a datasource to the appropriate context,

Configuring Grails to use own DataSource implementation or to proxy the standard DataSource

匆匆过客 提交于 2019-11-28 04:26:22
问题 In an application I want to use my own implementation of javax.sql.DataSource that extends the standard org.apache.commons.dbcp.BasicDataSource used by Grails and adds the functionality to set the client identifier based on the currently logged in user at the Grails application. What is the best way to change the underlying javax.sql.DataSource implementation in a Grails application? At the moment I see two possibilities: change the implementation of the DataSource that is used by Grails

Unable to access weblogic datasource from java with prefix jdbc/

筅森魡賤 提交于 2019-11-28 03:34:24
问题 I have created two datasource in weblogic with below jndi names jdbc/testDatasource testDatasource1 I am able to access datasource testDatasource1 using java but while access dataource jdbc/testDatasource i am getting below mention error javax.naming.NameNotFoundException: While trying to lookup 'jdbc.testDatasource' didn't find subcontext 'jdbc'. Resolved '' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jdbc.testDatasource' didn't find subcontext 'jdbc'.

Where can I find historical raw weather data? [closed]

筅森魡賤 提交于 2019-11-28 02:56:52
Where can I find historical raw weather data for a project I am doing with focus on the USA and Canada. I need temperatures mainly, but other details would be nice. I am having a very hard time finding this data. I really dont want to have to scrape a weather site. Gilbert Le Blanc At the United States National Severe Storms Laboratory Historical Weather Data Archive (note: this has since been retired). Also, the United States National Climatic Data Center Geodata Portal . The United States National Climatic Data Center Climate Data Online . The United States National Climatic Data Center Most

What is the correct way to use Entity Framework as datasource for DataGridView?

喜夏-厌秋 提交于 2019-11-28 02:56:16
问题 I tried setting DataSource via DataGridView Designer but it wasn't listed there and then I generated new datasource via wizard which generated DataSet. But now I have Entity Framework in my project + DataSet how can I use Entity Framework only... I'm confused. artiklBindingSource was automatically generated I only wanted to use EF as datasource now I'm stuck with unwanted DataSet. 回答1: To add a data source to use with your DataGridView in DataGridView Tasks panel, open Choose Data Source: