Questions tagged [datasource]

Datasource is a name given to the connection set up to a database from a server. The name is commonly used when creating a query to the database. The database source name (DSN) does not have to be the same as the filename for the database.

A data source is any of the following types of sources for (mostly) digitized data:

  • a database (in the Java software platform, datasource is a special name for the connection set up to a database from a server)
  • a computer file
  • a data stream

Please see more here (Wikipedia entry for Datasource) and here (Java 6 Datasource interface documentation)

4740 questions
15
votes
5 answers

Add a Row After Setting DataSource to Datagridview

I had lots of questions related to datasource binding of datagrid. I had a DatagridView to which I am setting DataSource from a list List li = new List(); MyClass O = new MyClass(); O.Name = "Aden"; O.LastName = "B"; O.Id =…
Amit Bisht
  • 4,870
  • 14
  • 54
  • 83
15
votes
0 answers

Use c3p0 with JBOSS AS 7.1.1

I read in c3p0´s manual link that it is possible to use c3p0 library inside JBOSS as an MBean. Once configured correctly, I would like to reference the new C3P0PooledDataSource in my Java WAR through its JNDI name. As I am using Spring it would be…
aloplop85
  • 892
  • 3
  • 16
  • 40
15
votes
4 answers

Out of container JNDI data source

I would like to configure a DataSource using JNDI in a Java SE app. What is the best way to do this? So far, I've come across 2 projects: Apache Naming. The project page has a specific example for configuring a data source, but it looks like the…
nikita
  • 266
  • 3
  • 8
15
votes
5 answers

Programmatically setting grid sort

Is it possible to programmatically set the sort parameter of a KendoUI DataSource before reading data and avoiding a second server reading? The scope is setting a default sort on a certain user interaction. How? Here is an example of what I am…
Matteo Piazza
  • 2,462
  • 7
  • 29
  • 38
14
votes
1 answer

How do I properly close a HikariCP Connection Pool

I'm using HikariDataSource to connect to a MariaDB database. The following class returns a Connection. public class DataSource { private HikariDataSource ds; // The constructor takes db name as an argument and creates a new datasource for the…
Roshan Upreti
  • 1,782
  • 3
  • 21
  • 34
14
votes
1 answer

C# Update combobox bound to generic list

I have a combobox on my form that is bound to a generic list of string like this: private List mAllianceList = new List(); private void FillAllianceList() { // Add alliance name to member alliance list foreach (Village…
Fueled
  • 8,776
  • 9
  • 29
  • 31
14
votes
5 answers

How to use encrypted password in apache BasicDataSource?

At present i am keeping the password [ unencrypted ] in a property file. This password get placed as is in the configuration xml using ant. [ The configuration xml is for datasource, it is creating the object of dbcp.BasicDataSource ] Now, is it…
Rakesh Juyal
  • 35,919
  • 68
  • 173
  • 214
14
votes
2 answers

Cached connection manager in jboss/wildfly

I have defined a datasource for JBoss AS 7.4, with min/max pool sizes, tracing of idle connections etc. I am confused about the datasource use-ccm property. What does it do? Why use it? I thought the datasource itself manages the connection pool.
user1340582
  • 19,151
  • 35
  • 115
  • 171
14
votes
3 answers

How to Define a MySql datasource bean via XML in Spring

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?
cyotee doge
  • 1,128
  • 4
  • 15
  • 33
14
votes
1 answer

Kendo UI AutoComplete datasource transport reads only once

I'm becoming crazy with Kendo UI AutoComplete component. I'm using my own functions to access data with jQuery, so I have to set the AutoComplete dataSource.transport.read as a function. The code is something like this. minLengthAtocomplete =…
vermicida
  • 303
  • 1
  • 4
  • 11
14
votes
3 answers

Set SelectedItem on a combobox bound to datasource

List _customers = getCustomers().ToList(); BindingSource bsCustomers = new BindingSource(); bsCustomers.DataSource = _customers; comboBox.DataSource = bsCustomers.DataSource; comboBox.DisplayMember = "name"; comboBox.ValueMember =…
mdc
  • 1,161
  • 6
  • 22
  • 37
13
votes
6 answers

How can I use a List<> Collection as a Repeater Datasource in ASP.NET with C#

I have a list collection like below : using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace FileExplorer.Classes { public class NewAddedFiles { public string FileName; public string…
SilverLight
  • 19,668
  • 65
  • 192
  • 300
13
votes
1 answer

Connection pool or data source? Which should I put in JNDI?

Does it make more sense to have to connection pool at the JNDI level or at the webapp level? For example, I could create at simply javax.sql.DataSource thusly:
Lucas
  • 14,227
  • 9
  • 74
  • 124
13
votes
1 answer

java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool DataSourceFactory

I'm investigating moving away from an Oracle connection pool and using the Tomcat connection pool. I followed the myriad of example for configuring the in Tomcat's /conf/server.xml. I found great info here. However, when I start Tomcat, I…
eze
  • 2,332
  • 3
  • 19
  • 30
13
votes
3 answers

JDBC Connection Pool test query "SELECT 1" does not catch AWS RDS Writer/Reader failover

We are running an AWS RDS Aurora/MySQL database in a cluster with a writer and a reader instance where the writer is replicated to the reader. The application accessing the database is a standard java application using a HikariCP Connection Pool.…