datasource

How can I spoof a jndi lookup for a datasource without a app server

I want to test some new functionality which is part of an internal web app. This new code uses a database connection normally provided by an app server (tomcat). I do not want to recreate the entire web app on my local machine to test the new code, since I only need to run one function. Does anyone know how I can 'spoof' a Context, or ...

How do I use JDBC's data source?

I've tried researching how to use the DataSource method of connecting to a database but never could find out how. I know that a DataSource is first configured and registered to JNDI in an application that is separate from the user application, and all the user application will do is retrieve it using JNDI. What I don't understand is wher...

Problem with collection class using as datasource in asp.net

Hello friends, I am using collection class to work as datasource for gridview. Please download nopCommerce source from http://nopCommerce.com. I am following the same approach. I have created my providers and collection classes being used as datasources for gridview. The data is binding perfectly. The problem is that i have to customiz...

Usage / handling of non relational datasources in .NET applications

Which .NET (data / middel-tier) technologies / framworks can / should be be used, if the datasource isn't a classical relational database, but a service or a remote function call or whatever ? Are technologies like WCF RIA services or WCF DATA services (OData) suitable for handling non relational datasources. ...

Instantiating a JdbcTemplate from a java.sql.Connection

Hi! I want to obtain a JdbcTemplate in my Java code. I've already got a working java.sql.Connection. To create a new JdbcTemplate it would normally need an instance of the javax.sql.DataSource interface. Is it somehow possible to obtain a new JdbcTemplatefrom an existing java.sql.Connection? ...

Visual Studio 2010: Data Sources window in ASP.Net project?

Hi, I'm trying to add a Sharepoint site as a data source on a web project in VS2010; so I can generate the appropriate DAO code to interact with the site's data over REST. However, neither the data sources window, nor the Add Data Source Configuration Wizard seem to be available to an ASP.Net Web project. Is there something else I shoul...

how to bind a datasource with field parameters when filled?

i want to bind a gridview to an objectdatasource that have some fieldparameters. i would like to do the databinding when the fields are filled, suppose i have a 'show' button... i would like to know if it is possible to databind in an specific event... as far as i know the databing is automatically done... can this be controlled? i'd a...

Data Source For Oracle

I am using 64-bit version of windows 7. The only option I have in it, for creating Data SOurce is for Microsoft SQL server 2005. Hence, I am not in position to create ODBC for oracle. Is there any other way by which I can create the ODBC Data Source. I need the same for JDBC. Thank You. ...

How to get grails datasource createdb property in bootstrap

I'd like to make my Bootstrap dependant on the createdb property in the grails DataSource.groovy file. When the setting is 'create', new Master Data should be generated, if the setting is 'update', none. I've found GrailsDataSource in the Grails API which also has a method getCreateDb, but I don't know how to access it from the Bootstra...

Resource DATASOURCE rolled back in cleanup of LocalTransactionContainment

Im working in a WebSphere Application Server 7, JDK 1.6 and Oracle 11g. Im always receiving this error when using an ejb. [7/1/10 17:12:28:770 BOT] 00000013 LocalTranCoor W WLTC0033W: Resource jdbc/oraDS11 rolled back in cleanup of LocalTransactionContainment. [7/1/10 17:12:28:773 BOT] 00000013 LocalTranCoor W WLTC0...

How to set zeroDateTimeBehavior on JNDI DataSource without using URL ?

In this stackoverflow question the poster implies that you can set zeroDateTimeBehavior="convertToNull" as an attribute on the tag. Does anyone know if this should be possible? All the docs I've looked at say that you can only add this property on the database connection url. I'm actually looking for a way to set this property on the ...

Entity Framework 4 column conversions - SQL Server - SQLite

I have a SQL Server database and Entity Framework Model setup with POCO objects, this is working fine. However, I have also created a Sqlite database from the SQL Server database (using a simple conversion process). So I have created another EDMX file for the SQLite database, which I would like to use my existing POCOs generated from t...

How to set a role in DataSource from Spring

Hi, I have to use a default Role so that after the datasource has been defined and connected that role will allow me to use select statements. I know its little weird but I have to do it due to security concerns. So here is the code in my Spring's applicationContext.xml: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSou...

Listbox clears all items during datasource change

When I change the datasource of my Listbox all items are cleared, when loading new data into this Listbox it stays clear. I have another ListBox right new to this one with the same refresh code but that one refreshes perfectly. private void RefreshContacts() { this.ListContacts.DataSource = null; this.ListContac...

Hibernate datasource trouble

Hi I have a mysql database from which i got netbeans to generate some entities. Netbeans also automatically generates the persistence.xml, sun-resources.xml and hibernate.cfg.xml file. I am new to hibernate so I don't know much about setting it up. All I know is that right now it isn't working and I have tried loads of things which does...

Dynamic Pop-up Menu (Select box) in Dashcode

I'm trying to use Dashcode to create a drop-down list for an iPhone Web app. I want the list to be set dynamically based on a data source, and for the selected item to be set by a separate data source. I've figured-out how to set the parameters on the data source to get it to alter the contents, and have the data in valid JSON, but can'...

How do I populate XAML Listbox Items from a method that requires a single argument?

So I have a Listbox: <ListBox Grid.Row="0" Grid.Column="1" Grid.RowSpan="2"> //<----Item's Data Source Method Call Here? <ListBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel Orientation="Horizontal" IsItemsHost="true" /> </ItemsPanelTemplate> </ListBox.ItemsPan...

Disallow Microsoft.Reporting from evaluating all properties on an object datasource

Using WPF and MVVM, we have a lot of very useful ViewModels and business objects for reporting. When designing a specific report (so far they're very simple) I'll add the BO/VM as a data source so the report can pull the properties from there instead of having to create and maintain an actual DataTable of properties for each BO/VM. The...

edit databinded labels

I am creating a C# based windows form application. I have a dataview and I have binded various labels to this dataview. The problem is that all the text in the label comes directly through the binding. However I need to format the data before displaying it. I need to display the text in RED if the label value is >0 and the text in GREE...

Using different Datasources for different configurations in SSRS

Hi All I'm wondering if it's possible for SSRS reports to use different datasources depending on what configuration is being used? So, for example, if I'm using the 'DebugLocal' configuration, the reports would use a different database than if I'm using the 'Production' configuration. Thanks Bryan ...