datasource

SQL generated by LINQ for logging

Hi all. Plz help. I have this query and its result implements IEnumerable. RoutesEntities routesModel = new RoutesEntities(); LocalesEntities localesModel = new LocalesEntities(); var routesQuery = from rs in routesModel.Routes.ToList() join ls in localesModel.Locales.ToList() on rs.LocaleID equal...

How to set SelectedValue of a List bound Combobox with an item not available in the List

I have a List with objects of class Person. I have set the list as a DataSource of a ComboBox. Now when I set the SelectedItem of the ComboBox a new instance of class Person, the SelectedItem never sets. Why it happens? public class Person { public Person(string name, int age) { Name = name; ...

Gridview with different template per datasource

I have a gridview that I would like to be able to bind to several sqldatasources, but still use template fields. Each datasource is different and would have different columns so I'm not sure how to go about this. Is it possible to define a set of template fields or overlying template per datasource? ...

Sql Error - .NET 4 - Simple desktop application

Windows 7, Visual Studio 2010, tagert framework = .NET 4 Client Profile I'm creating a desktop application, completely local, it doesn't access servers. For that i'm using a .MDF SQL Server database and LINQ. Everything works fine on my machine, however, when i deploy it, the following error is shown when i try to connect to the databa...

self.tableView.delegate = self and self.table.dataSource = self memory leak

Hello everyone, I have following codes, which have memory leak on device, could you please kindly help check it? Thanks. @interface NewsListViewController : UIViewController<UITableViewDataSource, UITableViewDelegate> { @private UITableView *tableView; NSFetchedResultsController *fetchedResultsController; ...... } @property (non...

Migration Apache Tomcat 6 project with context.xml to GlassFish

Hi. I have application originally developed for Tomcat. There is context.xml file in META-INF using for creating datasource. As was mentioned here glassfish has support of context.xml file from Tomcat. I tried to migrate this app to Glassfishv3. But I still, my app (actually Hibernate) can't find jdbc datasource resource via jndi. There ...

Difference between Database and Data Source

What is the difference between Database and Data Source? ...

Designer-editing DataSource property of a DataGridView within a UserControl

I have a custom UserControl that contains several child controls, amongst which is a DataGridView. I don't want to EnableDesignMode for any of the child controls, but instead have exposed and serialized their properties as needed. I'm stuck on DataGridView's DataSource property. Do I need to make a custom UITypeEditor and use reflection...

Framework for polling and storing results of external data sources

We have a need to poll a number of external data sources. The data sources initially are SOAP web services, but they might be in future RESTful web services, flat files, or other things. The polling period needs to be configurable (ideally per-data-source). The returned data initially is XML, but in future it might a line from a file ...

ASP.NET gridview dynamic changing cell background

I have a griview which is bounded to a sqldatasource and changed dynamically. How do I change the background cell color based on the value? e.g., 0-0.5 green, 0.5-1 red, sth like that. <asp:GridView ID="grid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource3"> ...

Filling a GridView when datasource is a ITypedList

Hello, I am trying to fill a GridView with data provided by a ITypedList. I have a Dictionary<string,object>, and the columns & values are inside. So if the dictionary has: "Name" : "Jack" "Age" : 20 The GridView will have 2 columns, Name and Age, and the values are Jack and 20. So, the main idea from which I started was the follow...

Handling DataAccessException for Spring JDBC

I am using a Datasource to log my audit information per user-request. The bean is defined in a springContext.xml sourced during initialization. Whenever the DB is down, the bean initialization fails with following error: DataAccessException. What I want to do is continue after this exception(since it is ok not to be able to log). How d...

Spring JDBCTemplate other MySQL datasource than apache commons?

I am using Spring JDBCTemplate to perform SQL operations on an apache commons datasource (org.apache.commons.dbcp.BasicDataSource) and when the service is up and running to long, i end up getting this exception: org.springframework.dao.RecoverableDataAccessException: StatementCallback; SQL [SELECT * FROM vendor ORDER BY name]; The last ...

AX report: off by one error with joined datasources

We want to build a report in Microsoft Dynamics AX 2009 to show all employees that worked on a production order. Into the datasources for this report we drag-n-dropped the ProdTable (pt) which is inner joined by ProdID and DataAreaID to the ProdJournalRoute (pjr) which is inner joined by EmplID and DataAreaID to the EmplTable (et) where...

Problem with query as a new data source in Cognos PowerPlay

Normally you can add a query as a new data source in Cognos PowerPlay (I'm running PowerPlay version 7.3), but when I try to do so I cannot select any queries from my Access database. The dropdown menu which normally shows the existing queries in the database is empty. When I add a table as a new data source it works fine, and all the ta...

Spring DataSourceInitializer splits trigger ins sql by ; delimiter

We use org.springframework.batch.test.DataSourceInitializer class in order to init DB on basis of .sql scripts. Init was failed,after trigger had been added to .sql. After debugging,the cause of error while was found here: try { scripts = StringUtils.delimitedListToStringArray(stripComments(IOUtils.readLines(scriptResource.getInputStr...

Try to make a Connection Pool with Tomcat 6

Hi there, I really am having a nightmare configuring Tomcat to set up a connection pool. I have done a lot of reading of various forums and the documents from Tomcat but am having to ask here as a last resort. This is the first time I have tried to get connections from the container so it's all new to me. I have been having NameNotFoun...

YUI 3: Setting request headers with DataSource.IO

I need to retrieve a JSON resource which requires HTTP Basic authentication. Therefore, I need to set a request header for a DataSource.IO object. I see that the IO utility itself supports a header key in its configuration object. However, since I'm new to YUI, I can't figure out how to set this configuration value through the mediation...

Cannot create PoolableConnectionFactory (Access denied for user ''@'localhost'

Hi there, I have been trying to set up a DatabaseConnectionPool for a web app for the last couple of days with no success. I have read the relevant sections of the Tomcat docs and a great deal around the subject and think I'm doing everything right, but obviously not because I keep on getting the following error: Cannot create Poolable...

Using JNDI to access a DataSource (Tomcat 6)

Hi there, I have been trying to set up a Database Connection Pool for my test webapp just to learn how it's done really. I have managed to get a DataSource object connected to my database which supplies me with Connection objects now, so that's good. I must admit I don't really know exactly how it's working. I wrote some test code to s...