datasource

Remove duplicates from combobox which is bind to dataset

試著忘記壹切 提交于 2019-12-24 01:14:51
问题 I have a xml file in my project. I am reading the file through the below code in to combobox cbProduct . The problem is that the cbProduct is displaying duplicate text values. How to make them distinct? I have gone through some links but there way of approach is not related to dataset. I implemented the below code: DataSet ds = new DataSet(); ds.ReadXml(@"..\..\stock.xml"); cbProduct.DataSource = ds.Tables[0]; cbProduct.DisplayMember = "productname"; optional : If you have time it will be

Facing error both DataSource and And DataSourceID are defined on GridView Entity Framework

点点圈 提交于 2019-12-23 23:50:56
问题 i am using entity frame work and want to bind data on Grid View but facing problem i have code that i am pasting as well as attaching screen shot i also saw answer regarding this problem but not beneficial for me so any one have experience with this error must be appreciated. aspx.cs Code protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindGrid(); } lblMessage.Text = ""; } void BindGrid() { using (GapEntities1 context = new GapEntities1()) { if (context.Organizations

Accessing Datasource from Outside A Web Container (through JNDI)

こ雲淡風輕ζ 提交于 2019-12-23 22:29:19
问题 I'm trying to access a data source that is defined within a web container (JBoss) from a fat client outside the container. I've decided to look up the data source through JNDI. Actually, my persistence framework (Ibatis) does this. When performing queries I always end up getting this error: java.lang.IllegalAccessException: Method=public abstract java.sql.Connection java.sql.Statement.getConnection() throws java.sql.SQLException does not return Serializable Stacktrace: org.jboss.resource

How to use a TcxCustomDataSource in a TcxExtLookupComboBox?

白昼怎懂夜的黑 提交于 2019-12-23 18:15:47
问题 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 here: unit Datasource; interface uses Classes, IBQuery, SysUtils, cxCustomData; type TSearchItem = class private BoldID: String; Display: String end; TMyDataSource =

Create a libreoffice text-based datasource and set settings with java

半腔热情 提交于 2019-12-23 17:38:39
问题 I need to create a LibreOffice Text-based-Datasource within Java. My needs are to deliver the user an .csv file with a header row and n-many value rows. This csv File is the datasource to execute a mail merge job. The execution of the mail merge job already works perfectly if I create the datasource manually with the LibreOffice wizard for creating new databases. In my environment I'm not able to create a database for every user who use the application. I'm already able to create a new

Spring Boot JNDI resource-ref

不打扰是莪最后的温柔 提交于 2019-12-23 12:35:01
问题 I need to declare a resource-ref in a Spring Boot application that will be deployed as war file. This is needed in order to access the database. In traditional webapps, this is added to the web.xml. How can I achieve this in a Spring Boot way? Thanks, Benjamin 回答1: We got that resolved a while back, so I thought, I'd post this here. src/main/webapp/WEB-INF/web.xml <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http:

Silverlight that degrades to html

非 Y 不嫁゛ 提交于 2019-12-23 09:53:06
问题 I am interested in creating a website entirely in silverlight (personal reasons) but I don't want people who don't yet have silverlight (a good many) to have to install a plugin just to view my site. The solution I am leaning towards is to start with a flat html/css version of the site and present the silverlight version only to people who already have it installed. My question is this: Is my reasoning misguided. Is there a better way to go about this. And what is the best way to avoid having

Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery) is not supported Entity Framework 5

你。 提交于 2019-12-23 09:15:37
问题 I have a devexpress GridControl for which I am setting it's datasource like so: var regs = (from vcap in context.chaps select vcap); gridControl1.DataSource = new BindingList<chaps>(regs.ToList()); But when I use the grid, rows I add or delete don't get saved, only changes to the initial rows get saved. If I do this: gridControl1.DataSource = context.chaps.Local; I don't get any rows, and AddNewRow doesn't even add a new row visually. If I do this: gridControl1.DataSource = context.chaps

Jasperreports - two subreports, same jrxml, same pojo datasource

家住魔仙堡 提交于 2019-12-23 06:00:32
问题 I have a report created in jasperreports 2.0.4 using iReport. I have two subreports. These two subreports share the same jrxml. I'm passing the jrxml as the subreport's report expression in a parameter. I have this code for this parameter <parameter name="SUB_EXP" class="net.sf.jasperreports.engine.JasperReport"/> Everything works fine. The issue is with the two subreports datasource The datasource of these subreport comes from the SAME list of POJOs passed as parameter <parameter name="SUB

Using web.xml to get JSTL sql dataSource?

谁都会走 提交于 2019-12-23 05:08:20
问题 Attempting to get a dataSource for JSTL SQL operations, and it won't connect. In my web.xml : <context-param> <param-name>databaseJNDI</param-name> <param-value>jdbc/testDS</param-value> </context-param> What I'm attempting in my JSP file: <sql:setDataSource dataSource = "jdbc/testDS"/> I'm attempting to do this and failing in order to avoid hard-coding the database credentials into the page. The database is running, but I don't know enough about JSTL to tackle this on my own right now. It is