Database Queries - Compiled Vs Uncompiled DB Qualifiers

May 7, 2010

We have an ASP.NET application that uses SQL statements, where table names are unqualified. When compiled, it works fine, but when uncompiled, it complains and errors out, saying these tables dont' exist. (Qualified name looks like Select * from MyDatabase.mySchema.MyTable; Unqualified like Select * from MyTable) If you try these queries on the database, by yourself, it will take only the qualified names. What's going on? I thought Compiled vs Uncompiled apps should perform the same way codewise.

View 2 Replies


Similar Messages:

C# - Uncompiled User Controls Running In Compiled Web App?

Feb 23, 2011

Is it possible to compile my web forms app and deploy it, then drop some user controls in it later to add functionality? (assuming I had taken into account being able to load user controls dynamically in the first place)

View 3 Replies

Entity Framework - Is Using Public Static Variables For Compiled Queries Bad In Applications?

Aug 19, 2010

I'm coding a business layer for an ASP.NET application. I've created database methods in my BLL as static. I've created public static Func variables to be compiled and used in several different methods, like this:

namespace BLL
public class User
{
public static Func<Context, variable, result> selectUser;
private static void CompileQuery()
{
if(selectUser == null)
{
selectUser = CompiledQuery.Compile......
}
}
public static UserClass Select(int id)
{
CompileQuery();
//uses selectUser
}
public static SomethingElse DoSomethingElse()
{
CompileQuery();
//also uses selectUser
}
}

It'll be used in ASP.NET layer like this: using BLL;

private void AddUser()
{
UserClass user = User.Select(id);
}

My question is, since static variables are not thread-safe, is this a bad design decision? I'm thinking of either implementing a locking mechanism, which makes me think if it'd slow down the application, or using instantiated class approach which makes me wonder if query compiling would be beneficial.

View 1 Replies

Avoid Too Many Queries Repeatedly To Database

Aug 31, 2010

Among methods: static variables, viewstate, session and cache for avoiding on loading repeatedly and less making queries to the database. What do you think the best method of the 4 above? I Think Cache is the best one? Or any other methods better in Asp.net 3.5 or higher?

View 3 Replies

Projecting Simultaneous Database Queries

Aug 17, 2010

I'm after some thoughts on how people go about calculating database load for the purposes of capacity planning. I haven't put this on Server Fault because the question is related to measuring just the application rather than defining the infrastructure. In this case, it's someone else's job to worry about that bit! I'm aware there are a huge number of variables here but I'm interested in how others go about getting a sense of rough order of magnitude. This is simply a costing exercise early in a project lifecycle before any specific design has been created so not a lot of info to go on at this stage.

The question I've had put forward from the infrastructure folks is "how many simultaneous users". Let's not debate the rationale of seeking only this one figure; it's just what's been asked for in this case! This is a web front end, SQL Server backend with a fairly fixed, easily quantifiable audience. To nail this down to actual simultaneous requests in a very rough fashion, the way I see it, it comes down to increasingly granular units of measurement:

Total audience
Simultaneous sessions
Simultaneous requests
Simultaneous DB queries

This doesn't account for factors such as web app caching, partial page requests, record volume etc and there's some creative license needed to define frequency of requests per user and number of DB hits and execution time but it seems like a reasonable starting point. I'm also conscious of the need to scale for peak load but that's something else that can be plugged into the simultaneous sessions if required. This is admittedly very basic and I'm sure there's more comprehensive guidance out there. If anyone can share their approach to this exercise or point me towards other resources that might make the process a little less ad hoc

View 1 Replies

Count SQLClient Database Queries From App

Aug 30, 2010

I need to do some performance testing for an ASP.NET MVC application and specifically want to measure how many database queries each HTTP request results in. The data access layer is using LINQ-to-SQL. I'd like to be able to automate the tests so am looking for a good way to be able to do a before and after count of the number of SQL queries. The possibilities I can think of are: A performance monitor counter for the ASP.NET process, A system table in the MSSQL database that can be queried before and after each page request, A property somewhere in the System.Data.SQLClient namespace that tracks the number of queries executed by the process. Has anyone done this before and can perhaps point my down the right path?

View 1 Replies

To Make Queries To An Access Database Programmatically?

Feb 26, 2010

VWD 2008 Express. Visual Basic.

I know how to create an AccessDataSource on my aspx page and how to use the datasource to populate gridviews, etc. But I want to know how I can programmatically populate a dataset by querying an Access database. How do I make queries to an Access database programmatically?

View 8 Replies

AJAX :: Add Queries In To Database Without Page Refresh?

Mar 29, 2010

How to add queries in to database using ajax (without page refresh).

View 1 Replies

C# - Efficient And Proper Linq Queries From Database

Nov 9, 2010

