Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Wednesday, March 21, 2012

Delay in running queries

I have a problem in running queries.

I developed an application uses sqlserver 2005 express edition

I create all queries in storedprocedures.every things work perfect but some times I get long delay in running queries. but after some minutes it comes regular . I coudlnt find any relation between delay and time of work.it comes by chance . also I set timeout for running query for 30 sec. but some times it took more than minutes.

what should I do?

It sounds like you are experience 'blocking' and 'locking' behavior. If you post the complete stored procedure code, we 'may' be able to help you.

And you could also use Profiler to determine what procedures and/or statements in the procedures are causing the blocks.

|||

my data base has so many procudures and this problem may happend in running each one . one simple of them is :

set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[STPListStock]

AS

SELECT GoodSyscode, Title, Code, BarCode, Type, FstUnit, SecUnit, UnitRate, OrderPoint, SalePrice1, SalePrice2, SalePrice3, SalePrice4, SalePrice5,

VisitorPer, Comment, DiscontPer, UserPrice, GroupName1, GroupName2, Term, Weight, SerialNo, TypeId, GroupId1, GroupId2

FROM VWCompleteGood

|||

try this

EXEC sp_dboption '<db_name>', 'autoclose', 'false';

Tuesday, February 14, 2012

Default Printing Option for Crystal Report

I have developed a PDF web report which opens in a browser by using Crystal Report for VS.NET 2003. Is there any way to capture the printer settings of the users (who view this report) and change the Printer Paper Size to Legal? I understand that this is a security issue and this is not permitted under normal circumstances...but is there a round about way? My OS is Windows 2003.
Thanks for your helpIf I understand your question correctly, here's how I do it in VB 6 and CR 8.5 using RDC (maybe you can manipulate it to fit your needs?).

Report.PaperSize = crPaperLegal
Report.PrintOut

This way, you don't have to change the user's settings.