DataSource Controls :: How To Structure A CTE

Jan 9, 2010

I have inherited a piece of code that is a bit of a pig. It uses a cursor to loop through a list of stores and count customers. I would like to change this to use a CTE, but am not sure how to configure it.The basic functionality of the SP is:Declare variablesSet up start and end datesDeclare CursorGet a list of stores to checkOpen the CursorWhile... Loops through the stores Insert a new record into the Destination Table Count up the new customers for this store Count up the returning customers to the store Update the new record with the totalsLoopThe code:

[Code]....

View 4 Replies


Similar Messages:

DataSource Controls :: How To Add A List Structure To An SQL Database

Jun 17, 2010

I have a series of SQL database tables but would like to be able to have a table entry that can support a list of primary key's for another table - how I can do this?

View 1 Replies

DataSource Controls :: Copying Db Structure With Out Data

Jan 25, 2010

I want to know what the easiest way is to copy one database structure to another blank database. I want tables, stored procedures and functions copied over but none of the data within the tables. I can export it...but then all the data also gets carried over, which I don't know. What would be the best way to carry this out?

View 2 Replies

DataSource Controls :: New Structure Of SQL Server Table?

Jun 14, 2010

I have a table named Transactions in which there are Four Coulmns

ID, TransactionsID, LablelName , Data

In Current scenario all the Data is containing in the above table for example

ID, TransactionsID, LablelName , Data
1, 1, CustomerID, 1
2, 1, CustomerName, John Smith

and so on ...

Columns are only four and data is increasing in Row Format.

Clear me advantages and disadvantages

is this datastructure entry or logic is correct or what are the drawbacks of using this technique?

View 3 Replies

DataSource Controls :: Unable To Change The Structure Of Table?

May 14, 2010

I have one table in database in which millions or records exest already. I can't change the structure of table. And i have to create 4 store procedure each of them will fetch 100 records from this table. And they will keep going on. But condition is that they should not fetch same row. how can all store procedure fetch uniqe data from table.

View 4 Replies

DataSource Controls :: How To Display Hierarchical Structure In A Data Control

Mar 19, 2010

i have a table with parent-child relationship wherein each child in turn can have multiple associated children. i want to display data in an hierarchical way with collapse and expand features.i dont want to use 'listview inside a listview inside a listview' approach. and yes i have googled it but cudnot find anything useful for my scenario. has someone successfully tried implementing this ?

View 4 Replies

DataSource Controls :: How To Pass The Array ( Object[]) Or Structure Data Type Value To The Store Procedure

May 6, 2010

I want to pass the Array ( object[]) or Structure data type value to the store procedure through
ibatis .net. I can do same by commandtext using SQLDBType.Structure. I am using Table value function in sql server 2008 and .Net 2010.

[URL]

View 2 Replies

Forms Data Controls :: Columns Structure For Gridview?

May 6, 2010

I have a grid named 'GridView1' contains two columns 'Date' and 'Session Deatils' i am displaying like this way only

[Code]....

View 1 Replies

Web Forms :: Sharing A Structure Or Class Among Multiple User Controls?

Feb 2, 2010

I'm building an application where custom modules may be developed and "dropped in" to the system, where they can be picked up and utilized.

I'm building a forum module and have a user control to create a login/registration region. I plan on using a struct to store the user session data. However, i need this class structure to be shared between the forum module and the login/registration control.

Because the functionality is to be contained in the module's folder, i cant add any assemblies to the app_code folder.

How can i share a class or struct among two user controls?

View 6 Replies

Forms Data Controls :: Achieve A List View With This Structure?

Oct 29, 2010

I am trying to achieve a list view with this structure.I have many categories with many products

<table>
<tr>
<td colspan="3"><h2>Cat1</h2></td>[code]...

As you see the <td> for products must always be no more than 3 columns. but if there are 8 products then there will be 3 rows (2 full rows and one row with only 2 products) So far I have this:

<asp:ListView ID="lvProducts" runat="server">
<LayoutTemplate>
<table cellpadding="0" cellspacing="0" border="0" width="800"> [code]...

it doesn't work .

View 4 Replies

Forms Data Controls :: Create An If-like Structure Inside A Field In GridView?

Dec 20, 2010

What I want to do is to put a "(reported as invalid)" after the name in the GridView. However, I can't figure out how I can do this, or whether or not I should actually do it in the .aspx file. The field that I am going to check for validity is called invalid, and is a bit. Here's the GridView:

