.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Post New Web Links

Getting too many records

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :Sql Server
I am writing a query that returns clients for my business that have a salesperson associated with them, but I try to include those that do not have a salesperson assigned to them, I get duplicate clients showing the clients with and without their salesperson. e.g Client                    Salesperson A                           Bob A                           NA   Any idea how I could fix this. BTW, I am using distinctDBA

View Complete Post

More Related Resource Links

ASP.NET GridView - edit records using JQuery Dialog

There are many ways in which you could modify modular data in Grid View:
1. Inline by making rows editable when u click on Edit
2. By using separate pages for Edit
3. By using popups/dialogs for adding/editing

adding XML 'records' with a key field


I have a vb.net Sub that is successfully adding 'records' to my XML file:

Private Sub btnSubmit_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles btnSubmit.Click             'for adding an XML 'record'
        Using ds As New DataSet()
            Dim dr As DataRow = ds.Tables(0).NewRow()
            dr("subject") = txtNewEvent.Text
            dr("year") = DateTime.Now.ToString("MM/dd/yy")
            txtNewEvent.Text = ""

how to increase Performance onloading page and navigation of records ?? Help








this is my aspx and cs code , let me know whether it is correct or not??

onload and performance on navigation of record show be good.

Plz help me

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"

                DisplayGroupTree="False" ReuseParameterValuesOnRefresh="true" HasToggleGroupTreeButton="False" Height="1039px" ReportSourceID="CrystalReportSource1"

                Width="901px" />

            <CR:CrystalReportSource ID="CrystalReportSource1" runat="

Showing filtered Records in Crystal Report as per User Requirement


ReportDocument reportDocument = new ReportDocument();
    ParameterField paramField = new ParameterField();
    ParameterFields paramFields = new ParameterFields();
    ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            paramField.Name = "@Ext";
            //*Remember to reconstruct the paramDiscreteValue and paramField objects
            paramDiscreteValue.Value = 44854
            CrystalReportViewer1.ParameterFieldInfo = paramFields;

dropdownbox which selects records based on criteria (TODAY, THIS WEEK, THIS MONTH, etc)


I have a dropdownbox which I want to use to search records based on a timescale. The gridview populates results based from that search.

So here is how I want to work this;

If a user selects "today" - a list of records input today are populated. If "this week" is selected, a list of all records added within that week from todays date is populated.

I created a forum on this issue previously but to no avail whatsoever. How do I work around this problem?

Help would be much appreciated

search multiple words into textbox and populate all records in gridview related those keywords


I have a textbox and a gridview which is bound to a table

what I want to achieve is a solution where lets say there are two records - e.g. "1. Book and 2. Red", i want a user to type in those words and the gridview shows the results as followed;

1. Book

2. Red

I have set up the sql data source and everything and my like operator is this...

LIKE '%' + @record + '%'

how can I solve this problem?

sqldatasource's filter returns too few records


I have a puzzling issue.  This is in asp.net 2.0, using vb.  I have a gridview that is bound to a sqldatasource.  Here is the datasource code:

<asp:SqlDataSource ID="fellowsSqlDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:PFPFellowsConnectionString %>"
        ProviderName="<%$ ConnectionStrings:PFPFellowsConnectionString.ProviderName %>"
        FilterExpression="{0}"  >
            <asp:SessionParameter Name="psuaccessid" SessionField="username" />         

How to save records with autogenerated html links in Sql database?


Hi I would like to create a database where users can search for multiple fields. For example: if the record is personal details info like name, address, phone number and email id i would like to generate link for this automatically with the fields using stored procedure.. Is that possible.? If so can anybody provide me with the line of code or guideline on how to do that?

Any help much appreciated. Thanks

How to stop unauthorized users from sending documents to a Records Center site?


I can't find a way to stop unauthorized users from sending documents to a Records Center site. Can someone please help me? Do i need to configure anything to restrict it to the members of the web submitters group?

I'm still using MOSS2007


The impossibility of doing things depends on your will to do it.

workflow and "child" records events ?




