datasource

Use linq datasource to perform linq query and provide statistics about linq datasource

I have a gridview bound to a linq datasource and I would like to provide statistics about the gridview, such as you have 10 rows, 5 are of this type column and 5 are of this type, etc. Is there an easy way to get the linq query out of the linq datasource? I can access the where clause and the parameters, but I don't know how to transfor...

Struts- Best way to connect to Mysql in struts 2?

Unable to determine what is the best way to connect to mysql database in struts.. We can always use DriverManger and Class.forName() to connect. DataSource interface - but this has problems I am getting compliation error for DataSource dataSource = (DataSource)context.getAttribute(Globals.DATA_SOURCE_KEY); or when Action.Data_SOURCE_K...

Confusion with Grails development database

I'm staring a toy project with Grails, but I'm having some trouble regarding the HSQLDB database. My DataSource.groovy file is the default one: environments { development { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop','update' url = "jdbc:hsqldb:mem:devDB" loggin...

Java Datasource Management via WebApp

Currently, we store datasource definitions in the Tomcat container inside server.xml and expose environment variables through context.xml. Any time we change an environment variable or datasource, it requires a server restart for those changes to be live. Is there a way that we could create a web application to manage these things? Ins...

Using Maven to Deploy on Embedded Tomcat with a Datasource

I have a multi module maven web application, which uses hibernate. I use the tomcat:run goal in order to run it on the embedded tomcat server of maven. Everything works fine so far. But now I need to switch from an explicite jdbc configuration in the hibernate.properties to a datasource. I did the following: changed hibernate.propert...

How to get total row count and why is the GridView's DataSource property null in the DataBound event handler?

I wanted to get the total row count in a GridView's databound event handler, so I tried the following: protected void grid_DataBound(object sender, EventArgs e) { GridView grid = (GridView)sender; DataSet data = grid.DataSource as DataSet; if (data == null) return; int totalRows = data.Tables[0...

Three20 UITableViewCellStyleValue1

How do I create an item in my datasource using a cell that is UITableViewCellStyleValue1? Do I have to create my own custom cell to do it? I don't see anything in the sample catalog. thank, howie ...

Why is a datasource not created for one of our EF models?

We have a Model project with 4 EF models in it. Notice the properties folder starts out empty. With the Model project selected I open the data sources window. Three datasources are created and displayed. You can see how it creates a .datasource file for each model, except the eFinancials model. Any ideas why this happens. There i...

datasource of datagridview doesn't change after sorting

well i have a program and i developed it by C# and WPF with Visual Studio 2010 , i have an window that contains a windows form datagridview (because of use of .Net Framework 3.5 for windows 7 support) i want to user can sort data in datagridview in any style that he/she wants and finally he/she can press enter on a cell of datagridview ...

Why Invalidate() should be called outside the control then it can work ?

I am using C# + winforms to develop software. I have a UserControl which contains several DataGridView datagridview1.datasource = from p in dc.doctor select p; I use linq to sql to populate the dataGridView with dataSource, because I need to refresh the datasource to update the records, so I create a new dataContext and assign the d...

UITableView: programmatically set the data source

In my iPhone app I have a UIViewController that has a UITableView and another UIView, in its xib file, the view of the xib contains both the UITableView and the other UIView. Both view are linked as IBOutlets to the appropriate views in the xib file. When I want to set the data source programmatically for the UITableView I create a metho...

the event log file is full.

the event log file is full. when i connect my datasource im getting this error. i cannot able to connect my datasource. how to do this.how to solve this..pls help ...

Configure JDBC oracle specific property v$session.program using Jboss and JPA (hibernate)

I'd like to set the v$session.program Oracle property in order to have information available in the session table. I'm using JPA with a jndi XA datasource created with an oracle-xa-ds.xml deployed in the deploy folder of Jboss, and therefore I haven't access to the constructor of the Connection. I have access to the Connection object, in...

How can I bind an asp:chart (from microsoft) to a Dictionary<string,string>?

I'm using the MS chart controls for ASP.Net and I can't figure out binding. Does any one have information on how can I bind an asp:chart (from microsoft) to a dictionary? ...

How to use a TcxCustomDataSource in a TcxExtLookupComboBox ?

I use a TcxExtLookupComboBox from Devexpress and try to implement a custom datasource. I have set the customdatasource like this: procedure TMainForm.FormCreate(Sender: TObject); begin fDataSource := TMyDataSource.Create; cbotestSearch.Properties.View.DataController.CustomDataSource := fDataSource; end; TMyDataSource is defined h...

Configuring Grails to use own DataSource implementation or to proxy the standard DataSource

In an application I want to use my own implementation of javax.sql.DataSource that extends the standard org.apache.commons.dbcp.BasicDataSource used by Grails and adds the functionality to set the client identifier based on the currently logged in user at the Grails application. What is the best way to change the underlying javax.sql.Da...

How to use encrypted password in apache BasicDataSource?

At present i am keeping the password [ unencrypted ] in a property file. This password get placed as is in the configuration xml using ant. [ The configuration xml is for datasource, it is creating the object of dbcp.BasicDataSource ] Now, is it possible that after the ant target the password is copied in encrypted form. Heard the Ja...

JBoss database connection pool auto-commit behavior

We are using JBoss 4 and Oracle with a JNDI datasource configured via JBoss datasource XML file. Recently realized that all connections acquired from the datasource by default has the auto-commit property set to true. However, we rely on Oracle stored procedures and want to control the commits within the stored procedures. We use plain...

I have a 2d (n x n) string array in C#, how do I get it ouputted to a webpage dynamically (Tried DataTables/Binding, etc...).

Hello, I have an n by n String array that needs to be outputted to a web page, I have found some solutions that require many many (read: many) lines of code (usually converting it to a DataTable then binding to a GridView). And almost all of these solutions will not even work for the dynamic nature of my arrays (I do not know ahead of ...

How do I turn a flat file of data into a queryable data source

I generate files, lets call them .dwrf files, which contain a significant amount of data. Currently we export those to .CSV and the resulting files are large (2GB+). I would like to cut out the export process and make the contents of a .dwrf file queryable directly from Excel or other applications. What I would like to do is write a ut...