view

Performance of unused fields in an SQL View

I'm using MS SQL Server. When I define the database schema I define a (non-materialized) view, which includes many fields, for example as follows (where "Topic" is the name of a table, and the view is a self-join on the Topic table): CREATE VIEW View_Topic_Ancestor AS SELECT Subordinate.Id AS Subordinate_Id, Subordinate.Folder_...

LINQ Anonymous Types + MVC Views Help

I've seen many questions about this, but i've never really got the answer that I need. I'm converting a fairly large web application from Web Forms to MVC and after a while I encountred a problem with passing data to the view. In the Action I execute the code: //This is just an example ViewData["QProducts"] = from p in db.Products s...

SQL/Database Views in Grails

Does anybody know what is the best approach to accessing a sql view through Grails (or if this is even possible)? It seems an obvious way of doing this would be to use executeQuery against the view to select a collection of rows from the view which we would not treat as a list of domain objects. However, even in this case it is not obvio...

How to change the size of view according to mainframe in SDI framework?

I want to set the size of view according to the size of the mainframe in a SDI framework. That is to say when I change the size of mainframe, the size of view changes accordingly, so does the client area. How can I do this? Thank you ...

Can I have a foreign key referencing a column in a view in SQL Server?

In SQL Server 2008 and given TableA(A_ID, A_Data), TableB(B_ID, B_Data), and ViewC(A_or_B_ID, A_or_B_Data), is it possible to define TableZ(A_or_B_ID, Z_Data) such that Z's A_or_B_ID column is constrained to the values found in ViewC? Can this be done with a foreign key against the view? ...

Zend Framework: Is there a way to get the path to the view template directory?

I'm just trying to find a way to get the path to the directory of my view templates using the Zend Framework. Is there a way to do that? ...

Execute Trigger on View?

I am not too familiar with database triggers and/or views. I am currently using PostgreSQL and HSQL; although the database is not too important. I am just wondering if any database offers something like this: I have an (example) table like this: CREATE TABLE DUMMY_TABLE (ID INTEGER, NUMBER INTEGER); I created a view like this: CRE...

How to include a css or javascript in an erb that is outside the layout?

Sorry for the slightly noobish question, as I am writing my first rails app. I get the idea of the layout view, but if you are using them, is there any way to include a view specific js or css file? For example, I have layouts/products.html.erb, and for products/edit.html.erb I want products_edit.css, but I don't want that css for all pr...

iPhone Development - Show Floating View with Table View

I have a Tab Bar Application with Navigation Controllers on each Tab Item. I want to add a floating (semi transparent view) on my Table View just above my Tab Bar. How can i achieve the results? The results will be similar to how the Alpha list is displayed on the right of Contact Application's main view. I hope i'm clear in explaining ...

Take snapshot of view / WebView programmatically

Hello, I want to take a snapshot of a view (WebView) or, if that is not possible, the whole screen, so I can save it into the user's photo gallery. I was wondering if this is possible. Thank you very much, Isaac Waller http://www.isaacwaller.com/ ...

Passing multiple result sets to a view from a controller in ASP.NET MVC?

So I have a controller set up as follows: using NonStockSystem.Models; namespace NonStockSystem.Controllers { [Authorize(Users = "DOMAIN\\rburke")] public class AdminController : Controller { private NonStockSystemDataContext db = new NonStockSystemDataContext(); public ActionResult Index() { ...

Dump mysql view as a table with data

Say I have a VIEW on my database, and I want to send a file to someone to create that views output as a real TABLE on their database. mysqldump of course only exports the 'create view...' statement (well ok it includes the create table, but no data) What I have done is simply duplicate the view as a real table and dump that. But for a...

Java Applet - MVC - How to bind model to view?

What's the easiest way to build an applet that has a view with components that are bound to model data and update when the model is updated? Ideally as little code as possible, preferable none/declarative :) If a component type is needed for explanation, please consider a JLabel whose text is bound to a bean with a String getText() acc...

How do I bind to a specific array element in ASP.NET MVC?

I'm using ASP.NET MVC RC1 and trying to bind a textbox to an object property like so: <%= Html.TextBox("Comments.Contacts[0].ContactName") %> It seems like it should work, since this does: <%= ((MuralProject)ViewData.Model).Comments.Contacts[0].ContactName %> But alas, the result in the textbox is an empty string. Am I doing someth...

Problem creating a view containing lookup tables

Hi there guys, should be simple enough but it's causing me a couple of issues. I have a data set similar to the following: User UserID Name Age UserPropertyValues UserID PropertyCodeValueID PropertyCodes PropertyCodeID PropertyCodeName PropertyCodeValues PropertyCodeValueID PropertyCodeID PropertValue Now let's...

C# model view controller

So I am creating a C#/Winforms application in a model-view-controller pattern. My view-controller needs to instantiate multiple groups of objects. The object groups are elements of the model and elements of the view. So for example a textbox and the model to go behind that text box. I'm wondering if the best way to do this is to put eve...

Rendering a view on-the-fly

I'm developing an ASP.NET MVC application that will send the user a confirmation email. For the email itself, I'd like to create a view and then render that view and send it using the .NET mail objects. How can I do this using the MVC framework? ...

Integrating models and views in new Sinatra extensions

So I would like to use the new possibility to create extensions for Sinatra. My Extension needs to integrate a model and some views/templates but I don't know how to or where to integrate them? Did anybody already built something more complex than the example from the documentation? ...

how to create a mssql view for getting last state information

lets say, i have two tables, one for object records and one for activity records about these objects. i'm inserting a new record in this activity table every time an object is inserted or updated. for telling it in a simple way, assume i have four fields in activity table; objectId, type, status and date. when an object is about to be...

Gathering Data: Dynamic Text Boxes.

Edit: if someone could also suggest a more sensible way to make what I'm trying below to happen, that would also be very appreciated I'm building an multiPage form that takes a quantity (of product) from a POST method, and displays a form sequence relying on that number. when the user goes to the next page, the form is supposed to colle...