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
13
votes
2 answers

What is the replacement for TestContext.DataRow["MyColumnName"]

Using MSTest in a .Net Core Unit test project. I am attempting to use a csv datasource to provide the data for a test method. Previously, I would use something like below in a .Net Framework test…
David Jones
  • 141
  • 1
  • 9
13
votes
3 answers

Mysql is not appearing in "Choose Data Source" for Visual studio 2017

As you can see i've already installed the necessary mysql packages such as Mysql for Visual studio and Connector/NET but no matter what the mysql is not appearing in Visual studio 2017 Data source menu, any suggestion ? :
kkafkas
  • 322
  • 1
  • 3
  • 13
13
votes
3 answers

Error connecting to Data Source in SSRS

I am trying to connect to Datasource but getting this error: An error occurred during local report processing. An error has occurred during report processing. Cannot create a connection to data source 'PO'. You have specified integrated security…
13
votes
3 answers

referring Tomcat JNDI datasource in persistence.xml

in server.xml I've defined global resource (I'm using Tomcat 6):
Rostislav Matl
  • 4,294
  • 4
  • 29
  • 53
13
votes
1 answer

Multiple DataSources with Multiple Transaction Managers in Spring

I have three DataSource's (JDBC) defined in the Junit application context file. Two of them need to be transactionally managed; I do not have to chain any of the methods when using these two data sources (they are entirely independent of each…
Malvon
  • 1,591
  • 3
  • 19
  • 42
13
votes
5 answers

Why was TDataSource created originally?

What was (or would be) the reasoning behind creating TDataSource as an intermediary between data bound components and the actual underlying TDataSets, rather than having the components just connect directly to the TDataSets themselves? This may seem…
Jamo
  • 3,238
  • 6
  • 40
  • 66
13
votes
3 answers

is javax.sql.DataSource thread safe?

I am using the PostgreSQL 9.1 JDBC4 driver (postgresql-9.1-902.jdbc4.jar) in a Java EE application deployed in JBoss 7. Can I assume that javax.sql.DataSource is thread-safe so that multiple threads can concurrently call the getConnection() method…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
12
votes
1 answer

Using AbstractRoutingDataSource to dynamically change the database schema/catalog

According to this article, you can use the AbstractRoutingDataSource from Spring Framework to dynamically change the data source used by the application. However, the data sources used are defined by configuration, instead of programmatically. Is…
Carlos Melo
  • 3,052
  • 3
  • 37
  • 45
12
votes
6 answers

Spring datasource configuration for localhost, development, and production

I'm trying to figure out how my Spring app can determine where it is deployed and load the appropriate datasource. We have 3 environments...my local, the development server, and the production server. So far I have 3 properties files called…
blong824
  • 3,920
  • 14
  • 54
  • 75
12
votes
3 answers

Using datasource with CheckBoxList

I use CheckBoxList in my Windows Forms application and am trying to apply a datasource for it. Having a DataTable, 'dt', with columns id, name and ischecked, I use such code: ((ListBox)MyCheckBoxList).DataSource =…
Grinart
  • 276
  • 2
  • 3
  • 9
12
votes
2 answers

Android - DataSource vs Repository

You hear a lot of people talking about repositories and datasources when talking about design patterns like MVVM or MVI. I've been creating repositories for things like Retrofit and API calls, and datasources for things like Firebase or other…
SomeKoder
  • 575
  • 4
  • 14
12
votes
3 answers

How do I close a java.sql.DataSource

We have a system where data is partitioned by date. So, for example, in SqlServer we have one database per month of data. Each month partition uses a Jdbc driver Datasource wrapped in a C3P0 connection pool DataSource. After a period of time the…
Mike Q
  • 22,839
  • 20
  • 87
  • 129
12
votes
1 answer

spring add datasource at runtime

I am working on a spring boot multi-tenant application with database per tenant strategy. Requirement is that to add new databases at runtime which means I have to create new datasource objects dynamically. I also looked upon Spring's…
belnxkkk
  • 375
  • 1
  • 3
  • 11
12
votes
1 answer

Why use DataSource instead of XADataSource?

As far as I understand there are two types of DataSource connections, javax.sql.DataSource and javax.sql.XADataSource, this tutorial explains that javax.sql.DataSource give the connection the ability to be pooled and javax.sql.XADataSource give the…
Michel Feinstein
  • 13,416
  • 16
  • 91
  • 173
12
votes
5 answers

How to configure datasource in wildfly 10?

I am starting introduction with wildfly learning. I have downloaded distribution of server. Now I am trying to configure datasource but I see following error: Unexpected HTTP response: 500 Request { "address" => [ ("subsystem" =>…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710