Friday, March 23, 2012
kill long running (hung) SQL task
task if it has been running for a determined period of time? This feature is
available in windows task scheduler, not SQL 2005?
D.
You can write a script to check for long running jobs and
schedule to run at whatever time interval makes sense for
your purposes.
-Sue
On Wed, 7 Feb 2007 08:16:00 -0800, dsm4898
<dsm4898@.discussions.microsoft.com> wrote:
>We have an SQL task that occasionally hangs. Is there a function to end a
>task if it has been running for a determined period of time? This feature is
>available in windows task scheduler, not SQL 2005?
Monday, March 19, 2012
Keyword Function in SQL Server 8.0 but not in 7.0
SQL server 8.0 has "function" as keyword but version 7.0
doesn't. I have a table that has two columns labeled
Module, and function. I have a store procedure that calls
this two columns but since I swicht from SQL Server 7.0 to
8.0 the function its a keyword in 8.0...and I can't store
my records when I swicth to SQL version 8.0
How I can force the SP to take the name of a column as a
field instead of a keyword? I tried to place brakets but
still I can't run my store procedure...in other words I
can't store new records in my table whose field's name is
a keyword...
I define my table like this.
...
[Module]
[Function]
...using brackets...but nothing...any ideas?
Thanks,
Patty
*******************SP*******************
***********
ALTER PROCEDURE sp_LogErrors
@.ID int, @.Number int, @.Description varchar(255),
@.Application varchar(30), @.Version varchar(30), @.Source
varchar(30), @.Module varchar(30),
@.Function varchar(30), @.Occurred DateTime, @.SBCID
varchar(30), @.Machine varchar(30)
AS
INSERT INTO Error (ID, Number, Description, Application,
Version, Source, [Module], [Function], Occurred,
Machine )
values (@.ID, @.Number, @.Description, @.Application,
@.Version, @.Source, @.Module, @.Function, @.Occurred,
@.Machine)What error message do you get if you execute that procedure from Query
Analyzer?
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Patty" <anonymous@.discussions.microsoft.com> wrote in message
news:b58901c3ecd3$aa67cd90$a301280a@.phx.gbl...
> Hi,
> SQL server 8.0 has "function" as keyword but version 7.0
> doesn't. I have a table that has two columns labeled
> Module, and function. I have a store procedure that calls
> this two columns but since I swicht from SQL Server 7.0 to
> 8.0 the function its a keyword in 8.0...and I can't store
> my records when I swicth to SQL version 8.0
> How I can force the SP to take the name of a column as a
> field instead of a keyword? I tried to place brakets but
> still I can't run my store procedure...in other words I
> can't store new records in my table whose field's name is
> a keyword...
> I define my table like this.
> ...
> [Module]
> [Function]
> ...using brackets...but nothing...any ideas?
> Thanks,
> Patty
> *******************SP*******************
***********
> ALTER PROCEDURE sp_LogErrors
> @.ID int, @.Number int, @.Description varchar(255),
> @.Application varchar(30), @.Version varchar(30), @.Source
> varchar(30), @.Module varchar(30),
> @.Function varchar(30), @.Occurred DateTime, @.SBCID
> varchar(30), @.Machine varchar(30)
> AS
> INSERT INTO Error (ID, Number, Description, Application,
> Version, Source, [Module], [Function], Occurred,
> Machine )
> values (@.ID, @.Number, @.Description, @.Application,
> @.Version, @.Source, @.Module, @.Function, @.Occurred,
> @.Machine)
>
>
Keyword Function in SQL Server 8.0 but not in 7.0
SQL server 8.0 has "function" as keyword but version 7.0
doesn't. I have a table that has two columns labeled
Module, and function. I have a store procedure that calls
this two columns but since I swicht from SQL Server 7.0 to
8.0 the function its a keyword in 8.0...and I can't store
my records when I swicth to SQL version 8.0
How I can force the SP to take the name of a column as a
field instead of a keyword? I tried to place brakets but
still I can't run my store procedure...in other words I
can't store new records in my table whose field's name is
a keyword...
I define my table like this.
...
[Module]
[Function]
...using brackets...but nothing...any ideas?
Thanks,
Patty
*******************SP******************************
ALTER PROCEDURE sp_LogErrors
@.ID int, @.Number int, @.Description varchar(255),
@.Application varchar(30), @.Version varchar(30), @.Source
varchar(30), @.Module varchar(30),
@.Function varchar(30), @.Occurred DateTime, @.SBCID
varchar(30), @.Machine varchar(30)
AS
INSERT INTO Error (ID, Number, Description, Application,
Version, Source, [Module], [Function], Occurred,
Machine )
values (@.ID, @.Number, @.Description, @.Application,
@.Version, @.Source, @.Module, @.Function, @.Occurred,
@.Machine)What error message do you get if you execute that procedure from Query
Analyzer?
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Patty" <anonymous@.discussions.microsoft.com> wrote in message
news:b58901c3ecd3$aa67cd90$a301280a@.phx.gbl...
> Hi,
> SQL server 8.0 has "function" as keyword but version 7.0
> doesn't. I have a table that has two columns labeled
> Module, and function. I have a store procedure that calls
> this two columns but since I swicht from SQL Server 7.0 to
> 8.0 the function its a keyword in 8.0...and I can't store
> my records when I swicth to SQL version 8.0
> How I can force the SP to take the name of a column as a
> field instead of a keyword? I tried to place brakets but
> still I can't run my store procedure...in other words I
> can't store new records in my table whose field's name is
> a keyword...
> I define my table like this.
> ...
> [Module]
> [Function]
> ...using brackets...but nothing...any ideas?
> Thanks,
> Patty
> *******************SP******************************
> ALTER PROCEDURE sp_LogErrors
> @.ID int, @.Number int, @.Description varchar(255),
> @.Application varchar(30), @.Version varchar(30), @.Source
> varchar(30), @.Module varchar(30),
> @.Function varchar(30), @.Occurred DateTime, @.SBCID
> varchar(30), @.Machine varchar(30)
> AS
> INSERT INTO Error (ID, Number, Description, Application,
> Version, Source, [Module], [Function], Occurred,
> Machine )
> values (@.ID, @.Number, @.Description, @.Application,
> @.Version, @.Source, @.Module, @.Function, @.Occurred,
> @.Machine)
>
>
Monday, March 12, 2012
Key in new recird with grid view
Inside my gridview, the user can key in new record, delete record and update record. but dont know why my insert function cant work out and i dunno why this is happen? Can somebody help me out with this?Thanks
My Code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
InsertCommand="INSERT INTO [rest_info] ([resname], [menu], [price], [date]) VALUES (@.resname, @.menu, @.date, @.price)"
<InsertParameters>
<asp:Parameter Name="resname" Type="Char" />
<asp:Parameter Name="menu" Type="char" />
<asp:Parameter Name="price" Type="Decimal" />
<asp:Parameter Name="date" Type="datetime" />
</InsertParameters>
</asp:SqlDataSource>
Hi zouve,
Based on the code you have provided, I didn't see anything wrong.
Could you please make another simple page with a simple GridView and DataSource to see if this issue can be reproduced? If so, plesae post code for the whole page here, and the database table, so that we can make a repro here.
Thanks!
Wednesday, March 7, 2012
Keep Together Function Not Working
a group of text boxes or in a table and they are ending up on two pages of
the report, when they should only be on one.
Has anyone found a solution?
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=47aa22ae-f3a2-41bd-9b5b-a233914f7c7d&sloc=en-us
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=12c7fbc6-1aca-4e3a-9b2f-e15917fb7c22&sloc=en-us
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=76f3399b-06f1-4438-bd6a-d468578e6e20&sloc=en-usI HAVE FOUND A "DIRTY" WAY TO GET THE GROUPINGS WORKING.
THE TRICK IS TO CREATE NESTED GROUPING TABLES.
For example,
I have a query output with Agent name , client name and client details.
In order to keep them grouped, I create a table with one group, the Agent
(header, no details).
In that group, I create a table with one group, the Client (same as above).
And in that I group I create another table with the Client Details.
I only use details at the lower lever (the client details).
That works.
I don't like it because it makes the report complicated but it works.
"msflinx" wrote:
> These 3 posts all address same problem: Basically, have some data, either in
> a group of text boxes or in a table and they are ending up on two pages of
> the report, when they should only be on one.
> Has anyone found a solution?
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=47aa22ae-f3a2-41bd-9b5b-a233914f7c7d&sloc=en-us
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=12c7fbc6-1aca-4e3a-9b2f-e15917fb7c22&sloc=en-us
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=76f3399b-06f1-4438-bd6a-d468578e6e20&sloc=en-us
>|||Very interesting approach. Should work though and since most of my reports
are only three levels deep, I might try it.
Thanks for you assistance.
"Kyriakos" wrote:
> I HAVE FOUND A "DIRTY" WAY TO GET THE GROUPINGS WORKING.
> THE TRICK IS TO CREATE NESTED GROUPING TABLES.
> For example,
> I have a query output with Agent name , client name and client details.
> In order to keep them grouped, I create a table with one group, the Agent
> (header, no details).
> In that group, I create a table with one group, the Client (same as above).
> And in that I group I create another table with the Client Details.
> I only use details at the lower lever (the client details).
> That works.
> I don't like it because it makes the report complicated but it works.
> "msflinx" wrote:
> > These 3 posts all address same problem: Basically, have some data, either in
> > a group of text boxes or in a table and they are ending up on two pages of
> > the report, when they should only be on one.
> >
> > Has anyone found a solution?
> >
> > http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=47aa22ae-f3a2-41bd-9b5b-a233914f7c7d&sloc=en-us
> >
> > http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=12c7fbc6-1aca-4e3a-9b2f-e15917fb7c22&sloc=en-us
> >
> > http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=76f3399b-06f1-4438-bd6a-d468578e6e20&sloc=en-us
> >
> >
Keep TableRow Together
I have a table with 3 tablerows. This 3 tablerows needs to stay together on the same page for each record. Sometime, a function set the Hidden property of one of this tablerow to true, so I cannot just fit the table to get a multiple number of 3.
I use visual studio 2003 to create this rdl.
Thanks,
Marco
Can you restructure your report to have a single table row with a rectangle containing the current three rows of data? By default, SSRS has an implicit keeptogether that attempts to keep containers together when rendering them to a paged format. You can also see books on line for additional pointers:
"Rendering Considerations for Automatic Sizing and Positioning" http://technet.microsoft.com/en-us/library/aa337175.aspx
Larry
|||I will try and i'll let you know!
Thanks,
Marco
|||Hey Marco,
Did you fix your problem? I have an identical one and I would like to know if you could solved. Please share your solution with me, it will be very much appreciated.
Ioan Cozma
|||I'll test that tonight or tomorow. Si I will notice you as soon as possible.
Best regards,
Marco
|||Hi,
Sorry to be long...
So, it don't resolve completly my problem. For now, all lines are grouped, so this part is ok.
I have 5 lines, each have "Can decrease to accommodate contents" checked. So when Hidden property is set to True, there is no blank line.
But, the tablerow seem to have a static Height and no "Can decrease to accommodate contents". What could I do to get one or to simulate one?
Thanks,
Marco
|||Have you thought about using a list rather than a table? The table and matrix controls are just specalized forms of lists. A list would give you the ability to do what you want. I have confirmed that by aligning text boxes to the top of the list and others below, the resulting report will not skip lines for hidden text boxes. Make sure to align the left and right edges as if the text boxes were within a table.
Larry
Keep TableRow Together
I have a table with 3 tablerows. This 3 tablerows needs to stay together on the same page for each record. Sometime, a function set the Hidden property of one of this tablerow to true, so I cannot just fit the table to get a multiple number of 3.
I use visual studio 2003 to create this rdl.
Thanks,
Marco
Can you restructure your report to have a single table row with a rectangle containing the current three rows of data? By default, SSRS has an implicit keeptogether that attempts to keep containers together when rendering them to a paged format. You can also see books on line for additional pointers:
"Rendering Considerations for Automatic Sizing and Positioning" http://technet.microsoft.com/en-us/library/aa337175.aspx
Larry
|||I will try and i'll let you know!
Thanks,
Marco
|||Hey Marco,
Did you fix your problem? I have an identical one and I would like to know if you could solved. Please share your solution with me, it will be very much appreciated.
Ioan Cozma
|||I'll test that tonight or tomorow. Si I will notice you as soon as possible.
Best regards,
Marco
|||Hi,
Sorry to be long...
So, it don't resolve completly my problem. For now, all lines are grouped, so this part is ok.
I have 5 lines, each have "Can decrease to accommodate contents" checked. So when Hidden property is set to True, there is no blank line.
But, the tablerow seem to have a static Height and no "Can decrease to accommodate contents". What could I do to get one or to simulate one?
Thanks,
Marco
|||Have you thought about using a list rather than a table? The table and matrix controls are just specalized forms of lists. A list would give you the ability to do what you want. I have confirmed that by aligning text boxes to the top of the list and others below, the resulting report will not skip lines for hidden text boxes. Make sure to align the left and right edges as if the text boxes were within a table.
Larry