<asp:gridview id="grid" runat="server" datasourceid="sql" autogeneratecolumns="false" useaccessibleheader="true" allowPaging="true" pageSize="10">
<columns>
<asp:BoundField datafield="name" headertext="Name" />
<asp:TemplateField headertext="Link">
<itemtemplate>
<a target="_blank" href="<%# Eval("link") %>"><%# Eval("link") %></a>
</itemtemplate>
</asp:TemplateField>
<asp:BoundField datafield="description" headertext="Description" />
</columns>
</asp:gridview>

View 5 Replies

Data Controls :: Implement TreeView (TreeGrid) Like Structure In GridView Using JQGrid?

Feb 25, 2016

How i will code for above example using asp.net? Is the any ways to design the functionalities?

View 1 Replies

AJAX :: Dynamically Built Accordion Controls / Keeping Only The Basic Empty Structure, And Re-build It All In A Single Post To The Server?

Apr 27, 2010

I have a dialogue window that contains an Accordion Control that is dynamically built. The only thing that appears on my source page is the opening and closing tags for the control. The panes and the controls that appear on the panes are all added dynamically based on records in a database.

Now here is my situation, if a certian action is performed on one of the controls then I want to save that controls data and make it no longer available for use, this was easily accomplished by having the control hide itself. An issue arises though when I have hidden all of the controls on a certain pane, the header for the pane still exists and this is not the desired result.

What I would like is to be able to dynamically remove the entire contents of the control and then re-build it. Due to the timing of the events in the page post back sequence, a simple call to the method that builds the control will not work and if an explanation is required I will provide one. Also, looping through all of the panes and the controls on each pane will not work since after the first pass through the loop the panes collection is mutated, the enum table for the control is no longer correct since the initial pane has been removed, as a result the for loop throws an error.

Can any one come up with a way that I can clear out the control, keeping only the basic empty structure, and re-build it all in a single post to the server?

View 1 Replies

MVC :: Limitations Of URL Structure In 2

Jun 16, 2010