A sample linq query from MSDN: var expensiveInStockProducts = from p in products where p.UnitsInStock > 0 && p.UnitPrice > 3.00M select p; Does this query select EVERY column from the database table immediately, or does it return some sort of pointer that retieves the actual column data on demand? ie. If there are 50 columns in my table and I only use a single p.UnitsInStock in my actual code, then am I retrieving 50 times more data than I expected?

View 2 Replies

Security :: Stop The Repeated Database Queries For Roles?

Aug 24, 2010

We have a web application using VS 2008, c#. We try to filter siteMap nodes based on security roles. We have our customized the mether GetRolesForUser() in RoleProvider class to determine a user's role. In this method, roles will be returned by querying an SQL Server database. However, we found that each time a page was loaded/refershed, this GetRolesForUser() was called, and the database would be queried. This is too MUCH and expensive. We thought the roles should be queried only once when a user logs in. After that, role info should be stored somewhere for this user, rather than query DB all the time.

View 3 Replies

ADO.NET :: Select Statement To Called Queries Table In Database?

Sep 2, 2010

anyone know that can we used select statement to called queries table in database or not?usually people used select statement to called common table in database.

View 4 Replies

Web Forms :: Deal With Many Parameter Boxes Firing Database Queries?

Jul 22, 2010

I am very new on the C# and ASP scene and am after some advice on how to handle a senario. I have a asp website with 10 text boxes. These boxes form the basis of a user completed parameter selection. There is a button that will fire the query. The compliction is that some of the textboxes may be left blank and any combination may be filled in.

The only way i could think to do this is with countless IF statements. The user clicks the button and the process checks out the senarios and runs the corresponding SQL statement. The problem with this is that there are a vast amount of possible senarios depending on whether the user completes one box, all boxes, or a mix of any of them. The SQL query is the same for each senario bar the WHERE statement which changes depending on which text boxes are filled in. Is there another way of doing this or do i really need to write every possible senario out in full?

View 14 Replies

DataSource Controls :: Table / Database Design Theory - Return Faster Queries

Feb 5, 2010

In general terms, which way will require more server processing power and which way will return faster queries... if there is even a difference. The client's database is still on the dev MS SQL server but is essentially but the client has decided they want to collect two more fields of information. Both fields are going to be collection text data and probably varchar(300) will be sufficient for the column data types. Would it ultimately be more efficient to

Add two additional columns in the main table so the data is entered directly into each record, or Add an additional table (or two) with a foriegn key to the primary table that holds the info for each new field The SELECT statement for the main table could be modified to either add the new columns (a.NewColumn1 and a.NewColumn2) or it could contain nested SELECT statements that pull in the data from the other tables. Custom daisy-chained Insert or Update statements would be no problem and a cascade Delete relationship would take care of any deletions. I'm just trying to figure out which would be better from a performance standpoint?

View 3 Replies

Verbatim - Why Write @ Before Sql Queries - Select Data From Database Then Write Query?

Oct 1, 2010

Suppose we want to select the data from the database then we write the query for that. Example:

SqlConnection con=new SqlConnection(Connetion name) string selectPkId = @"SELECT PK_ID FROM TABLE" SqlCommand cmd=new SqlCommand(selectPkId ,con);

So,my question is that why we basically use @ before the sql query.If I don't use @ before that then it again work fine (does not give any error), then what is need of using "@"?

View 1 Replies

X].aspx Has Not Been Pre-compiled And Cannot Be Requested

Dec 29, 2010

Running Windows Server 2008 R2 (IIS 7.5). This is happening at a client's site and works fine on our internal servers with the same OS configuration. We are using the following work-around for now:Modify the Advanced Settings of the Application Pool that the site uses, and change the Identity used by the Process Model from ApplicationPoolIdentity to NetworkService

View 1 Replies

Configuration Has Not Been Pre-compiled, And Cannot Be Requested?

May 4, 2010

Complete newbie with asp.net using 2008 express edition.I made a master page and one simple page, and used the ftp copy web site tool to load the pages to my web site.When I try to open the one page, I get the message has not been pre-compiled, and cannot be requestedI havedone some searching on the error message, and most places talk about missing things from the Bin directory. I don't have a bin directory on my local machine.

View 8 Replies

Compiled Code Better Than Interpreted?

Oct 26, 2010

Why we say compiled code in ASP.NET using C# or VB.NET means high performance and in the other side the server controls make the website slower! so if we combine server controls + compiled code the result will be the same as other interpreted technologies, so where is the speed and performance in ASP.NET? From this point of viwe it seems to be the same as others technologies, right?

View 9 Replies

Configuration :: UserControls Not Getting Re-compiled?

Nov 22, 2010

