Showing posts with label parameter. Show all posts
Showing posts with label parameter. Show all posts

Wednesday, March 7, 2012

Error 0: Timeout Expired HYT00 when trying to backup DBs

I am getting this error when I try to back up the larger DB's on my
server. The smaller ones back up ok. Is there a parameter I can change
to increase this timeout? I have gone into ODBC, Query Analyzer, and
SQL server properties and played around with some settings, but nothing
seems to work.
Any help is appreciated!

Phil(Iam74gibson@.houston.rr.com) writes:
> I am getting this error when I try to back up the larger DB's on my
> server. The smaller ones back up ok. Is there a parameter I can change
> to increase this timeout? I have gone into ODBC, Query Analyzer, and
> SQL server properties and played around with some settings, but nothing
> seems to work.
> Any help is appreciated!

So from where do you run this backup?

The timeout is a client-side thing, and different clients have different
timeouts. Many run with 30 seconds which is the default for ODBC,
Enterprise Manager and many others. In Query Analyzer there is no
timeout by default. Neither is there any default timeout for Agent jobs.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Sunday, February 19, 2012

Error - ReportsViwer with Parameters

Hi,

We trying to deploy Parameter added Report and its giving following error

at Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object Instance)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.InternalLateIndexGet(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean ReportErrors, ResolutionFailure& Failure)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateIndexGet(Object Instance, Object[] Arguments, String[] ArgumentNames)
at aspx_abe_asr_report.btnRun_Click(Object sender, EventArgs e) in D:\ABE\ABE\dotNET\ABE_WEB\ABE_BETA\reports\abe_asr_report.aspx.vb:line 25

the code is

Dim datasource As New ReportDataSource("DataSet1_ABE_TKT_TICKET_MASTER", outDs.Tables(0))
Dim vAgentName As String = ""
vAgentName = Session("Login")(1).ToString
ReportViewer1.LocalReport.DataSources.Add(datasource)
Dim p_AgentName As New ReportParameter("pAgentName", vAgentName)
ReportViewer1.LocalReport.SetParameters((New ReportParameter() {p_AgentName}))
ReportViewer1.Visible = True
ReportViewer1.LocalReport.Refresh()

Pls help

Nilaksha.

Could you please provide some more context on your scenario? What are you trying to do?

Daniel Roth

Error - procedure expects parameter, which was not supplied

Hi,

I created a stored procedure in the sql server. I try to insert a record from the aspx page. But I keep getting this error,
"procedure expects parameter <@.firstname>, which was not supplied". This is what I am doing.

cmd.CommandText = "proc_insertuser";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@.firstname", SqlDbType.VarChar, 50);
cmd.Parameters["@.firstname"].Value = txtFirstName.Text
...other parameters

I checked the parameter names, it matches correctly. The parameter does get added to the collection. I checked it using cmd.Parameters.Contains("@.firstname") and the value is also correct. Using query analyzer I executed the procedure, I am able to insert a record.

Can anyone tell me what could be the problem.
TAICan you use SQL Profiler? Perhaps that will help diagnose the problem. Is there some other parameter that is missing and being mis-reported?|||if you are using VB.NET I would try replacing your brackets surrounding your parameter name w/ parenthesis instead.

 cmd.Parameters("@.firstname").Value = txtFirstName.Text

HTH

Sandy

Friday, February 17, 2012

Error

I am getting the following error

"An error occured during local report processing.Error during processing of 'Validate' report parameter "

Any idea about this error

Do u have any default values or available values for your 'Validate' parameter? If yes, can u give the details?

Shyam

|||

Yes I have default values.That value depends on user selection.If the date difference is less than 15 days.Script will be raised(That I have written using custom code).

|||

can u pls type the whole custom code you have written and then the expression you have used for the default value of the parameter?

Shyam

|||

CUSTOM CODE:

Function CheckSignificantDate(i as integer) as Integer
Dim msg as String

msg = ""
If ( i = 15 ) Then
msg=" Date Diff should be more than 15 Days"
End If

If msg <> "" Then
MsgBox(msg, 16, "Report Validation")
Err.Raise(6,Report) 'Raise an overflow
End If
End Function

EXPRESSION:

=CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value,))

Here I am facing one more problem.In custom code if I take condition (i < 15), for each value script is raising.(i.e for every number.ex: 1,24,33,67..... )

|||

why is that extra comma at the end of your expression (marked in red below)

CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value,))

You are calling the code for all values, so better check the date differentce in the expression itself (using IIf function) and then call the code.

Shyam

|||

Could please help me how to call that function using IIF condition.I can't able to do.

|||

IIf(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value) < 15, CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value)), 0)

Shyam

|||

But still I am getting the same problem.

|||

Thanks Shyam I got the solution

|||

Dates problem was solved.After generation of script I am getting the following error.

"An error occured during local report processing.Error during processing of 'Validate' report parameter "