We are currently building a site in ASP.net MVC 2 and we have discovered that the URL's we have specified are not supported by MVC. This is what our developers are telling us anyway. I'd like to get feedback form this forum. My asp.net MVC knowledge is limited (I am an old school ASP 3 guy who hasn't programmed for years) but am trying to learn as much as I can so I can understand the limitations. say for example the app is a jobsearch site in the healthcare sector e.g. we would like the urls to be the following:

1. (non advanced searech) [URL]

2. (advanced search) [URL]

they are telling us that they need to send all parameters in the url even if they are blank so our example 1 here would not be possible. It would need to contain all of the possible advanced parameters in the search like this: [URL] most seaerches are basic i.e. looking for job in a location. but users have the optyion to do an advanced search also. The dev is telling us that we must send all params empty in the URL even in a basic search. Has anyone come across this limitation beforee and if so how did you combat it?

View 2 Replies

C# - How To Implement Rank Structure

Jun 15, 2010

What is the best way to implement a rank system:

here is the code i will use

[code]....

View 2 Replies

How To Structure A Website Using Membership

Oct 27, 2010

i have to build a ASPNET website on which some functionalities will be available to logged in users.I'm trying to understand the right thing to to in building my pages.

I've found the following code in Page_PreInit:
protected void Page_PreInit(object sender, EventArgs e)
{
if (Membership.GetUser() == null) //check the user.. Weather user is logged in or not
{
this.Page.MasterPageFile = "~/General.master";
}
if (Membership.GetUser() == "ADMIN") //check the ADMIN.. Weather ADMIN is logged in or not
{
this.Page.MasterPageFile = "~/ADMIN.master";
}
else
{
this.Page.MasterPageFile = "~/Member.master";
}
}

..but i don't' know if this is the right approach in designing an app.Is it right to switch at runtime Master page according to username/role?

View 1 Replies

How To Create A Forum Like Structure In ASP C#

Jun 29, 2010

i want to create a forum like page in ASP ,C# where user can enter some question.
Administrator reply this question,according to if user does not satisfied with the solution then in same thread he may ask for further clearance.for example the forum of asp.net ( the current page)

View 5 Replies

Embedding Whole Directory Structure?

Dec 13, 2010

I have a large directory structure with JavaScript, images, etc. that depend on each other. I would like to encapsulate it all into a DLL so I only have to reference one thing and not have multiple copies of all these files across projects.

Because the files depend on each other, I'm thinking I can create an IHttpModule that registers a route to accept URLs such as /MyEmbeddedDir/subdir/file.js. Anything in MyEmbeddedDir would then be handled by a custom IHttpHandler that does the correct mapping. Each web application would then need to reference the DLL and add the module and handler to web.config. Does this seem reasonable?Also, is there an easier way to embed/reference the files than to set the build action to embedded resource and add [assembly: WebResource(...)] to each file (there are dozens!)?Edit: If I'm not using WebResource.axd then I shouldn't need to add [assembly: WebResource(...)]

View 2 Replies

Go From A Datatable To Hierarchical Structure?

Feb 22, 2011

I have a datatable which i get from the databasemanager class, and i would need to transform that data into a hierarchical structure

either binding it directly to a .net treeview control or in memory first .

i have an ID column, and a ParentID column.what i do not know necessarily is the parent ID to start with. so first thing to do would be to find out which node is the parent ID.

what would be best practice to loop over this table and make it hierarchical

BranchId ParentId ProductCount HasBranchChildren Name
0 NULL 48 1 Categories
1 0 20 1 CategoryA
2 1 10 1 CategoryA1
3 1 8 0 CategoryA2
4 1 2 0 CategoryA3
5 2 4 0 CategoryA1.1
6 2 6 0 CategoryA1.2
7 0 28 1 CategoryB
8 7 20 0 CategoryB1
9 7 8 0 CategoryB2

this would be an example datatable of course it will have hundreds of items, and it does not always start at the root node, its possible that with a request a certain subset of categories is requested, however i've talked with the database team and they will give me NULL on root nodes in the above example that would be element 0 in the table ....

View 2 Replies

C# - To Structure My BL And DAL In Conjunction With NHibernate

Oct 20, 2010

Typically I would have ran with the traditional 3-Tier approach but after spending some time looking around at various options I've got an inkling that some kind of ORM might be a better fit and I'm considering nHibernate.However,I'm looking for some guidance on implementing nHibernate and more specifically how I would structure my BL and DAL in conjunction with nHibernate.With nHibernate I would create my Objects (or DTOs?) and use nHibernate methods for my CRUD interactions all in my DAL.But what I can't get my head around is the Objects defined in the DAL would be probably be better situated within the BL, i.e. where validation and other stuff can be performed easily, and I just use the DAL from the various ObjectFactory's / ObjectRepositories. Unfortunately it seems through the many articles I've read this isn't mentioned or skirted over and I'm a tad confused.What is the more accepted or easier method of implementation when using nHibernate in a 3 Tier system?Alternatively, what is the conventional method of exposing objects through the business layer from the data layer to the presentation?

View 5 Replies

ADO.NET :: Structure The BLL Using LINQ To Entities?

Nov 10, 2010

I am trying to learn LINQ to entities, and am working out how to best structure my BLL layer. I have generated the entity model and have created a generic repository in my DAL that returns results as IList<T>. I initially created the BLL to also return

results as IList<T>:

public IList<DAL.Customer> SelectAll()
{ [code]...

Now I am working on the aspx page, and I can create an ObjectDataSource and configure it to use my BLL, but since I am returning IList, I can't sort since I am not using a DataView. I have seen some articles on the web for converting IList to DataView, but that seems like a lot of overhead for every query.My goal is to keep a clean separation between layers without making things overly complicated. I would like to know how others have done this, or maybe a link to a good tutorial that shows how to structure all three layers.

View 8 Replies

MVC :: Use The Structure Map Configuration For The Tests?

Sep 12, 2010

On a MVC 3 Preview Web Application I am using the following:

1 - Structure Map for IOC

2 - Fluent Validation for Validation

3 - AutoMapper for mapping.

Everything is working fine.Now I created a Test Project. How can I use the same Structure Map configuration for the tests?

View 5 Replies

.net - LabView Control (.ctl) To VB.NET Structure?

Mar 25, 2010

I created a control in LabView. My LabView code writes data of that type to a binary file. I want to read this data into a VB Structure.Can I do this programmatically, or do I need to manually create a corresponding structure?

View 1 Replies

Difference Between Structure And Class?

May 3, 2010

it seems classes and structure are same. what is the basic difference between Class and Structure?

View 10 Replies

How To Create A Simple Xml Structure Using The XMLWriter

Feb 21, 2010

I'm trying to create a simple xml structure using the XMLWriter in visual basic for the purpose of creating an html page based on user input.

Here's an example of what I've got so far:

[URL]

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved