FAQ Database Discussion Community


Maintain db connection inside Camel Route

java,oracle,jdbc,apache-camel,datasource
Requirement: We create a database connection inside a java application. We need to run all the statements through the same connection on the entire Java application. Problem: Once passing the the created datasource in the Camel route, it apparently creates a new connections. I am using a DataSource Object that...

Kendo grid batch edit notifications

kendo-ui,kendo-grid,datasource
I am using a kendo grid with batch editing style. When editing (or creating) multiple records, the dataSource call update (or create) for each modified record. Is there a way to get notified when all of these requests are finished?

Asking datasource credentials

reporting-services,datasource,ssrs-2008-r2,rdl
I have created one report and the .rdl file is uploaded to report server from another machine. But when running the report it is asking for data source credentials. Can we avoid asking data source credentials while running report?

ObjectDataSource in c# Code Behind?

c#,asp.net,.net,datasource,objectdatasource
Is it possible to read the data provided by an ObjectDataSource created in code behind? Take the following for instance: ObjectDataSource myObjectDataSource= new ObjectDataSource(); myObjectDataSource.SelectParameters.Add(new SessionParameter("createdDate", TypeCode.String, "FilterCreated")); How could you then get the rows from this? For example in a Dataset you would do something like: foreach (DataRow dr...

C# - Get a List data from a form to another

c#,list,listbox,datasource
I want to ask help about my problem. My problem is that I can't get the values of a List from another form and transfer it into a ListBox in another form.. I want to make the elements of the List to be the datasource of the list box. These...

Selecting a portion of data from a Data grid view c#

c#,datagridview,datasource
I am trying to select a portion of data from a datagridview with a mouse drag which is getting information from a text file, and then update the datagridview with this selected data. UPDATE: Initial error of being unable to clear the grid view is resolved, now when the selected...

How to get database configurations using data source object in java

java,database,jdbc,datasource
I'm stuck in a issue related to data source objects in java. I have set data source connection parameters in data source object(org.apache.tomcat.jdbc.pool.DataSource). I wants to get those parameters from data source object before i call getConnection method log meaningful debug info inside catch if it catches exception. Following is...

Cannot import correctly maven properties with PropertiesFactoryBean and PropertyPlaceholderConfigurer in spring

spring,maven,datasource,placeholder,jrebel
I'm facing problems with a jdbc dynamic properties configurer. I try to explain what exactly the problem is. When I do mvn clean install and right after I deploy the applications in my server (Weblogic 10.3.3), everything is correct, and all the applications work fine. But, every morning, when I...

swift UITableViewDataSource xcode 6.1

uitableview,swift,datasource
I'm trying to use UITableViewDataSource in my application.But when I add to UITableViewDataSource to viewControllerClass This is my code class SecondViewController: UIViewController,UITableViewDataSource{ And there is error what I am getting 'SecondViewController' does not conform to protocol 'UITableViewDataSource' self.messageTableView!.registerNib(UINib(nibName: "MessageCell", bundle: nil), forCellReuseIdentifier: "MessageCell") self.messageTableView!.rowHeight = UITableViewAutomaticDimension; self.messageTableView!.estimatedRowHeight =...

Can I use Oracle Stored procedure as a data source for Spotfire?

datasource,spotfire
Can I used Oracle Stored procedure as a data source for Spotfire ?

Finding DB info based on Datasource

coldfusion,datasource,coldfusion-9
I am looking to get the DB server and database info from the Datasource name. I have tried using <cfdbinfo> but it doesn't seem to have any of that information <cfdbinfo type="dbnames" datasource="#dsn#" name="dbdata"> <cfoutput> The #dsn# data source has the following databases:<br /> </cfoutput> <cfdump var="#dbdata#"> I am looking...

Smart client data source rebind

datasource,smartclient,listgrid
I created a smartclient data source and list grid. The autoFetchData is set to false and the list grid dataSource is set to my data source. When I do a search I set the data source dataURL to my url and call the list grid fetchData method. var url =...

spring-boot: auto configure transaction manager

spring,datasource,spring-boot
Seems like I am missing something: Automatically injecting a data source works, but injection of DataSourceTransactionManager fails. Dependencies: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.2.1.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>...

How to use select parameters in html tags in ASP.NET

c#,html,asp.net,datasource
<asp:SqlDataSource ID="SqlKitapDataSoruce" runat="server" ConnectionString="<%$ ConnectionStrings:DatabaseProjeConnectionString %>" SelectCommand="SELECT * FROM [Kitap] ORDER BY [satisSayisi] DESC" > </asp:SqlDataSource> <% for(int i = 0; i < 5; i++) %> <% { %> <div class="indexKitap"> <asp:ImageButton ID="<% %>" runat="server" ImageUrl="<% %>" /> <asp:Label ID="LblKitapAd" runat="server" Text="<% %>"></asp:Label> </div> I have this code and...

Passing information to a custom TableViewCell - Swift

uitableview,swift,delegates,datasource,tableviewcell
The problem is this: I tried many ways to pass down information to a ViewController1 from a SecondViewController. In this first ViewController1 I have a tableView, and in this tableView, each cell will receive an image and a label. What I want to do is, in the SecondViewController, I will...

How to parametrize datasource in the user control based on ASPxGridView?

asp.net,gridview,user-controls,devexpress,datasource
Summary: The same user control displays notes at different levels of ASPxGridView nesting. How to parametrize the user control? Details: I want to display a ASPxGridView for Projects. Each DetailRow for the project displays the nested ASPxGridView with Milestones and another ASPxGridView Notes at the same level (inside the same...

Oracle Data source configuration in MULE(AnyPoint Studio)

oracle,oracle11g,mule,datasource,mule-studio
I use this config for oracle database in Mule: <spring:beans> <spring:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="shutdown" name="Bean"> <spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/> <spring:property name="url" value="jdbc:oracle:thin:@192.168.28.129:1521:orcl"/> <spring:property name="user" value="username" /> <spring:property name="password" value="123456" /> </spring:bean>...

Adding SQL Server Compact Edition data source to Visual Studio?

visual-studio-2013,sql-server-ce,datasource
I want to add a SQL Server Compact edition in my project in Visual Studio 2013.4, but I don't have the data source in my list: Also, I don't have System.Data.Sqlce in my assemblies. How can I add SQL Server Compact data source to my Visual Studio?...

How to find the right file path in sdcard?

android,datasource,android-mediaplayer
This is the previous post. About mp3 player And the picture below is my A.mp3 path I find in my phone. ` mediaPlayer.setDataSource("/storage/sdcard1/A.mp3") File file =new File(Environment.getExternalStorageDirectory(),"A.mp3"); mediaPlayer.setDataSource(file.getPath()); There are two paths above..According the picture,it should be the first one,but it does not work. I push A.mp3 into the internal...

What does Tomcat do under the hood to give you an implementation of DataSource

java,tomcat,datasource,jndi
From JNDI Resources HOW-TO <Context ...> ... <Resource name="jdbc/EmployeeDB" auth="Container" type="javax.sql.DataSource" username="dbusername" password="dbpassword" driverClassName="org.hsql.jdbcDriver" url="jdbc:HypersonicSQL:database" maxActive="8" maxIdle="4"/> ... </Context> The type is javax.sql.DataSource and this is an interface. The code below retrieves an instance of DataSource and get a connection out of it. Context initCtx = new InitialContext(); Context envCtx...

Combobox SelectedValue Returning System.Data.DataRowView even Converted to String

c#,winforms,combobox,dataset,datasource
I am trying to change value of a TextBox control after the value of ComboBox changes. My code returns System.Data.DataRowView on the first time ComboBox value changes. That is why I am getting an Object instead of the actual value on first call to my combobox. private void radioButton2_CheckedChanged(object sender,...

@EnableJpaRepositories will not work with JPA Data repository

datasource,spring-boot,spring-data-jpa,spring-jpa
I'm trying to run Spring Boot with two data sources. So far so good, but the problem occurred when I tried to use Spring JPA Data. SimpleJPARepository do not reflect the transaction manager set by @EnableJpaRepositories( basePackages = "cz.data.external", entityManagerFactoryRef = "externalEntityManagerFactory", transactionManagerRef = "externalTransactionManager") It seems it still uses...

Multiple data source and schema creation in Spring Boot

spring,hibernate,jpa,datasource,spring-boot
I'm using Spring Boot. I finally managed to setup two data sources, but now I'm facing another issue. with two data sources in place spring.jpa.hibernate.ddl-auto=create seems to stop working in my spring boot application, only spring.jpa.generate-ddl=true do the job now I can not manage to select the auto-creation strategy for...

Grails 2.4.4 Multiple datasources, separate drivers, IntegrationSpec

sql-server,grails,datasource,integration-testing
I am attempting to use multiple datasources in a Grails 2.4.4 project. According to the docs, this should be possible: http://www.grails.org/doc/2.4.4/guide/conf.html#multipleDatasources My primary dataSource (the one I want to use for all domain classes) is using H2 at the moment, as configured by the default DataSource.groovy configuration. My second, read-only...

Using datasource defined in blueprint in java to access oracle db

java,oracle,database-connection,apache-camel,datasource
Below is my datasource <bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="close"> <property name="URL" value="jdbc:oracle:thin:@${host}:${port}:${dbname}"/> <property name="user" value="${user}"/> <property name="password" value="${pass}"/> </bean> <service ref="dataSource" interface="javax.sql.DataSource"> <service-properties> <entry key="osgi.jndi.service.name" value="jdbc/oracleds"/> <entry key="datasource.name" value="OracleDS"/>...

Sitecore How to Get Control's Data Source Value

sitecore,datasource
Is it possible to get __Rendering control's template field value on content item? Especially, I'd like to get "Data Source" field value defined in control on page item, like below screenshot. As shown in screenshot, I have some controls in page item and I'd like to get control's "Data Source"...

Database connections not closed after idle-timeout in wildfly Datasource

java,datasource,wildfly,wildfly-8
I have an application running under wildfly 8.1 The database connections used in the applications are taken from a Datasource defined in standalone.xml file. Problem: I don't know why but the Connection from the Pool never goes Idle and are released. Eventually the Pool gets filled will all active Connection...

Sitecore DataSource Query in Template

sitecore,datasource,sitecore7
How to write a query in template's DataSource to generate the path of item? If I write a query in DataSource field and a page uses the template, the datasource value will be the item's path as dynamic datasource, like the screenshot. ...

DataImportHandler DIH for FileSystem DataSource

solr,datasource,dataimporthandler,dih,lucidworks
I have a fileSystem datasource, and i have created a dataconfig for it to run DIH the dataconfig is <?xml version="1.0" encoding="UTF-8"?> <dataConfig> <dataSource type="FileDataSource" /> <document> <entity name="pdf" processor="FileListEntityProcessor" baseDir="/path/to/my/pdf" fileName=".*pdf" newerThan="'NOW-3DAYS'" recursive="true" rootEntity="false" dataSource="pdf"> </entity> </document> </dataConfig> and when i run the DIH, it gives Indexing completed. Added/Updated:...

How to get given connection is xa or non xa for given data source?

java,datasource
Using this code I am unable to get connection is xa or non xa DatabaseMetaData dbmd = con.getMetaData(); dbmd.getDriverName(); System.out.println("DriverName - "+dbmd.getDriverName()+"DriverName class - "+dbmd.getDriverName().getClass() +"DriverName class name - "+ dbmd.getDriverName().getClass().getName()); System.out.println("DriverVersion - "+dbmd.getDriverVersion()); System.out.println("MultipleTransactions - "+dbmd.supportsMultipleTransactions()); System.out.println("Transactions - "+dbmd.supportsTransactions());...

Reload ListView not Working React Native

listview,datasource,ecmascript-6,react-native
Re-phrasing my Question... (Tested with separate class) I am trying to reload listview with random array on a button press. But it's not working! Trying to do refresh datasource this with following LOC: _buttonPressed() { this.setState({ dataSource: this.state.dataSource.cloneWithRows(this._randomArray()), }); } _randomArray() { var jsonRes; switch(this.getRandomInt()) // number returned is valid....

How to specify SQL Server database instance name on XA datasource in JBoss EAP 6?

sql-server,datasource,jboss-eap-6,xa
Connection properties for XA datasources in JBoss EAP 6 are configured in XA properties tab, e.g. using the ServerName, DatabaseName and PortNumber properties. How to specify the SQL Server database instance name I want the data source to connect to? In jtds I use the pattern: jdbc:jtds:sqlserver://@ServerName/@DatabaseName;[email protected]

DataTables ajax requires explicit json collection name for the returned datasource?

datatables,asp.net-ajax,datasource
I recently ran into a problem when implementing the ajax functionality of jquery DataTables. Until I actually gave my json object collection an explicit name I couldn't get anything to display. Shouldn't there be a default data source if nothing named is returned? Client Side control setup (includes hidden field...

How to establish database connection by using dataSource in Weblogic

java,jdbc,weblogic,datasource
I need your help in establishing the connection to the weblogic dataSource. Earlier in the java bean, I am using the below code to establish the connection to the database: PreparedStatement ps = null; Connection con = null; try { con = DriverManager.getConnection("jdbc:oracle:thin:@xx.xx.xx.xx:1521:xxx", "hr", "hr123"); sql = " select *...

Weblogic datasource test connection on startup

testing,connection,datasource,weblogic-10.x
We have multiple data sources in our weblogic(10.3.5) connecting to different DB servers (we have quite a few DB servers). If any one of the DB server is down or the DB password changed/expired, the complete managed server is going to admin state. I think this is because weblogic is...

Winform Combobox with DataSource as List

c#,winforms,combobox,datasource
This may be a very simple question but I realized I could not get it work. I have a Winform combo box with datasource as a List<int> combo.DataSource = intList; What do I put for .DisplayMember and .ValueMember in order to simply have a list of integer values? Not setting...

Sitecore How to Get Item's Parent DataSource for Specific Control

inheritance,sitecore,datasource
I have a template with navigation control with EMPTY datasource in layout detail. Based on this template, I created a item (A) and updated Nav's datasource in the item's (A) layout detail. If I create an sub-item (B) under the item (A), is it possible to get its parent's Nav...

How to populate a ListBox with DropDownList Text using ASP.NET C#?

c#,asp.net,drop-down-menu,listbox,datasource
I have an Access database with four different headers: BUSINESS AND FINANCE, COMPUTERS, TECHNOLOGY, EDUCATION. I have connected it to a ListBox using an asp:AccessDataSource, and it is showing up perfectly. I am now trying to set it that when i select an option in a DropDownList (either Business and...

Java EE using Datasource without lookup method

java,datasource,code-injection,web.xml
I'm trying to use a Datasource (Database) in my program using JNDI. I got it to work partially but not like I want it to work. I want to inject the JNDI Resource, but it does not work properly. It does not work, if I use the annotation. @Resource(name="jdbc/crmv1") DataSource...

How can I remove more than one item from a listbox?

c#,listbox,datasource,windows-ce,invalidoperationexception
This is really getting annoying; or, to be honest, it became quite annoying a good while back. Programmatically removing items from a listbox should be pretty straightforward, yet it seems everything I try ends up the same: with an exception. This time it's "InvalidOperationException". In context (excerpt of log file):...

UITableview delegate and datasource called twice

ios,objective-c,delegates,tableview,datasource
I struggle with tableview datasource and delegate methods. I've a tableview if user navigate to that table view controller I'm calling web service method which is block based service after the request finished successfully reloaded tableview sections but tableView:cellForRowAtIndexPath:indexPath called twice. Here's my code. viewDidLoad [[NetworkManager sharedInstance].webService getValues:self.currentId completion:^(NSArray *result,...

Selecting Data from datagridview and re-inserting selection c#

c#,datagridview,datasource
I am trying to select a set of the rows from a datagridview and update it on a click of a button to display only the selected information in the same view, here is the code I have currently: private void btnUpdate_Click(object sender, EventArgs e) { List<DataGridViewRow> rowCollection = new...

DataSource connections not getting released

spring,datasource,spring-batch,apache-commons-dbcp,transactionmanager
I am using DataSource and DataSourceTransactionManager spring beans and wiring them into JobRepository bean. Shouldn't one of these be lifecycle aware or have a close function to close the connection once my spring application is closing. My process is hanging unless I manually call DataSourceUtils.releaseConnection(...) before exiting. Am I missing...

Sharepoint RDL report referring a new cube in the SSAS DB fails to execute the query to a shared data source

sharepoint,reporting-services,datasource,cube,rdl
A shared data source, already present in our SharePoint server, - works fine for other old reports, which refer old Cube in the same Analysis Services DB. I don't get, why this new SSRS report using new Cube in the same initial catalog on the same server does not work...

How to test DAO with DataSource in Java Web Application?

java,unit-testing,datasource,jndi,dao
I'm doing my project using Tomcat 7, JSP, Servlets, Log4j and MySQL. I've googled this question for hours with no proper answer. How can I test my DAO's using DataSource and JUnit ? I found this article recently, but don't know how to configure it for my purposes and don't...

Call DataSource method in awakeFromNib

ios,objective-c,datasource,awakefromnib
So the question is like this: I subclass 2 classes, which is UIView(name: Menu) and UIViewController(name: MainController). In Menu, i used xib file to create it layout. In MainController, i added Menu as subview like this and comform to protocol in Menu. SliderMenu *sliderMenu = [[[NSBundle mainBundle] loadNibNamed:@"SliderMenu" owner:self options:nil]...