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)

4483 questions
247
votes
10 answers

Spring Boot Configure and Use Two DataSources

How can I configure and use two data sources? For example here is what I have for the first data source: application.properties #first db spring.datasource.url = [url] spring.datasource.username = [username] spring.datasource.password =…
juventus
  • 2,482
  • 2
  • 9
  • 7
161
votes
8 answers

How to use JNDI DataSource provided by Tomcat in Spring?

It is said that in the Spring javadoc article about DriverManagerDataSource class, that this class is very simple and that it is recommended to use a JNDI DataSource provided by the container. Such a DataSource can be exposed as a DataSource bean…
Suzan Cioc
  • 26,725
  • 49
  • 190
  • 355
92
votes
5 answers

Why do we use a DataSource instead of a DriverManager?

I am reading the Java JDBC specification (vr. 4) and I encountred this statement: DataSource — this interface was introduced in the JDBC 2.0 Optional Package API. It is preferred over DriverManager because it allows details about the …
LuckyLuke
  • 42,935
  • 77
  • 254
  • 416
91
votes
4 answers

What are the WCF Service Reference .datasource files?

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…
Andy White
  • 81,400
  • 46
  • 171
  • 205
83
votes
3 answers

Where can I find historical raw weather data?

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…
Recursion
  • 2,667
  • 6
  • 35
  • 49
79
votes
5 answers

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

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:
user1016403
  • 11,061
  • 32
  • 100
  • 134
75
votes
8 answers

Configure DataSource programmatically in Spring Boot

With Spring Boot I can instantiate a JdbcTemplate with the following: Code: @Autowired private JdbcTemplate…
Marsellus Wallace
  • 15,881
  • 21
  • 79
  • 143
69
votes
9 answers

Binding Combobox Using Dictionary as the Datasource

I'm using .NET 2.0 and I'm trying to bind a combobox's Datasource to a sorted dictionary. So the error I'm getting is "DataMember property 'Key' cannot be found on the Datasource". SortedDictionary userCache =…
user803952
  • 854
  • 1
  • 7
  • 8
65
votes
14 answers

c# dictionary one key many values

I want to create a data store to allow me to store some data. The first idea was to create a dictionary where you have 1 key with many values, so a bit like a one to many relationship. I think the dictionary only has 1 key value. How else could I…
Marc G
  • 683
  • 1
  • 7
  • 7
46
votes
4 answers

Angular Material Table Dynamic Columns without model

I need to use angular material table without model, because I don't know what will come from service. So I am initializing my MatTableDataSource and displayedColumns dynamically in component like that : TableComponent : ngOnInit()…
mevaka
  • 1,320
  • 1
  • 12
  • 19
43
votes
6 answers

What's the difference between data source and delegate?

I have a fundamental question related to Cocoa frameworks design patterns. What's the difference between delegate and data source? Both of them could use @protocols declaration, but some classes or frameworks are using delegate, and some others are…
Jesse Armand
  • 1,802
  • 3
  • 17
  • 26
43
votes
7 answers

How do I manually configure a DataSource in Java?

I'm trying to follow Sun's JDBC tutorial at http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html It gives the following example code: DataSource ds = (DataSource)…
Eric Wilson
  • 51,818
  • 71
  • 192
  • 262
41
votes
3 answers

React-Native Updating List View DataSource

I have an iOS app I am making with react-native. The Game class contains a ListView component. I set the state in the constructor and include a dataSource. I have a hardcoded array of data for right now that I store in a different state property…
Brandon M
  • 933
  • 1
  • 8
  • 8
41
votes
7 answers

Use of multiple DataSources in Spring Batch

I am trying to configure a couple of datasources within Spring Batch. On startup, Spring Batch is throwing the following exception: To use the default BatchConfigurer the context must contain no more thanone DataSource, found 2 Snippet from Batch…
Ahmed Bhaila
  • 489
  • 1
  • 4
  • 8
38
votes
6 answers

How to Export/Import a Data Source from DataGrip?

I can't seem to figure out how to export a data source configuration in DataGrip (currently on 2016.2 EAP). I would like to export a handful of data sources and share them with my teammates to make it easier for them to get up and running on…
David Farrell
  • 2,937
  • 2
  • 12
  • 11
1
2 3
99 100