Showing posts with label ran. Show all posts
Showing posts with label ran. Show all posts

Sunday, March 11, 2012

"sql data source" updating

hello all,

I ran into a problem using the "sql data source updating " method. i'm using a form view with about 20 parameters that are bind to controls in the form view and 5 other parameters that i'm setting the value to in the "sql data source updating" method. Every thing updates find execept for the last 5 parameters that i'm setting the values to in the "sql data source updating" method. My store procedure(sp) updates and insert mulitple tables. For some UNKOWN reason the tables that uses the parameteres in the "sql data source updating " are inserting multple records when only 1 record should be inserted. Have anyone have this problem?

Hi,

Please check if the insert command in the stored procedure has been called several times. Also, is there any triggers fired after the insertion?

If that still doesn't work, please let us see the stored procedure and code for Updating event handler.

Also, if you're inserting a record into the database, I suppose you need to handle the SqlDataSource.Inserting event.

"Select TOP " question

I ran two query: one with order by, one does not.
Note that a clustered index has been build on column
DCN, CO_cd. No index on Sta_Rsn_Cd.
1) select top 1 DCN, CO_Cd, Dept from tblTest
where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
and Sufx = 'C'
and check_out <> 'Y'
order by Sta_Rsn_Cd
2) select top 1 DCN, CO_Cd, Dept from tblTest
where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
and Sufx = 'C'
and check_out <> 'Y'
In BOL
"If a SELECT statement that includes TOP also has an ORDER BY clause,
the rows to be returned are selected from the ordered result set. The
entire result set is built in the specified order and the top n rows in
the ordered result set are returned."
It seems that 2) would run faster than 1). When I run,
1) is faster than 2). I use SQL 2000. Any comments?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!It's hard to say from this. Can you run the SHOWPLAN for each of these
commands and include that here as well.
Rick Sawtell
"YB" <yb@.dex.com> wrote in message
news:eidd8xPoEHA.2948@.TK2MSFTNGP11.phx.gbl...
> I ran two query: one with order by, one does not.
> Note that a clustered index has been build on column
> DCN, CO_cd. No index on Sta_Rsn_Cd.
> 1) select top 1 DCN, CO_Cd, Dept from tblTest
> where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
> and Sufx = 'C'
> and check_out <> 'Y'
> order by Sta_Rsn_Cd
> 2) select top 1 DCN, CO_Cd, Dept from tblTest
> where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
> and Sufx = 'C'
> and check_out <> 'Y'
> In BOL
> "If a SELECT statement that includes TOP also has an ORDER BY clause,
> the rows to be returned are selected from the ordered result set. The
> entire result set is built in the specified order and the top n rows in
> the ordered result set are returned."
> It seems that 2) would run faster than 1). When I run,
> 1) is faster than 2). I use SQL 2000. Any comments?
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Thursday, March 8, 2012

"Select TOP " question

I ran two query: one with order by, one does not.
Note that a clustered index has been build on column
DCN, CO_cd. No index on Sta_Rsn_Cd.
1) select top 1 DCN, CO_Cd, Dept from tblTest
where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
and Sufx = 'C'
and check_out <> 'Y'
order by Sta_Rsn_Cd
2) select top 1 DCN, CO_Cd, Dept from tblTest
where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
and Sufx = 'C'
and check_out <> 'Y'
In BOL
"If a SELECT statement that includes TOP also has an ORDER BY clause,
the rows to be returned are selected from the ordered result set. The
entire result set is built in the specified order and the top n rows in
the ordered result set are returned."
It seems that 2) would run faster than 1). When I run,
1) is faster than 2). I use SQL 2000. Any comments?
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
It's hard to say from this. Can you run the SHOWPLAN for each of these
commands and include that here as well.
Rick Sawtell
"YB" <yb@.dex.com> wrote in message
news:eidd8xPoEHA.2948@.TK2MSFTNGP11.phx.gbl...
> I ran two query: one with order by, one does not.
> Note that a clustered index has been build on column
> DCN, CO_cd. No index on Sta_Rsn_Cd.
> 1) select top 1 DCN, CO_Cd, Dept from tblTest
> where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
> and Sufx = 'C'
> and check_out <> 'Y'
> order by Sta_Rsn_Cd
> 2) select top 1 DCN, CO_Cd, Dept from tblTest
> where Dept = '212' and Sta_Rsn_Cd <> 'TRN' and Sta_Rsn_Cd <> 'NDF'
> and Sufx = 'C'
> and check_out <> 'Y'
> In BOL
> "If a SELECT statement that includes TOP also has an ORDER BY clause,
> the rows to be returned are selected from the ordered result set. The
> entire result set is built in the specified order and the top n rows in
> the ordered result set are returned."
> It seems that 2) would run faster than 1). When I run,
> 1) is faster than 2). I use SQL 2000. Any comments?
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Sunday, February 19, 2012

"HTTP status 400: Bad Request" - Reporting Services 2005

Has anyone ran into this error yet while testing Report Manager?
"The request failed with HTTP status 400: Bad Request."
I can deploy and access reports directly, but I receive the above error when
hitting the http://localhost/Reports URL (i.e. ReportManager)
Also, I'm seeing DCOM errors in the NT event log whenever this happens. A
search in the registry find CLSID references to network components (Network
Connection Manager Class, Network Connection Manager Connection Enumerator
Class, LAN Connection Manager Class, etc). Any ideas? Is there a security
configuration that I'm missing?
Here's an example entry:
Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10016
Date: 11/8/2005
Time: 8:23:48 AM
User: NT AUTHORITY\NETWORK SERVICE
Computer: *SERVERNAME*
Description:
The application-specific permission settings do not grant Local Activation
permission for the COM Server application with CLSID
{BA126AD1-2166-11D1-B1D0-00805FC1270E}
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security
permission can be modified using the Component Services administrative tool.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.I have the same problem and it turns out that you need to change the IP
address of your default website to "(all Unassigned)", instead of
specifiying a specific IP address.
thuan wrote:
> Has anyone ran into this error yet while testing Report Manager?
> "The request failed with HTTP status 400: Bad Request."
> I can deploy and access reports directly, but I receive the above error when
> hitting the http://localhost/Reports URL (i.e. ReportManager)
> Also, I'm seeing DCOM errors in the NT event log whenever this happens. A
> search in the registry find CLSID references to network components (Network
> Connection Manager Class, Network Connection Manager Connection Enumerator
> Class, LAN Connection Manager Class, etc). Any ideas? Is there a security
> configuration that I'm missing?
> Here's an example entry:
> Event Type: Error
> Event Source: DCOM
> Event Category: None
> Event ID: 10016
> Date: 11/8/2005
> Time: 8:23:48 AM
> User: NT AUTHORITY\NETWORK SERVICE
> Computer: *SERVERNAME*
> Description:
> The application-specific permission settings do not grant Local Activation
> permission for the COM Server application with CLSID
> {BA126AD1-2166-11D1-B1D0-00805FC1270E}
> to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security
> permission can be modified using the Component Services administrative tool.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.