Search Results

Search found 3307 results on 133 pages for 'distributed datasource'.

Page 77/133 | < Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >

  • Using MicrosoftReportViewer with Web Forms programmatically

    - by user283897
    Hi, I'm repeating my question because the prior one under this topic was lost. Could you please help me? I want to use MicrosoftReportViewer for Web Forms so that the DataSource be set programmatically. There is some sample code on the Internet for Windows Forms but I haven't found anything for Web Forms. For example, here is some code I've tried to use. It gives no errors but nothing is displayed. How should I modify the code to display a table in the ReportViewer? Imports System.Data Imports Microsoft.Reporting.WebForms Partial Class TestReportViewer Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load CreateReport() End Sub Sub CreateReport() Dim dt As DataTable Dim rpt As ReportDataSource dt = New DataTable("Sample") With dt .Columns.Add("No", GetType(Integer)) .Columns.Add("Name") .Rows.Add(1, "A1") .Rows.Add(2, "A2") .Rows.Add(3, "A3") .Rows.Add(4, "A4") .AcceptChanges() End With rpt = New ReportDataSource rpt.DataMember = "Sample" rpt.Value = dt rpt.Name = "test" With ReportViewer1 .LocalReport.DataSources.Add(rpt) .DataBind() .LocalReport.Refresh() End With End Sub End Class

    Read the article

  • configure apache with sql

    - by Chava
    Hello, I am newly using Apache Tomcat6.0 I am unable to access sql database through my jsp and getting java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver Tried steps at http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html downloaded drivers mysql-connector-java-5.1.9 and mysql-5.0.85-win32 na dkept in tomcat\lib modified web.xml with context details but this didinot help me. Please suggest and provide steps if possible. JSP code Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); Connection con=DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:8080"); I am using sql server WampServer without a password and created databse and table successfully.

    Read the article

  • Hibernate database connection configuration

    - by Alvin
    We have 2 different server environments using the same Hibernate configuration. One server has JNDI support for datasource, but the other does not. Currently the Hibernate configuration is configured to use JNDI, which is causing problem on the server that does not support JNDI. I have also tried to put the direct JDBC configuration together with JNDI configuration into the configuration file, but it looks like hibernate always favors JNDI over direct JDBC configuration if both exist. My question is, will it be the same if both JNDI and connection_provider configuration both exists? Will Hibernate still use JNDI over connection_provider? Or is there any way to change the precedence of the database connection property? I do not have access to the server all the time, so I thought I do ask the question before my window of the sever time. Thanks in advance.

    Read the article

  • Comparing Page.User.Identity.Name to value in sql Table

    - by Peggy Fusselman
    First, I am SO sorry if the answer is out there. I've looked and looked and feel this is such a simple thing that it should be obvious. I'm wanting to make sure only the person who added an event can modify it. Simple! I already have a datasource that has event_added_by as a data point. It is populating a FormView. SelectCommand="SELECT * FROM [tbl_events] WHERE ([event_ID] = @event_ID)" And I have Page.User.Identity.Name. How do I compare the two? I can't pull the value from the label in the FormView so I need to find another way. if (!IsPostBack) { string uname = Page.User.Identity.Name; string owner = ""// this is where I need to grab the value from dsEvents; if (uname != owner) { //Send them somewhere saying they're not allowed to be here } } TIA for any help!

    Read the article

  • How binding each column to other data source..

    - by liran
    hello, i have datagridview and Object data source : public class Data { public general general { get; set; } public Person Person { get; set; } } public class general { public int Id { get; set; } public int Name { get; set; } } public class Person { public int Tag { get; set;} } } i want to bind first column to general.id and second to person.Tag, how i do this, its is possible to bind each column to other dataSource without add any code in data, person or general classes. maybe need to add column manually? Thanks

    Read the article

  • Why does my ASP.NET user control's field value reset to 0?

    - by Innogetics
    In the code below, why does the groupId value reset to 0 during Page_Load event? Maybe perhaps the AccountGrid created with groupId 1 is not the one that is loaded to the page? public partial class AccountGrid : System.Web.UI.UserControl { int groupId = 0; public AccountGrid() { } // an aspx page creates AccountGrid with "new AccountGrid(1)" public AccountGrid(int groupId) { this.groupId = groupId; } protected void Page_Load(object sender, EventArgs e) { DataAccessFacade facade = new DataAccessFacade(); // groupId resets to 0 here... grdAccount.DataSource = facade.GetAccountsByAccountGroupId(this.groupId); grdAccount.DataBind(); } } In my page, I have public partial class Default : System.Web.UI.Page { public Default() { } public void Page_Load(object sender, EventArgs e) { ctlAccountGrid = new Views.Controls.Account.AccountGrid(1); // should I do databind? ctlAccountGrid.DataBind(); } }

    Read the article

  • Making GridView Respond to 2 Drop Down Lists

    - by raziiq
    Hi there. I have got 2 Drop Down Lists on my Form and 1 GridView. I want GridView to display the data according to selection from the Drop Down Lists. For Example, One Drop Down List contains Names and other contains Dates. Both the Drop Down Lists can post back. So if i select a name from 1st Drop Down list, the Grid View should show all the results according to that Name. Similarly if i select the Date from the other Drop Down List , the Grid View should show the results according to the dates. But i cant figure out as how to bind Grid View to respond to 2 Drop Down List. BTW i am binding both the Drop Down Lists and the Grid View to the DataSource Objects, which is getting data from the database. Any Suggestions??

    Read the article

  • WPF partial binding to specific control

    - by Polaris
    I have a wpf form. Which contains labels and other controls. Whole form has concrete dataSource. I want labels in this form have another biding. only labels <Grid> <Label x:Name="label"/> <TextBOx /> <Label x:Name="labe2"/> <TextBOx /> </Grid>

    Read the article

  • connect perl with mssql

    - by Bharanikumar
    i have user id, password,databasename, datasource details, i want to connect perl with mssql server, i just used following snippet, but getting error, #!/usr/bin/perl -w use strict; use DBI; my $data_source = q/dbi:ODBC:192.168.3.137/; my $user = q/bharani/; my $password = q/123456/; # Connect to the data source and get a handle for that connection. my $dbh = DBI->connect($data_source, $user, $password) or die "Can't connect to $data_source: $DBI::errstr"; My Error DBI connect('192.168.3.137','bharani',...) failed: [Microsoft][ODBC Driver Manag er] Data source name not found and no default driver specified (SQL-IM002) at my sqlconnect.pl line 14 Can't connect to dbi:ODBC:192.168.3.137: [Microsoft][ODBC Driver Manager] Data s ource name not found and no default driver specified (SQL-IM002) at mysqlconnect .pl line 14. Information: my sql server present in another system, am just trying to connect with above details, plz tellme, i should crease DSN in my system, or anything i missed in my program

    Read the article

  • ArgumentException was unhandled Application.run

    - by user369758
    Hi I've been through many sites and can't seem to find an answer. I modified a view that was connected to a Datagridview connected through a tableadapter on a C# Winforms app and in order to "reconnect" I had to delete the tableadapter and reconnect it. This was to get rid of an error regarding Unique contstraints. So I fixed that and now the application launches but when I click on the tab that that grid is on I get: System.ArgumentException was unhandled Message="Cannot bind to the property or column Id on the DataSource.\r\nParameter name: dataMember" Source="System.Windows.Forms" ParamName="dataMember" StackTrace: at System.Windows.Forms.BindToObject.CheckBinding() at System.Windows.Forms.BindToObject.SetBindingManagerBase(BindingManagerBase lManager)......... I can't seem to find an answer to this problem. Can someone help me? Thanks

    Read the article

  • Spring & Hibernate SessionFactory - recovery from a down server

    - by MJB
    So pre spring, we used version of HibernateUtil that cached the SessionFactory instance if a successful raw JDBC connection was made, and threw SQLException otherwise. This allowed us to recover from initial setup of the SessionFactory being "bad" due to authentication or server connection issues. We moved to Spring and wired things in a more or less classic way with the LocalSessionFactoryBean, the C3P0 datasource, and various dao classes which have the SessionFactory injected. Now, if the SQL server appears to not be up when the web app runs, the web app never recovers. All access to the dao methods blow up because a null sessionfactory gets injected. (once the sessionfactory is made properly, the connection pool mostly handles the up/down status of the sql server fine, so recovery is possible) Now, the dao methods are wired by default to be singletons, and we could change them to prototype. I don't think that will fix the matter though - I believe the LocalSessionFactoryBean is now "stuck" and caches the null reference (I haven't tested this yet, though, I'll shamefully admit). This has to be an issue that concerns people.

    Read the article

  • How do I make a Java ResultSet available in my jsp?

    - by melling
    I'd like to swap out an sql:query for some Java code that builds a complex query with several parameters. The current sql is a simple select. <sql:query var="result" dataSource="${dSource}" sql="select * from TABLE " </sql:query How do I take my Java ResultSet (ie. rs = stmt.executeQuery(sql);) and make the results available in my JSP so I can do this textbook JSP? To be more clear, I want to remove the above query and replace it with Java. <% ResultSet rs = stmt.executeQuery(sql); // Messy code will be in some Controller % <c:forEach var="row" items="${result.rows}" <c:out value="${row.name}"/ </c:forEach Do I set the session/page variable in the Java section or is there some EL trick that I can use to access the variable?

    Read the article

  • Setting SqlParameter value automatically with DataGridView?

    - by johansson
    Is there a way to set a SqlParameter's value with DataGridView, if data-bound? For example: SqlCommand selCmd = CreateCommand("SELECT * FROM table1"); SqlCommand updCmd = CreateCommand("UPDATE table1 Set column1 = @column1 WHERE id = @id"); updCmd.Parameters.Add(new SqlParameter("column1"), SqlDbTypes.Int)); updCmd.Parameters.Add(new SqlParameter("id", SqlDbTypes.Int)); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = selCmd; da.UpdateCommand = updCmd; da.Fill(_dataTable); dgv.DataSource = _dataTable; Then somewhere later: da.Update(); How can I make sure it's getting the right column1 value that was edited and the right id for the row for the da.Update(); to work, otherwise it complains that I have not provided the value. Or if there's a better way, please advise. Thanks!

    Read the article

  • ReportViewer datadinding (WPF)

    - by user512150
    I have a rdlc file and I try to show it using report viewer control in WPF. My DataSource is called 'OfficeDataSet' and DataSet used in report is called 'Address'. I try to initialize report viewer (I put it in WindowsFormsHost) like this: private void PrepareReport() { reportDataSource = new ReportDataSource(); officeDataSet = new OfficeDataSet(); adapter = new AddressTableAdapter(); adapter.Fill(officeDataSet.Address); reportDataSource.Name = "OfficeDataSet_Address"; reportDataSource.Value = officeDataSet.Address; viewerInstance.LocalReport.DataSources.Add(reportDataSource); viewerInstance.LocalReport.ReportEmbeddedResource = "WpfApplication1.Reports.TestReport.rdlc"; viewerInstance.Location = new System.Drawing.Point(0, 0); viewerInstance.RefreshReport(); } but I got the message "A data source instance has not been supplied for the data source 'Address'". Anybody know what can be wrong with this code? (I'm totally new in WPF and Reporting Services).

    Read the article

  • dropdown list selected index changed

    - by KareemSaad
    I did my drop down list that get it,s values from database and when run the application it didnot work and compiler didnot see the code onselectedindexchanged="DDlProductFamily_SelectedIndexChanged" protected void DDlProductFamily_SelectedIndexChanged(object sender, EventArgs e) { using (SqlConnection Con = Connection.GetConnection()) { SqlCommand Com = new SqlCommand("SelectThumbByProductFamily", Con); Com.CommandType = CommandType.StoredProcedure; Com.Parameters.Add(Parameter.NewInt("@ProductCategory_Id", DDlProductFamily.SelectedValue.ToString())); SqlDataAdapter DA = new SqlDataAdapter(Com); DA.Fill(dt); DataList1.DataSource = dt; DataList1.DataBind(); } }

    Read the article

  • How to make DropDownList automatically be selected based on the Label.Text

    - by Archana B.R
    I have a DropDownlist in the GridView, which should be visible only when edit is clicked. I have bound the DropDownList from code behind. When I click on Edit, the label value of that cell should automatically get selected in the DropDownList. The code I have tried is: protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { SqlCommand cmd = new SqlCommand("SELECT Location_Name FROM Location_Table"); DropDownList bind_drop = (e.Row.FindControl("DropList") as DropDownList); bind_drop.DataSource = this.ExecuteQuery(cmd, "SELECT"); bind_drop.DataTextField = "Location_Name"; bind_drop.DataValueField = "Location_Name"; bind_drop.DataBind(); string Loc_type = (e.Row.FindControl("id2") as Label).Text.Trim(); bind_drop.Items.FindByValue(Loc_type).Selected = true; } } When I run the code, it gives an exception error Object reference not set in the last line of the above code. Cannot find out whats wrong. Kindly help

    Read the article

  • Creating a custom format string in a dataGridView

    - by Andy
    I have a dataGridView whose dataSource is a dataTable. My problem is that I want certain columns to be displayed in Hex. I can get that far with using something like this: foreach (DataGridViewColumn c in grid.Columns) { if (DISPLAYED_IN_HEX.Contains(c.Name)) { c.DefaultCellStyle.Format = "X"; } } My issue though is that I want this hex value prepended with 0x so as not to confuse anyone that they are in hexidecimal form. The values in the dataTable are various integral types. I looked into creating a custom IFormatProvider, but I don't think my coding skills are up to that par yet. Any other possible solutions?

    Read the article

  • Is this the correct way to reloadData on a UITableView?

    - by Sheehan Alam
    I am trying to append objects to my data source and then reload the table. Is this the correct way of approaching it? self.items is my datasource //Copy current items self.itemsCopy = [self.items mutableCopy];//[[NSMutableArray alloc] initWithArray:self.items copyItems:NO]; NSLog(@"Copy Size before append: %d",[itemsCopy count]); //Get new items int lastMsgID = [self getLastMessageID]; [self.coreData getMoreMessages:self.title lastID:lastMsgID]; //This will update self.items with 30 objects //Append new items [itemsCopy addObjectsFromArray:self.items]; //Empty items and copy itemsCopy [self.items removeAllObjects]; self.items = [self.itemsCopy mutableCopy]; NSLog(@"Actual Size after append: %d",[self.items count]); //Reload data [tableView reloadData];

    Read the article

  • Howto check if a object is connected to another in hibernate

    - by codevourer
    Imagine two domain object classes, A and B. A has a bidirectional one-to-many relationship to B. A is related to thousands of B. The relations must be unique, it's not possible to have a duplicate. To check if an instance of B is already connected to a given instance of A, we could perform an easy INNER JOIN but this will only ensure the already persisted relations. What about the current transient relations? class A { @OneToMany private List<B> listOfB; } If we access the listOfB and perform a check of contains() this will fetch all the connected instances of B lazy from the datasource. I only want to validate them by their primary-key. Is there an easy solution where I can do things like "Does this instance of A is connected with this instance of B?" Without loading all these data into memory and perform a based on collections?

    Read the article

  • Update database in asp.net not working

    - by Badescu Alexandru
    Hello ! i have in asp.net a few textboxes and i wish to update my database with the values that they encapsulate . The problem is that it doesn't work and although it doesn't work, the syntax seems correct and there are no errors present . Here is my linkbutton : <asp:linkbutton id="clickOnSave" runat="server" onclick="Save_Click" Text="Save Profile" /> and my update function protected void Save_Click(object sender, EventArgs e) { SqlConnection con = new System.Data.SqlClient.SqlConnection(); con.ConnectionString = "DataSource=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\alex\\Documents\\seeubook_db.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"; con.Open(); String commandString = "UPDATE users SET last_name='" + Text4.Text.Trim() + "' , first_name='" + Textbox1.Text.Trim() + "' , about_me='" + Textbox5.Text.Trim() + "' , where_i_live='" + Textbox2.Text.Trim() + "' , where_i_was_born='" + Textbox3.Text.Trim() + "' , work_place='" + Textbox4.Text.Trim() + "' WHERE email='" + Session["user"] + "'"; SqlCommand sqlCmd = new SqlCommand(commandString, con); sqlCmd.ExecuteNonQuery(); con.Close(); }

    Read the article

  • UITableView: Need a liveUpdate (Huge amount of cells)

    - by antihero
    Hey all, I have a UITableView which shows some information. The informations are from a XMLFile. The Xmlfile is pretty big, about 500 entries. I don't want that the user has to wait until the parsing has finished, i want to add cell by cell to the TableView. Here's my code: -(void) onFinishedPartDownload:(id)item { if(odvTableViewDelegateController.odvs == nil) odvTableViewDelegateController.odvs = [NSMutableArray new]; if([odvTableViewDelegateController.odvs count]==0) { genericDelegate.tableView.delegate = odvTableViewDelegateController; genericDelegate.tableView.dataSource = odvTableViewDelegateController; } [odvTableViewDelegateController.odvs addObject:item]; [genericDelegate.tableView reloadData]; } This method is called everytime an item has parsed, but it reloads the tableView all at once at the end. I don't have my expected liveUpdate which i'm searching for. The intervall the method is called is about 0.001 to 0.0025 seconds. Any ideas to fix that? Sebastian

    Read the article

  • Cannot bind to list<T>.property or list<T>.item.property in details section of Telerik report

    - by fluf
    I have created a Telerik report and I am setting the datasource on runtime to an object with some properties and a List. I am using the properties in the page and report header sections and i want to use the list as the details. Now the problem is binding to the List's item properties in the details section. I have played around with the expression builder and it seems that i should access the properties like this : [=Fields.myList.Item.myProperty] when i run the program i get a nice big red rectangle with the following error : An error has occured while processing TextBox 'textBox28':Common Language Runtime detected an invalid program. I have tried to change different variants of expression which also gives me other errors [=Fields.myList.myPropery] An error has occured while processing TextBox 'textBox28': The expression contains object 'myProperty' that is not defined in the current context. The closest i have gotton was with the object it self, which outputs the object.toString() [=Fields.myList]

    Read the article

  • How to get dataset to populate data into dbgrid in Delphi 6?

    - by Chris J
    I have created a DBGrid in Delphi 6 and tied it to a DataSource contained in a DataModule. The Dataset for that source in also located in the same module. In the OnShow event for the form, I activate the dataset and set a label equal to the rowcount for the dataset. This shows several hundred rows but nothing shows in the dbgrid. If I activate the dataset in the IDE, the grid populates with the expected data. Does anyone have any idea why this behaviour would change between the IDE and normal runtime? We are also using SDAC connection components. All 3rd party component choices are not mine to change. I can elaborate as necessary for clarification, but I mainly need troubleshooting ideas to start at.

    Read the article

  • WPF DataGrid content does not scroll

    - by muffd
    After searching for a fix to this issue in the previous answers I've decided to post my example. I have the following situation: my datagrid is placed inside a Grid row that is itself placed inside a UserControl.The UserControls does not have a fixed height, as I want the control to resize together with the window. The datagrid is bound to a datasource. Needless to say that the Datagrid itself and its container(the Grid) do not have set a fixed height. My question is: how do I make the vertical scrollbar of the DataGrid to appear?

    Read the article

  • How can I create an ODBC connection to SAS?

    - by Chris B.
    I'm writing a program that needs to access SAS data. I've downloaded the ODBC drivers for SAS and installed them, but I need to be able to create ODBC connections on the fly, programmatically. The following code (in Python) seems like it should work: import ctypes ODBC_ADD_DSN = 1 def add_dsn(name, driver, **kw): nul, attrib = chr(0), [] kw['DSN'] = name for attr, val in kw.iteritems(): attrib.append('%s=%s' % (attr, val)) return ctypes.windll.ODBCCP32.SQLConfigDataSource(0, ODBC_ADD_DSN, driver, nul.join(attrib)) == 1 print add_dsn('SAS Test', 'SAS', description = 'Testing SAS') But it pops up the SAS ODBC configuration dialog, sets the datasource name, and waits for the user to enter the information and dismiss the dialog. How can I avoid that?

    Read the article

< Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >