Search Results

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

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

  • how to update database using datagridview?

    - by Sikret Miseon
    how do we update tables using datagridview? assuming the datagridview is editable at runtime? any kind of help is appreciated. Dim con As New OleDb.OleDbConnection Dim dbProvider As String Dim dbSource As String Dim ds As New DataSet Dim da As OleDb.OleDbDataAdapter Dim sql As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dbProvider = "PROVIDER=Microsoft.ACE.OLEDB.12.0;" dbSource = "Data Source = C:\record.accdb" con.ConnectionString = dbProvider & dbSource con.Open() sql = "SELECT * FROM StudentRecords" da = New OleDb.OleDbDataAdapter(sql, con) da.Fill(ds, "AddressBook") MsgBox("Database is now open") con.Close() MsgBox("Database is now Closed") DataGridView1.DataSource = ds DataGridView1.DataMember = "AddressBook" End Sub

    Read the article

  • MS Access caching of reports / query results

    - by FrustratedWithFormsDesigner
    Is it possible to cache a query or report the first time it is run? It seems that opening a report will re-query the datasource. For certain queries, the data source does not change frequently enough that I'd be worried about a cache being out of date (users are notified when the database changes), and it would be much easier for the users to be able to open the report instantly rather than having to wait several minutes every time they want to see the data (though I realize if they close the file the caches will be lost - that's OK). Data comes from an ODBC connection to Oracle, using Access 2003.

    Read the article

  • Updating my database

    - by Malcolm
    I am new with the subsonic, and I have a problem when trying to update the database from the sql server. I have created a gridview by still is not returning the updates results. can you please help me? its getting an error code on dc.AddMostaHse(); (Cannot implicity convert type 'void to 'object') Here is the code being done of DataAccess.cs page public void AddMostaHse() { Mosta.MostaHSE1 xx = new MostaHSE1(); xx.ID = 94; xx.FunctionLocation = "lza94"; xx.acno = 12; xx.Save(); } Binding it with the gridview. { DataAccess dc = new DataAccess(); gvtest.DataSource = dc.AddMostaHse(); gvtest.DataBind(); }

    Read the article

  • Table Variables in SSIS

    - by aceinthehole
    In one SQL Task can I create a table variable DELCARE @TableVar TABLE (...) Then in another SQL Task or DataSource destination and select or insert into the table variable? The other option I have considered is using a Temp Table. CREATE TABLE #TempTable (...) I would prefer to use Table Variable so that it remains in memory. But can use temp table if it is not possible to use table variable. Also I cannot use the record set destination as I need to preform straight SQL tasks on it later on.

    Read the article

  • Event is causing an error, but I can't catch the exception

    - by proudgeekdad
    A developer has created a custom control in ASP.NET using VB.NET. The custom control uses a repeater. In certain scenarios, the rpt_ItemDataBound event is encountering a data error. My goal is rather than having the user see the yellow screen of death, give the user a friendlier error explaining exactly what the data error is. I figured I would be able to use a Try/Catch block as shown below throw the exception, however, it appears that the event has nowhere to be thrown to and stops executing at the "End Try" line. Protected Sub rpt_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rpt1.ItemDataBound, rpt2.ItemDataBound Try ProcessBadData... Catch ex As Exception Throw ex End Try End Sub In VB.NET, I can find where the repeater's DataSource is being set, however, I can not find a DataBind event. Any ideas how I can capture the exception in this ASCX control so I can report it to the user?

    Read the article

  • how to get empty row in DropDownList

    - by Gali
    hi i have this citys in my database: city1 city2 city3 city4 i what to see this in my DropDownList: [empty] city1 city2 city3 city4 this is my bind code: SQL = "select distinct City from MyTbl order by City"; dsClass = new DataSet(); adp = new SqlDataAdapter(SQL, Conn); adp.Fill(dsClass, "MyTbl"); adp.Dispose(); DropDownList3.DataSource = dsClass.Tables[0]; DropDownList3.DataTextField = dsClass.Tables[0].Columns[0].ColumnName.ToString(); DropDownList3.DataValueField = dsClass.Tables[0].Columns[0].ColumnName.ToString(); DropDownList3.DataBind(); how to do it (asp.net C#) ? thanks in advance

    Read the article

  • How to get a dynamic attribute name in cfloop over query in ColdFusion

    - by Kip
    I'm inside a cfloop over a query. I want to get an attribute, but I won't know what that attribute will be until runtime. Using #qryResult[MyAttr]# fails with the error "Complex object types cannot be converted to simple values." What is the syntax for doing this? Here is a simplified example: <cfquery datasource="TestSource" name="qryResult"> SELECT * FROM MyTable </cfquery> <cfloop query="qryResult"> <cfset MyAttr="autoid" /> <cfoutput> Test 1: #qryResult.autoid# <br/> <!--- succeeds ---> Test 2: #qryResult[MyAttr]# <br/> <!--- fails ---> </cfoutput> </cfloop>

    Read the article

  • Why my combobox count is 0?

    - by just_name
    Why the count of items in my ComboBox is always 0 although the datasource of this combobox has data !! <div align="right" dir="rtl"> <asp:Label ID="lbl_contactListName" runat="server" Text="Menu Name :" CssClass="span"></asp:Label> <telerik:RadComboBox ID="ddl_contactList" runat="server" AutoPostBack="True" CausesValidation="False" CollapseDelay="0" Culture="ar-EG" ExpandDelay="0" Filter="StartsWith" ItemsPerRequest="10" MarkFirstMatch="true" Skin="Outlook" EnableAutomaticLoadOnDemand="True" EmptyMessage="-New Menu-" ShowMoreResultsBox="True" OnSelectedIndexChanged="ddl_contactList_SelectedIndexChanged" EnableVirtualScrolling="True" DataTextField="list_desc" DataValueField="list_code" DataSourceID="ObjectDataSource1" EnableViewState="true" Width="300px"> </telerik:RadComboBox> </div> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetContactListsByDep" TypeName="SendSMS_EmailModule.ContactList"> <SelectParameters> <asp:SessionParameter Name="year" SessionField="year" Type="Int32" /> <asp:SessionParameter Name="main_code" SessionField="main_code" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource>

    Read the article

  • Mvp View knows Model

    - by userbb
    I'm trying to use MVP and I notice that my View must know Model that should not happen in MVP I presume. here is example: public partial class TestForm : Form, ITestPresenter { public void LoadList(IEnumerable<AppSignature> data) { testPresenterBindingSource.DataSource = data; } } public interface ITestPresenter { event EventHandler<EventArgs> Load; void LoadList(IEnumerable<AppSignature> data); } and the problem is that in TestForm I need reference to AppSignature. In all tutorials I saw, there are some simple examples like public void LoadList(IEnumerable<String> data) where there is no need reference to model. But how i.e DataGridView can publish current row data?

    Read the article

  • Binding collections to DataGridView in Windows Forms

    - by Sergey
    I'm trying to bing collection to DataGridView. As it turns out it's impossible for user to edit anything in this DataGridView although EditMode is set to EditOnKeystrokeOrF2. Here is the simplified code: public Supplies() { InitializeComponent(); List<string> l = new <string>(); l.Add("hello"); this.SuppliesDataGridView.DataSource = l; } It also doesn't work when I change collection type to SortableBindingList, Dictionary or even use BindingSource. What can be wrong here?

    Read the article

  • how to build custom menu using asp.net

    - by Turi
    hi all, i have this situation: i have to build a menu with datasource from the db, because i have to filter them among the user that is loged in. i have tried building a menu using repeater, and all this works fine till i realized that i wanted the menu with more than two levels. i have also tried with treeview, but i really don't want this solution (problem with the style and the treeview doesn't have a pretty view). Could anyone give me any ideas ? thnx in advance.

    Read the article

  • IPhone: Controllers, Delagates, DataSources, etc all in one class?

    - by MLS
    Hi All, I am learning iPhone programming. I am starting with a simple example of displaying recently used documents in a UITableView. What I am confused about is why do I need to have several classes and why cant I just use one? Example, My class is called RecentFileList. I need to implement controller, delegate and datasource as well as the actual table view. Can't I just do this all in my RecentFileList Class versus having to create a RecentFileListDelegate RecentFileListController, RecentFileListDataSource class, etc, etc. Related to this can one define a class like: @interface FileListView : NSObject <UITableViewDelegate> <UITableViewController> <UITableViewDataSource { // code } @end or would I just do the work to make my class a delegate and controller in init()?

    Read the article

  • Dynamically add rows to listbox

    - by Ivan S
    I have a list box that displays information off of a column of a dataset. I would like the number of rows displayed to be all the rows that are in the dataset (the number of datasets in the rows vary). I'm figuring it has something to do with ListBox.Rows = Dataset.Tables[0].Rows.Count; But it seems to just always default to 4 even when it is only 2. This is what I have in my aspx.cs file. pirateBox.DataTextField = Pirateship.Tables[0].Columns["displayName"].ToString(); pirateBox.DataValueField = pirateship.Tables[0].Columns["PKID"].ToString(); pirateBox.DataSource = pirateship.Tables[0]; pirateBox.DataBind(); pirateBox.Rows = pirateship.Tables[0].Rows.Count; I've been trying a few things and this is what I have so far in .aspx <asp:ListBox ID="pirateBox" runat="server" Rows="1"></asp:ListBox>

    Read the article

  • Show data relationship in gridview with dropdownlist or similar?

    - by Anders Svensson
    I have data coming from two tables with a foreign key relationship - one User table containing users of the web application, and one Page table containing details about pages visited by each user. I would like to be able to view these data in a gridview or the like on a page. It's easy enough to just show the User table data like so (I'm using the Entity Framework and LINQ): UserDBEntities context = new UserDBEntities(); GridView1.DataSource = from user in context.UserSet select new { user.Ip, user.Count, user.Description, user.Referer }; GridView1.DataBind(); But how can I show the Page details? I'm not bent on any particular way of showing it, but the only idea I've been able to come up with is to have a dropdown list for each user in a column. But I can't figure out how to get the page data into such a dropdown list. The tables are associated with the primary/foreign key UserID. Any ideas would be welcome (dropdownlist solution or other)!

    Read the article

  • Wildcard in query for ASP.NET GridView

    - by cinu
    I am using GridView in ASP.NET 2.0. I am want to show the details from 3 tables (SQL2005) in the GridView per my search crieteria (Name of Visitor,Passport Number,Name of Company). It is working, but I want to use a wildcard for searching by first letter of "Name of Visitor". I have my code in the QueryBuilder in GridView (using Configure Datasource). The query is as follows: SELECT FormMaster.NameofCompany, VisitorMaster.NameofVisitor, VisitorMaster.PassportNumber, FormMaster.FormID, VisitorMaster.VisitorID FROM VisitorMaster INNER JOIN VisitorDetails ON VisitorMaster.VisitorID = VisitorDetails.VisitorID INNER JOIN FormMaster ON VisitorDetails.FormID = FormMaster.FormID WHERE (FormMaster.FormStatusID = 1) AND (VisitorMaster.PassportNumber = @PassportNumber ) OR (VisitorMaster.NameofVisitor = @NameofVisitor) OR (FormMaster.NameofCompany = @NameofCompany )

    Read the article

  • null reference exception was unhandled by user code

    - by user238319
    sir, i develop the following code in vs2005, now i just using this module in my new project @ vs 2008.. But this error was araised. I cant able to fix this problem... Private Sub DataAccess() Dim errHandle As New ErrorHandler Dim lobjCommon As New eCopsCommonFunctions Try AccessCodeDrplst.DataSource = CType(lobjCommon.gfuncGetAllEnrollmentSource(), DataSet) AccessCodeDrplst.DataValueField = "DataAccessCode" AccessCodeDrplst.DataTextField = "DataAccessDesc" AccessCodeDrplst.DataBind() 'lstEnrollmentSourceCode.DataValueField = "EnrollmentSourceCode" 'lstEnrollmentSourceCode.DataTextField = "EnrollmentSourceDesc" 'lstEnrollmentSourceCode.DataBind() '"Beneficiary Election" is pre selected as default value. By pals on Oct 24th 2007 'lstEnrollmentSourceCode.SelectedValue = "B" 'lstEnrollmentSourceCode.Items.Insert(0, New ListItem("Select", "0")) Catch ex As Exception errHandle.gProcHandleErrors(ex, Session("MemberID"), "SPStatus.aspx.vb, gprocFillSEPCode") Throw ex Finally lobjCommon = Nothing ///here the error occurs as 'NullException was unhandle by the user code' errHandle = Nothing End Try End Sub

    Read the article

  • Starting Game dev on iPhone:iPad - learning path ??

    - by Tibi
    Hi there, I'm beginning in iPhone/iPad game dev and I'm searching to set up my learning path. The basic features I would like to learn (after the basic SDK iphone components programming) are : using a board like interface where I can move pawn with my fingers detect where the pawn was moved and triggers events in the game The board will be constitute by 6 tiles that may be organised randomly when starting the game : may i use an sdk component with a delegate and datasource to determine where the pawn was left and on which tile ? need to use dices (which kind of library may I use ?) ... Do you have any idea about where to start ? ;-) Many thanks, Tib.

    Read the article

  • C# : Problem in creating diffrent types of columns in a gridview

    - by Royson
    My windows form application has a grid view control with filename as a default column. User should create a column of following types Text, Number, Currency, Combo Box, Check Box, Radio Button ,Date time type (should display DateTimePicker control) and Hyper Link type. After that i want to pass all rows to next screen for further processing. We can create a column of these types in a grid view but how can i store it in a data table so that i can pass it to next screen. Or should i create a column in a data table and then assign data table to grid view by gridview.DataSource = dt; but can we create a these types of columns in a data table. I am so confused!! Please help me to solve this problem. Thanks

    Read the article

  • ASP.Net databinding in tag

    - by Psytronic
    I know you can bind in the code-behind, but I don't quite understand how it works if you want to declare it within the controls tag. This is for a custom collection. I thought it was just Datasource="<%# MyCollection %" Where MyCollection is an exposed property of the class in the code behind? MyCollection{ get{ return _MyCollection;}} Something like that. But it doesn't seem to work that way, so can I not bind this way, or am I missing something?

    Read the article

  • DataSet binding problem

    - by Shaine
    I've got in-memory dataset with some table defined and I populate this table in a following way: for(...) ds.Fields.AddFieldsRow(++j, 0, heading, "Char", "", "", "Input", 0, "","",""); On the GUI I've got DataGridView bound to that table inside TabControl (bound through BindingSource). Very strange thing is happening: if I open tab pane with this grid and populate table with some data then I see changes in grid. On the other side if I'm at other tab, populate table, and then switch to tab with grid I've got following exception: "DataMember property 'Fields' cannot be found on the DataSource". In similar way I've got 2 tab panes with grid in each that are bound to the same datatable using different datasources and I open one of them, populate, see the changes, then switch to second tab and get crash. What am I missing?

    Read the article

  • C# Web gridview sortin

    - by tommypiaa
    Any examples how would I enable sorting for the gridview? private void loadlist() { cn.Open(); cmd.CommandText = "select Breed, Name, Image from Animals"; dr = cmd.ExecuteReader(); cn.Close(); } protected void TextBox1_TextChanged(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { AddData(); Addimage(); } protected void AddData() { if (TextBox1.Text != "" & TextBox2.Text != "") { cn.Open(); cmd.CommandText = "insert into Animals (Breed, Name) values ('" + TextBox1.Text + "', '" + TextBox2.Text + "')"; cmd.ExecuteNonQuery(); cmd.Clone(); cn.Close(); loadlist(); } } protected void DisplayData() { cn.Open(); cmd.CommandText = "select Breed, Name from Animals"; dr = cmd.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); cn.Close(); }

    Read the article

  • ASP.NET JSON Binding data with RadiobuttonList

    - by user1385570
    I'm trying to bind JSON data into the RadioButtonList on client side. I know how to do the in code behind, it works fine. Someone please provide more details, How do I bind the JSON data RadioButtionList in VB.NET. rblregions.DataTextField = "Value" rblregions.DataValueField = "Key" rblregions.DataSource = items The data looks like: [regions:{regionID:US,regionName:USA}] main.aspx <asp:RadioButtonList ID="rblregions" runat="server"> $.getJSON("Map/loadMySites.aspx?" + query, function (data) { if (data.regionid && data.region) { //I want to bind the data here with RadioButtonList } } );

    Read the article

  • check compiler with break point

    - by KareemSaad
    When I tried to focus on compiler in code i made break point on code if (!IsPostBack) { using (SqlConnection Con = Connection.GetConnection()) { if (Request.QueryString["Category_Id"] != null && DDlProductFamily.SelectedIndex < 0) { SqlCommand Com = new SqlCommand("SelectAllCtageories_Front", Con); Com.CommandType = CommandType.StoredProcedure; Com.Parameters.Add(Parameter.NewInt("@Category_Id", Request.QueryString["Category_Id"])); SqlDataAdapter DA = new SqlDataAdapter(Com); DA.Fill(dt); DataList1.DataSource = dt; DataList1.DataBind(); } but I cannot check condition although I had the value of query string List item

    Read the article

  • Sorting records datewise in datatable.

    - by Harikrishna
    I have datatable and I am storing the records in that datatable. Now one of the column in the datatable is type of DateTime.That column I added by code Table.Columns.Add(new DataColumn("TradingDate",System.Type.GetType("System.DateTime"))); Now I want to sort the records datewise in ascending order. I have used following code but the records are not sorted. DataView view = new DataView(Table); view.Sort = "TradingDate ASC"; dataGridView1.DataSource=view.Table; But records are not sorted so how to do it ?

    Read the article

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