In my table of entries, there are other entries commenting on the orig entry. The comment entries are marked in the table by having a commentID field that matches the ID field of the post being commented on. Follow?
How would I sum the nbr of comments for each orig entry?
I want it displayed in upper superscript fashion like the "2" in E=MC "2"
I have a gridview, and I set the datasource in page_load to a linq query. I have delete linkbutton in the grid and am writing code in gridview1_rowdeleting event to delete the record from the table and all its records in child tables. Works fine, except when I databind() after the deletes to refresh the grid, it thinks there are no records left in the table and goes to the <emptytemplate> . There are in fact many other records that should appear. When I go out of the gridview and come back in, everything is fine. The proper records have all been deleted, and the remaining ones show. Here is the code. the table being displayed is Schedule. It has child records in the two other tables.
I have a data table with 20 records i have to get the 15 unique records randomly and have to store it in Arraylist but now problem is that how i select the 15 unique records from Data table each time .
I have sending messaged details in my sql data base.In my Grid view have the following columns,
                       Name      Rollno   MsgTemplateName  No of messages Sent                        Ameer           1           Pongal                         Robina           2            Diwali              Ameer            1           Pongal                                              Robina              2            Diwali                            Ameer            1          Diwali                                           Robina              2           Pongal
I want to look like the follwing,
                    Name      Rollno   MsgTemplateName  No of messages Sent                        Ameer           1           Pongal                             2                                                            Diwali                                1                          Robina           2         Diwali                            2                                Pongal               1                   Â
I am using this sql query "Select name,rollno,tempname,count(*) from stumsg group by name,rollno,tempname"
I have two tables for storing language translations - tblEN and tblES. They have the same structure which is nvcEnglish and nvcLocal - both nVarChar fields.
In nvcLocal of the Spanish table, I enter the Spanish translations of words and phrases used within my app. Problem is, when I add a bunch of new records to the English table I also have to go in and repeat the data entry into the Spanish table. I am wondering if there is a way to import the newly added records into the Spanish table using Transact SQL?The plain language query would be something like:
If the data in tblEN.nvcEnglish does not exist in tblES.nvcEnglish then insert a new row into tblES with the values from tblEN
is there a SQL statment i could write that would sum each column and allow me to then access each sum individually
i.e
Dim objCmd As New OleDb.OleDbCommand("SELECT SUM(expression) FROM orderForm WHERE OrderDate=@OrderDate", objConn)
is there anything i can replace expression with such that all the columns in orderForm could be summed and returned as one record
or is there a way to replace expression with something that would allow me to just keep changing the paramater so i could continuously reexectute the same command w/o having to create a new command for each column
i have a question regarding grid view. i have done almost all work i needed. but one thing i want to do is i have set 4 of page size of grid. so when i show records on the web page i want to set a iframe after first two records then iframe and then two more records like i have shown in the example image. i have used LINQ with C#.how to do it. if you people want i can show you my code.
I currently have a datasource that displays several rows on an editable gridview where the user can update several rows at once. Each row contains an ActivityTotal column per row. I'd like to sum all the ActivityTotal rows displayed and have one totalValue.
im tryin to create repeater from code behaind using C#. The data bind is working good, im tryin to put some pager. the pager is half working. i can see the pager links at the bottom, i can see the the code split the records to 10 lines each page as i set it but when i click the next link the records stay the same it wont changing for the next 10 records. my code
i have 500 records to show in webpage. i am using DataList in that webpage. if i use direct binding it is slowing down the performance of the page and is taking time to load. now i have used update panel and i want to append data records by records(i want to append as first 50records and then next 50 records something like)
I have a datagrid control which is bound to a table which containing more than 1000 records. And i want to show only 25 records once a time. I have used paging in datagrid. But each time the next page index is set, query is fired again. This takes lots of time. So what is the easiest way to bound data in this case to improve performance.
im learning t-sql, infact i needed its while-loop to loop through records of a table, i found this code in some book:
[Code]....
i understand here that setting the rowcount variable to 1 will force the select statements to return only one record, do all above select statements return one record only?
if the underlined select statement returns one record everytime it is executed, isn't it supposed to return the same first record of the table everytime? is there a better way to loop through a table's records?
Given an XML id list pulled out from a User Profile, how can we best program to use that list to retrieve text records from a SQL table and populate a dropdown list which contains ids from the XML list and text values from the SQL table.
I have to retreive all records from a table except 1 record. For example: I give example from default database in SQL ie "master" In "master" DB we have "spt_values" table. Now if I want to retreive all records from spt_values table except 1-1 record of type = A and type = B. To retreive all records its a simple query "Select * from spt_values where type in ('A','B')" -- this will returns 16 records. Now I want to retreive all record except 1-1 record left in each type, so it will return 14 records in result.
Equivalent of recordset.Edit, Movefirst,NoMatch of vb6 in vb.Net? I want to fetch records from single table of database(Sql server 2005) and collect in collections. How can we do that by dataset and dataadapter ? We want to fetch not to display.
I have an Access 2010 DB that I have a table of RAW data in. In my scenero when table 'a' has been populated all the rows with the updatedate of Now() get moved to another table... the SQL is like this...
[Code]....
As you can see it is a very simple query but it does NOT return any rows. There are actually 404 rows with todays date in teh Append_Date column.
i need to create 2 temporary tables.The records inserted into the 2nd table is the same as that from table1.
Now, i am inserting some other records into table 2.what i need is, to retrieve the count of the recently added records into table2.How to achieve this?