In a project, I have two lists that are linked together with a lookup column (it's not the actual scenario, but I simplify it) :

* a parent list, that defines some fields and especially a state field that will follow the life of the object (created, open and archived)

* a children list, that also defines some fields including a lookup field to the parent list and a similar state field for its own lifecycle (created, open and archived)


the life cycle of both kind of objects are linked together. For example, when the parent is opened, all children must be opened too (looks like easy because it's a workflow action from parent, and finding children is simply an activity of the workflow).

Another requirement is to archive the parent when all children are archived.

What is the best approach ?

In the parent life cycle workflow, can I monitor children events (I don't think so :() ?

I can cheat a bit by adding an hidden field "all children archived" in the parent, and set this to true from a child workflow or event. I'm not at ease with this solution as it's not a proper way. Anything else I may dive ?



Any idea, advice, tip, encouragement?



Paying back the community for its help by writing articles :

changing records frm control in update panel


i have a list box, a command button and a grid

when i click a particular record / or multiple records on the  list box and then cclick the command button the records r transferred 2 the grid

i also have custom paging, the paging shld ocur as many times i clcik the command button

i have used updatepanel with the command button in it so that partial postback ocurs or there is no page flicker ,

but when i use update panel i get teh records in the grid but custom page is not working . it has no affect even if the records are added

if i remove update panel the paging works properly

how do i manage it with update panel

Video: SharePoint 2010: In Place Records Management

SharePoint now has a record management feature that can be activated on any site so that you no longer need to create a separate record center site to manage your documents. (Length: 2:33)

Building Records Management Solutions with SharePoint Server 2007

Learn records management features and concepts, such as Records Center configuration, and records series planning and routing, and explore the Official File Web service and a sample client application to create and deploy a custom router with a routing type.

Infopath Template Deployment Locking Existing Records




We are currently using SharePoint Server 2007 and have multiple InfoPath lists configured and one workflow tasks list. We have workflows configured for these InfoPath lists using Visual Studio to design these workflows and use InfoPath forms as the main document. After using the workflow items for a while we have changed and upgraded the workflow for the last year. The issue came when we tried to upgrade to the third version we designed.




We have two InfoPath lists in SharePoint that have identical form templates. In both lists there are around 3000-3100 InfoPath forms give or take. I modified the template to accommodate some new fields and promoted additional fields but did not go over the

insert new records in tables from dataset to database


I have 2 tables in SqlServer 2008.

Table1: T1id, SomeData

Table2: T2id, T1id, SomeData

I am using DataAdapter.FillSchema to create shema of tables in DataSet. I created DataRelation on columns T1id in both tables.

Now when i try to Update Sql Database T1id in Table2 remains 0 and not the value of T1id in Table1.

I can successfully update Sql Database if i fill DataSet with records first (Using DataAdapter.Fill), but that's not what i want to do. I don't need "old" records in my dataset. I want to use dataset just to store all imputs from user until the proccess is done and then insert all those records "at the same time".

I think i'm getting it wrong with ForeignKeyConstraints, maybe UpdateRule is not set to cascade, i just don't know.

I have been trying to work this out for 6 days now and i'm about to break something on half.

Can someone please guide me to right direction, maybe post some sample, anything.... please!

My old post regarding this:

How to update Sql Server related tables from Dataset(SchemaFill)

SqlDataAdapter.Update related tables

How to do wide search and export the records to excel file in ASP.net C# ?


This is my MYSQL  database connection :-

public static OdbcConnection Connection = new OdbcConnection("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=jdmcrm; User=root;Password=admin;");

My table name is "customer" and  fields liek customerId , companyName , address and date ;

How to do wide search and export the records to excel file ? im quite new in asp.net .

Pls advise . Thanks





select records within 30 days of previous records

I have a table with a list of patient id's and there begin date and end dates as follows: ID     begin_date  end_date 1234 10/09/2009 10/16/2009 1234 12/16/2009 12/22/2009 1234 12/28/2009 12/30/2009 1234 01/13/2010 01/19/2010 1234 04/29/2010 05/05/2010 what i need to do is select the records that have an end_date within 30 days of a begin_date. So in the above example, i would need to get the following records: ID     begin_date   end_date 1234 12/28/2009   12/30/2009 1234 01/13/2010   01/19/2010 Because 12/28/2009 is 30 days within 12/22/2009 (previous end_date) and 01/13/2010 is within 30 days of 12/30/2009 (previous end_date) and 12/22/2009 (2nd previous end_date). is there a good way to do this using T-SQL?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend