Performance Problem With VS2005 Code Style?

May 31, 2006

I run into a wirt asp.net sittuation, when coding my ASP.NET page using the traditional old way like this, it runs very fast:

        Dim thisSQL =" SELECT strAuthorName, strTitle, strContent, lngChapter, tblKiemHiepChapters.strReference FROM tblKiemHiepAuthors A " & _
                     " INNER JOIN tblKiemHiepTitles B ON A.ID=lngAuthorID " & _
                     " INNER JOIN tblKiemHiepChapters ON B.ID=lngTruyenID " & _
                     " AND tblKiemHiepChapters.ID="& e.CommandArgument

        Dim thisConnection As SqlConnection = new SqlConnection(ConfigurationSettings.AppSettings("DNS2"))
        Dim thisCommand As SqlCommand = New SqlCommand(thisSQL, thisConnection)
        thisConnection.Open()
        dim objReader As SqlDataReader = thisCommand.ExecuteReader()
       
        objReader.Read()
        if objReader.HasRows then
            if (objReader.Item("strTitle") Is DBNull.Value ) Then
               thisHeading = Replace(thisHeading, "#HEADING#", "" )

            else
               '''''''''''
            end if................

but when I used VISUAL STUDIO.NET way of binding datasouce like below: it runs so damn slow. do you guys know what the problem is? if you need to see the complete code please let me know. this happen when my ntext field that contains lots of text (the code post heredoes  not necessary have the same functionality)

<asp:SqlDataSource ID="GetContentByChapterID" runat="server" ConnectionString="<%$ ConnectionStrings:nangmoi_cnn_string %>"
SelectCommand="SELECT [lngChapter], [strReference], [strContent] FROM [tblKiemHiepChapters] WHERE (ID = @ChapterID)">
<SelectParameters>
<asp:SessionParameter DefaultValue=0 Name="ChapterID" SessionField="ChapterID" Type="Int32" />
</SelectParameters>           
</asp:SqlDataSource>

View 1 Replies


ADVERTISEMENT

Problem Converting VS2003 Code To VS2005

Aug 14, 2005

Hi:

View 7 Replies View Related

VS2005/SSR2005 Report Controlling Field Visibility By Code

Jan 23, 2007

VS2005/SSR2005 Reporting: How can one control an individual report fields visibility (toggle on/off) at run time, based on data values (of the same field or another field) in the report. Without user having to sit there and "Click".

Thanks

Zulu5255

View 6 Replies View Related

Generic Way To Style Reports (CSS Style)

Jun 9, 2006

I want to make a CSS Style solution for my reports. I have few ideas related to this, changing the report properties on the fly, but I am not sure for which I should go for.

- We know that we can put expression on reports almost everywhere, and can also call custom code for setting up those expressions. i.e.

Public Shared Function GetValue(ByVal Key As String) As String

Dim myDataReader As SqlDataReader
Dim mySqlConnection As SqlConnection
Dim mySqlCommand As SqlCommand

mySqlConnection = New SqlConnection("server=localhost;Trusted_Connection=yes;database=tempMIQB")
mySqlCommand = New SqlCommand("SELECT * FROM [Properties] Where PropertyName='" & Key & "'", mySqlConnection)
mySqlConnection.Open()
myDataReader = mySqlCommand.ExecuteReader(CommandBehavior.CloseConnection)

If myDataReader.Read() Then
GetValue = myDataReader.Item("PropertyValue").ToString
Else
GetValue = "None"
End If


End Function

and in textbox or any where I can say =Code.GetValue("BGColor") or from .NET dll.

For going further on with this idea I can create an .NET dll and get the list from database or XML file. (Please give suggestions for performance/scalability issue.)

- second idea is to write a custom application (script) which can go through all the reports and change the color and fonts and every thing.

- third is to use parameters and use Array.IndexOf method to search for the value, but in this case i need to add dataset to all reports and, I think we cannot access report properties i.e. Parameters from custom code, just to make a generic function to access parameter value.

View 1 Replies View Related

Understanding Microsoft Code For Index Performance...

Sep 25, 2007



Hello,

I found this code in a Microsoft document about index perfromance in SQL 2005. Can some one explain what iss returned by this statement, in relation to what I should do with this data to create/improve indexes? I am not sure based on the results what the columns mean as far as what needs to be done to indexes. What is the equality_columns, included_columns, statement, etc information? Do I make an index for the included_columns? Any help would be appreciated.

Here is the code:
-- Potentially Useful Indexes
select d.*
, s.avg_total_user_cost
, s.avg_user_impact
, s.last_user_seek
,s.unique_compiles
from sys.dm_db_missing_index_group_stats s
,sys.dm_db_missing_index_groups g
,sys.dm_db_missing_index_details d
where s.group_handle = g.index_group_handle
and d.index_handle = g.index_handle
order by s.avg_user_impact desc
go
--- suggested index columns and usage
declare @handle int

select @handle = d.index_handle
from sys.dm_db_missing_index_group_stats s
,sys.dm_db_missing_index_groups g
,sys.dm_db_missing_index_details d
where s.group_handle = g.index_group_handle
and d.index_handle = g.index_handle

select *
from sys.dm_db_missing_index_columns(@handle)
order by column_id

View 2 Replies View Related

Performance Comparison - Code Vs SqlDataSource, Gridview Etc Vs PlainControl

Jun 9, 2007

There are so many ways to use database in asp.net/ado.net, I'm a bit confused about their difference from the performance point of view.So apparently SqlDataSource in DataReader mode is faster than DataSet mode, at a cost of losing some bolt-on builtin functions.What about SqlDataSource in DataReader mode vs manual binding in code? Say creating a SqlDataSource ds1 and set "DataSourceID" in Gridview, vs manually creating the SqlConnection, SqlCommand, SqlDataReader objects and mannually bind the myReader object to the gridview with the Bind() method.Also Gridview is a very convenient control for many basic tasks. But for more complex scenarios it requires lots of customization and modification. Now if I do not use gridview at all and build the entire thing from scratch with basic web controls such as table and label controls, and mannually read and display everything from a DataReader object, how's the performance would be like compared to the Gridview-databind route?

View 3 Replies View Related

High CPU Performance Issue With BIGINT Column Comparison SQL Code

Dec 11, 2007

I recently converted a column that was once an int to an bigint on one of my tables. The modified column provided a generic row id information and there are duplicates within this column. I am trying to perform a self join via the following:

SELECT a.row_id FROM test_db a INNER JOIN test_db b ON b.row_id < a.row_id.

This code use to work when the column was an int but now I am getting high CPU issues since I converted to bigint. I am unsure on why the change to bigint will cause such an issue. The OS/SQL is 64BIT.

Thanks for the help in advance.

View 7 Replies View Related

Style Sheets

Jun 24, 2005

How can I apply a style sheet "style.css" to a .rdl file (a report in Reporting Services)?
Could I modify the width of the parameters combobox?

View 1 Replies View Related

Pre-4.1-style Password

Feb 24, 2007

Hai,

" When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password. Reset the password to a pre-4.1 style for each who must use a pre-4.1 client program."

What is "pre-4.1-style password"? Can you give an example for a "pre-4.1-style password"?

View 2 Replies View Related

Format Style

Feb 21, 2008

i can't find the format style for mmddyyyy..

Funnyfrog

View 3 Replies View Related

MySQL Style INSERT INTO SET

Apr 21, 2006

MySQL allowed INSERT statements that looked like this:
INSERT INTO Table SET col1 = value1, col2 = value2, col3 = value3
Basically this closely matched the format of the UPDATE statements.
Here is why this was good:  I could do something like this: if (RecordExists == false) {
SQLquery = "INSERT INTO Table SET ";
} else {
SQLquery = "UPDATE Table SET ";
}
SQLquery += "col1 = value1, ";
SQLquery += "col2 = value2, ";
SQLquery += "col3 = value3, ";
SQLquery += "col4 = value4 ";
if (RecordExists == true) {
SQLquery += "WHERE id = " + ourID;
}

If I had a good 50 columns then it means I can reuse a sizable chunk of code for both INSERT and UPDATE statements (since both use the same general format).  Whereas if I have to use "INSERT INTO Table(columns) VALUES (values)" then I'm look at duplicating a lot of code.
Does MS-SQL support something similar to "INSERT INTO SET"?  How are others dealing with this?
Thanks,
Gabe---------------------- 
 

View 6 Replies View Related

Convert Style For Datetime

Jan 19, 2006

Hi,

If the datetime value is '20.01.2006', what will be the style in CONVERT function ?

Eg : select convert(datetime, '20.01.2006') gives datetime out-of-range error.

There is no style provided for dd.mm.yyyy in SQL Server documentation. Is there any way to do such conversion with this constant value of format dd.mm.yyyy ?

Please advice,

Thanks,
MiraJ

View 4 Replies View Related

TSQL Coding Style - An Example

Jun 11, 2007

Hi!If you like to spend some moments on my code examples,please look at it - usage is free (-:http://www.codeproject.com/useritems/TSQL_coding.aspFeedback welcome.GreetingsBjorn

View 1 Replies View Related

Transaction-style Inventory?

Jul 20, 2005

Hello, I'm looking for a little input on this situation.I'm working on an inventory system and was thinking that I'd like tobuild it similiar to the way a bank keeps track of your funds.If you look at at bank statement, for each line item, you'll normallysee at least date/time, description, amount (plus or minus value), andbalance.In my inventory system, the amount and balance would be a count of theitems used or transferred instead of money.Does this sound reasonable? Or is there a better design? I am planningto connect the inventory system to a few different ordering interfaces,and I think it would work well if I can dump transactions into theinventory instead of incrementing and decrementing counts.The only problem I see with this, is if I want to implement the balancepart of it with each record....I can't think of a way to do that currently.I can certainly use a trigger in the database to retrieve the mostrecent transaction and update the balance field for one record insertedat a time, but if a list of transactions is dumped into the inventorysystem at once, I'd have to compensate for that in the trigger.Ideas?*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 2 Replies View Related

Xml Input Using Xml Style Sheet

Jan 21, 2007

Trying to install SQL express but can't. I used the uninstall tool and it keeps hanging up on this error.

I am using XP and IE7.

I have also adjust my security setting to allow cross domains. Short of going and getting another machine I am at a loss.

No beta software is on machine and I also cleaned the registry..



I am not a developer. This looks like an issue all around MS..

View 1 Replies View Related

Rectangle Border Style

Apr 30, 2008



Is it possible to make a rectangle appear sunk or raised? I've had a play with the different border style settings but they don't appear to make any difference! Can anyone also tell me what the Groove, Ridge, Inset etc are supposed to do?


Thanks

View 3 Replies View Related

How To Use Border Style Expression

Dec 6, 2007

I have 2 details section in my report. I want to set bottom border style to solid for the first detail section if the second detail section is empty. And set to none if the second detail section has value. Basically I want to show the line below the first detail section and hide the second detail section if the second detail section is empty. otherwise I want to show the line only below the second detail section.

I am able to hide the detail section. But can't set the border style using expression.

I hope the above para is not confusing you

Thanks

View 6 Replies View Related

Chart Marker Style

Apr 9, 2008



Hi,

In reporting services simple chart report we can keep markers for line values like square , circle , cross etc..

My question is it possible to keep separate style marker for each line?

Thanks

Shekar Reddy

View 1 Replies View Related

Mass Import To Sql Server Through Asp.net Vb Style

Feb 25, 2004

I am making a prog that needs to import many records from a spreadsheet on a local computer through asp.net into sql server
is there a simple command to do this or is there information on how to do this
please give all the information that you can thank you

View 9 Replies View Related

How To Compare 2 Tables Ot Different DBs In Oracle Style

Mar 12, 2004

In Oracle this is done this way :

SQL>
1 select ID, NAME from TABLENAME
2* minus select ID,NAME from TABLENAME@DATABASE2
SQL>

Any ideas ?

View 6 Replies View Related

Legacy Dts Style Execution Display.

May 22, 2006

My manager wants me to produce a legacy dts-style display of an executing package in an asp.net grid view. It would be color-coded the same way: red, green, black showing the status of each step with start and finish time. Any ideas on how to do this?

View 3 Replies View Related

DTS Old Style And Dynamic Properties Tasks

Sep 11, 2007

Im using embedded SS2000 DTS packages in SSIS. These legacy packages use Dynamic Properties Tasks to pick up connection settings from a named ini file. The name of that ini file needs to change occasionally. To date the only way we have of doing this is resetting all the dynamic properties to point at the new ini file. Unfortuntely there are a lot of connections and properties and there is no budget to recreate these packages in SSIS. There must be an easier way?!

Does anyone know how to quickly change Dynamic Properties Tasks to look at a new ini?

View 5 Replies View Related

Subscript Font Style In A Text Box?

Jul 12, 2006

Seems like a long shot, but I'd really like to show "CO2" (chemical formula for carbon dioxide) with the "2" as a subscript, in a report text box. The "CO2" would be embedded as part of a sentence, e.g. "The CO2 emissions..." Is there any way to do this?

Eva Pierce Monsen

View 10 Replies View Related

Assistance With Lookup Style Query

Sep 28, 2007

I have two tables that are pretty standard I think. Table a has product descriptions and one of those fields is a price. I have a second table that contains fees based on the price. so table B looks like this.

min max fee
0 19.99 2.50
20.00 49.99 3.50
50.00 1000.00 5.50

the max ends up around a million just to be sure we cover all prices. my problem is this I need a very efficient query to
poll all the values from A and the correct value from B. All the attempts I have made are not working. I also have to make sure this query is extremely efficient as it is executed several times a minute. If there is a better way in general to structure this I am all ears. I wanted to avoid placing the fees in the product table as the fees are updated often, but if its the only way to get this to work, then that is where I will go.

Thanks everyone

View 7 Replies View Related

Applying CSS Style Sheet To A Report..

Oct 31, 2007

Hi,
i have created a rdl file with 10 columns.Also i have an aspx page which will list the ten columns. The user can select some columns and on clicking report button report will be generated in PDF format(Using the rdl file).
Now i want to apply style sheet to the report dynamically from aspx page.. how to do that..Help me.
Thanks in advance

View 3 Replies View Related

Using External Style Sheets In Reports

Apr 23, 2007

Hi,



I am building reports using Sql Server 2005 Reporting Services. I have to build more than 20 reports. I felt it is tedious to format each report individually. Is there a way to include external style sheets in reports?



Thanks in advance for your help!

View 10 Replies View Related

Recursive Query For Tree Style Menu?

Mar 12, 2013

Information stored within the database is as follows, although the number of sub levels could easily grow :

PageID - Title - ParentID
1 - Title1 - 0
2 - Title2 - 0
3 - Title3 - 1
4 - Title4 - 1
5 - Title5 - 4

Required outcome :

[+] Title1
.....[+] Title3
.....[+] Title4
..........[+] Title5
[+] Title2

View 3 Replies View Related

How To Send Email Using HTML Style With Picture?

Jun 5, 2008

Hi all!

I have a proc which send email as a text. But now I have to rewrite her to send email as html and embed a picture there.

I use DatabaseMail with sp_send_dbmail.
Does anybody know how to sort out it?

If somebody another way to send email as html with picture don't hesitate, say me.

Thanks in advance!

View 10 Replies View Related

Need Help With Converting Old Style Subselect To ANSI Joins?

Jul 20, 2005

Help!I'm trying to understand the new ANSI join syntax (after many years ofcoding using the old style). I am now working with an application that onlyunderstands ANSI syntax so I am struggling.My first (old style syntax) SQL statement below produces 60 rows:SELECT A1.CONTACTID, A1.LASTNAME, A1.FIRSTNAME, A1.ACCOUNT,A6.CITY, A6.STATE, A1.WORKPHONE, A1.FAX, A1.EMAILFROM CONTACT A1,ADDRESS A6WHERE A1.ADDRESSID=A6.ADDRESSIDAND A1.CONTACTID IN(SELECT A4.CONTACTIDFROM CONTACT_LEADSOURCE A4,LEADSOURCE A5WHERE A4.LEADSOURCEID = A5.LEADSOURCEIDAND A5.DESCRIPTION = 'some_description' )AND A1.CONTACTID IN(SELECT A2.CONTACTIDFROM TICKET A2,ENROLLHX A3,EVENT A7WHERE A3.STATUS IN ('R', 'Confirmed')AND A2.TICKETID = A3.EVXEVTICKETIDAND A3.EVENTID = A7.EVENTIDAND A7.CODE IN('AHS00','AHS01','AHS02','AHS03','AHS04','AHS98',' AHS99'))ORDER BY A1.LASTNAME ASCI am trying to convert this to the newer ANSI sytax. My second SQL statementbelow produces 67 rows (duplicates):SELECT A1.CONTACTID, A1.LASTNAME, A1.FIRSTNAME, A1.ACCOUNT,A6.CITY, A6.STATE, A1.WORKPHONE, A1.FAX, A1.EMAILFROM CONTACT A1JOIN ADDRESS A6 ON (A1.ADDRESSID=A6.ADDRESSID)JOIN( SELECT C.CONTACTIDFROM CONTACT CJOIN CONTACT_LEADSOURCE A4 ON (C.CONTACTID= A4.CONTACTID)JOIN LEADSOURCE A5 ON (A4.LEADSOURCEID =A5.LEADSOURCEIDAND A5.DESCRIPTION ='some_description' )) AS C1 ON C1.CONTACTID = A1.CONTACTIDJOIN(SELECT C2.CONTACTIDFROM CONTACT C2JOIN TICKET A2 ON (C2.CONTACTID =A2.CONTACTID)JOIN ENROLLHX A3 ON (A2.TICKETID =A3.TICKETID AND A3.STATUS in ('R', 'Confirmed'))JOIN EVENT A7 ON (A3.EVENTID = A7.EVENTIDAND A7.CODE IN ('AHS00','AHS01','AHS02','AHS03','AHS04','AHS98',' AHS99')))AS C3 ON C3.CONTACTID = A1.CONTACTIDCan anyone shed some light on what I am missing?cheers,Norm

View 3 Replies View Related

How To Get Next/previous Cells In Matrix In Excel Style?

Apr 30, 2008

Hi

I have matrix, in data cells I want to perform calculation based on value in this cell and next/previous cell. Something like : "=B3-A3" in MS Excel.

How can I get the value form next/previous cell in matrix?

There is Previous function but it does'nt work in matrix. Are there workarounds?

Andriy Zhornyk

View 2 Replies View Related

PDF And Merge Cell Border Style Issue

Apr 10, 2007

Problem: I have borders that are hidden (Border Style=None) that appear ok in HTML but when Render in PDF they appear when they should not. Basically I am using a few columns like TABS in one Major Column in my report in combination with Merge Cells.



In Sql2000 -> There is no problem in the HTML or PDF rendering.



In Sql2005SP1 -> The problem occurs in two forms:

a) Problem Only Shows up in the PDF Creation call in our ASPX in IIS

b) Problem occurs in both the ASPX call and the Reporting Services Report Upload (Export to PDF)

Is there a fix to this issue or work around?

View 1 Replies View Related

Sharing Style/formatting Between Reports Or Objects

Apr 9, 2007

To date I have found no way of defining styles that can be shared either between objects or between reports.



I am looking for the concept of the rdl making a reference to an external css (or equivalent) file. This would allow for me to define a font or image external to the rdl and shared among all my reports. Currently if I want to change my header image, I need to edit 50 rdl files across the reporting suite.



What work arounds are available for this? Is this a coming feature enhancement? If so when? Does the reporting team publish a list of future enhancments?



I know crystal and few other reporting packages have the concept of css or style external to the report.



Cheers

View 1 Replies View Related

Logon.aspx Won't Render Images Or Style

Jan 31, 2007

Hello - we are using the custom security extension and SSL on our reporting site. Everything works great except for the logon.aspx page. It functions fine but it won't display the embedded styles or images on the page. Any clue why that would be? We get a white page with broken image links.

Our uilogin.aspx page shows styles and images. We've cut and pasted this code directly into logon.aspx but it still doesn't work. I have verified that the files are in the ReportServer folder.

Thanks for any help you can give.

View 1 Replies View Related







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