We deployed a UserControl to our testing server. Then made a change to the UserControl and re-deployed. I cannot get the change to take. We have cycled the ASP.NET server, deleted the file completely and re-copied, and also tried a suggestion to change the web.config in order to force all files to be re-compiled.

I definitely know that we are changing the correct file. At one point, I removed the UserControl file altogether and received the "File not found error" when trying to load the user control. The file IS the correct version on the testing server.

[ASP.NET 4.0, Windows Server 2003 SP2, IIS (I think 6?)]

View 4 Replies

Asp.net - How A Compiled XSLT Works On IIS?

Feb 28, 2010

My XSLT was compiled via xsltc, the performance is hugely improved. However, I am wondering how the compiled XSLT works on IIS? Will there any cached of the compiled XSLT instance on the IIS after 1st JIT'ing. As I am seeing my page slightly slow in response from server, but if the page after being called once, subsequent access to the page will faster. So I am suspecting all the transformation processes was not cached for long time on server side.

View 1 Replies

Edit Resource File Which Is Compiled Into A Dll?

Jun 29, 2010

my asp.net site uses resource files for a referenced project with the user controls in it.

so i have one website project, and one dll project with usercontrols + the resource files.

The website references the dll project.

So far so good.

When i publish, the dll with the usercontrols gets compiled in a dll (what else) but the resource files also get compiled (a separate dll for every language)

Is there a way to edit the resource strings in the dll once deployed?

View 1 Replies

Configuration :: Web Application Is Compiled At Run-time?

Aug 9, 2010

I'm using "VS 2010 Ultimate" "Web Application" project.

The problem is that web application compilation occurs at run-time.

My steps:

1) change Wep Application source code (*.cs files)

2) rebuild "Web Application" in Visual Studio

3) run web site's(mapped under IIS 7.5) start page via browser

4) Problem: CSC.EXE starts compiling wep application for the second time! Despite I've done it on step 2)

What should I do to escape step 4) ? I don't need re-compilation at run-time!

I've tried "to play" with <compilation batch="false" but it seems to be ignored.

View 6 Replies

How To Specify An Assembly File Name For A Compiled Application

May 24, 2010

I have read under: Compiling Web Application Projects [URL]

... this compilation model creates a single assembly, you can specify attributes, such as assembly name and version.

You can supply a PATH (directory name only) in the Visual Studio "Build Options".

But where can the file name for the assembly be specified?

View 1 Replies

Pages Both Forms And MVC Dynamically Compiled?

Feb 17, 2011

There is a pattern in ASP.NET - whenever there is a piece of markup that generates code (like the .aspx/.ascx files in WebForms or .cshtml files in MVC3), these files are dynamically compiled at runtime. aspnet_compiler will produce another assembly for them, which references your code-behind assembly. This approach seems awkward to me and I don't understand why it hasn't been discontinued already. A much better approach (in my opinion) is like in Winforms or resource files - you have your .whatever file, and then there is .whatever.desginer.cs file. This designer file is created at runtime as you type. When you compile, the compiler doesn't care about your .whatever file, it just takes the .whatever.designer.cs file and produces a single solid assembly. This provides several benefits:

You can inherit your forms from each other, similar to windows forms;
You can always see the code that is being generated, possibly adjusting your markup to generate better code;
You can easily instantiate strongly typed instances of your forms;

The only benefit I can see from dynamic compilation is that You can change the markup file anytime and don't need to recompile the app.To be honest, I've often wanted for one of the first three benefits, but never for the last one. Recompiling the app to see your changes isn't that big of a deal. Especially since you have to do it anyway when working with code-behind, where the most of your time will be. And when you deliver your app to the client, you deliver it as a monolithic, precompiled block. When you update, you update everything, not just individual .aspx files - there's no point to. why is it like this? What am I missing?

View 2 Replies

How To Add A Custom .aspx Into Already Compiled Website

Jan 28, 2011

We have a company product (asp.net website) that gets compiled and distributed to our clients. I need to figure out a way to allow us to add in an ad hoc aspx webpage into the website (so it recognizes the master page, the forms authentication, assemblies, etc) without having to provide them with an un-compiled version of the website product.Is this possible. Is there a better method than having a special compiled version of the website on their server.

View 1 Replies

Web Forms :: File Xyz Has Not Been Pre-compiled, And Cannot Be Requested

Jan 1, 2010

Using ASP.NET 3.5 / VS 2008.I have an app that has been deployed on 13 different servers at client sites with no issues. One of the modules is an aspx file that generates a crystal report.When I deployed the app to a Windows 2008 server-64 bit/ IIS 7, the aspx page that uses crystal reports errors out with the message:The file 'xyz.aspx' has not been pre-compiled, and cannot be requested. (All other aspx pages load just fine).

View 1 Replies







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