Subscription Parameter Not A Valid Value

Oct 4, 2007

Hi,

I'm trying to set up a data-driven subscription and having problems with parameters. On the Report Parameter Values screen of the Create Data-Driven Subscription function I have set a parameter TimesheetPeriodEnd to "Specify a static value" and checked the NULL box. In the report the parameter is type string and allows nulls. When I try to run the subscription the reports are not sent and the error log contains the following message:

ReportingServicesService!library!f!10/05/2007-09:31:08:: Status: Failure sending mail: Default value or value provided for the report parameter 'TimesheetPeriodEnd' is not a valid value.
ReportingServicesService!notification!f!10/05/2007-09:31:08:: Notification 0ae544df-4b1b-4a46-b7ab-cdefdca201be completed. Success: False, Status: Failure sending mail: Default value or value provided for the report parameter 'TimesheetPeriodEnd' is not a valid value., DeliveryExtension: Report Server Email, Report: Timesheet, Attempt 0

I am also setting other parameters for this subscription in the same way and not getting errors.

Any ideas? Previously I have had problems passing null values to parameters from the subscription query "Get value from database" from SELECT NULL AS ParameterName (this function just doesn't seem to work in SSRS). But I'm surprised I can't even seem to get this working with the default settings.

Regards,

Greg

View 5 Replies


ADVERTISEMENT

The Subscription Contains Parameter Values That Are Not Valid.

Feb 28, 2008



Hi,

We have a report server which has lots of reports. this particular report has 375 subscriptions and 80% of them are failing with the error "The subscription contains parameter values that are not valid." since last week nothing new was done on the server. when I open the properties of one of the subscriptions, one of the parameter value shows as a number where as it should be the name of a state.

Not sure what to do to get the subscriptions back.

any Ideas/help greatly appreaciated.

Thanks,
Phani

View 5 Replies View Related

The Subscription Contains Parameter Values That Are Not Valid

Mar 10, 2008

Hello,
I have something like 100 regular subscriptions.
It sometimes happen that one of the subscriptions suddenly stop to work with error "The subscription contains parameter values that are not valid". Example, one report has a dozen subscriptions, one of them stop to work. I look into the subscription and see that either one of the parameters is no longer set to a value or see nothing special besides the warning at the top of the subscription page. Parameters are all set to either default or some value(s). I reset one of the parameters, validate, or simply validate with no change and it works again.
Next time, in one or three weeks another subscription will fail, I will reset it.
Sometimes there are no errors, sometimes just 1 error and sometimes multiple errors accross reports or sometimes one report will suddenly have a few errors.
Right now, I use a weekly report to warn me after the fact of what were last week errors if any (no data, parameters unvalid, etc).
It looks like it happen with strings parameters based on datasets like "Sales offices" by example, where value and label are the same. Note that sales offices are by nature very stable, we do not change the spelling nor add remove entries. The list being a dataset gets rebuild, just to make sure we do not miss any eventual new sales office but if there is a new sales office, no one had a chance to select it as parameter value before it is in the dataset.
I am really not sure what is going on, were parameters values changed in the metadata? I do not think so.
Anyways, Is there a way to get an early warning instead of an after the fact error warning?
Is there anything else I coud try to "Refresh" or "remap" parameters values to avoid these errors?
When the subscription was created by a business analyst, If the parameters becomes blank, I have a hard time figuring out what it was when it was still valid. Is there any way to have a list of parameters values and have these values automatically "re-selected" by report server when the value gets lost?
This is not a big problem however it is annoying and people will have a bad perception of the system quality. "I created a subscription for Sacramento and never got my report", some people will also introduce garbage because they will create a new subscription instead of fixing the broken one, then they may eventually get twice the same report.
Any thought, does anyone had the same problem?

View 2 Replies View Related

Subscription Error: The E-mail Address Of One Or More Recipients Is Not Valid.

Sep 20, 2006

I have subscriptions that fail because someone's email is no longer valid,
where is this error information stored so I can fix the problem?
I have a large list and it is hard to do manually.
I will be using data driven solutions, but these are existing subscriptions that need to be ran.

View 26 Replies View Related

Parameter Valid Values

Sep 26, 2007

I am deploying an rdl that is being deployed in a server.But i am encountering a problem regarding the valid values of the parameter.My parameters have dependencies,and one of my parameter comes out with two dependencies.

Scenario :
User needs to input his userID to access Book A.
Book B needs Book A because the output will be depending on the its content.
And Book C depend on Book B.

Problem:
when deploying, only Book A will have the initial value.The dependency in Book B is only one,which is fine.It shows its valid values. But how about for Book C which have 2 dependencies? Because it doesnt show it's valid values..

View 3 Replies View Related

Reporting Services :: Value Of Parameter Param Is Not Valid

Jun 14, 2013

I am getting this error when upgraded to SQL Server 2012. Earlier the same report(.rdl) just working fine on SQL Server 2008 R2.

Message = System.Web.Services.Protocols.SoapException: The value of parameter 'param' is not valid. ---> Microsoft.ReportingServices. Diagnostics. Utilities.InvalidParameterException: The value of parameter 'param' is not valid. ---> System.UriFormatException: Invalid URI: The Uri string is too long.

Is there anything changed in SQL Server 2012 regarding this.

View 8 Replies View Related

Specified Argument Was Out Of The Range Of Valid Values. Parameter Name: Index

May 21, 2007

This is the error I'm getting. I will paste my code below:









"
DeleteCommand="DELETE FROM [Friends] WHERE [FriendName] = @FriendName"
SelectCommand="SELECT * FROM [Friends] WHERE (([FriendName] = @FriendName))"
UpdateCommand="UPDATE [Friends] SET [UserName] = @UserName, [UserID] = @UserID, [IP] = @IP, [AddedOn] = @AddedOn, [FriendName] = @FriendName, [IsApproved] = @IsApproved WHERE [FriendID] = @FriendID">














Type="String" />



DataSourceID="request_source" DefaultMode="Edit" EmptyDataText="You have no pending friend requests"
GridLines="None" Height="50px" Width="125px">




ReadOnly="True" SortExpression="UserName" />



Text="Accept" /> 
CommandName="Delete" Text="Deny" />



Text="Edit" /> 
CommandName="Delete" Text="Delete" />



ReadOnly="True" SortExpression="FriendID" Visible="False" />









'>


'>

View 10 Replies View Related

(Report Model Deployment Error) The Value Of Parameter 'DataSources' Is Not Valid

Dec 12, 2005

I've got a report model I am trying to move from a development server to a production server.  I published it to my development RS, exported the SMDL file, then uploaded it to the production server.  At that point, I tried assigning the data source to the model and got the error:

View 12 Replies View Related

Integration Services :: Argument For Option (parameter) Is Not Valid - The Command Line Parameters Are Invalid

May 6, 2015

i am parameterize  my DB connection in sql sever 2012,it showing in agent job as parameter.but when i run job it giving me error:

Argument "" for option "parameter" is not valid.  The command line parameters are invalid.  The step failed.

what i need to do is pass different environment here while deploying to different env.

View 2 Replies View Related

Reporting Services :: Error - Y Expression For Chart Has Scope Parameter Not Valid For Aggregate Function

May 6, 2015

I am trying to create a column chart that calculates the percentage of computers in our IT environment that are Actively communicating to our SCCM Server.

I have two datasets:

1. Total_Count_Of_AD_PC DataSet.

2. PC_With_Active_SCCM_Clients dataset.

Basically i wan to calculate the percentage for each Region (i.e. AP for Asia Pacific, EMEA, Americas).

Below is the Total_Count_Of_AD_PC  Dataset screenshot.

Below is the PC_With_Active_SCCM_Clients dataset.

Below is the expression that i used that is causing the error.

=CountDistinct(IIf(Fields!Region.Value="AP", "PC_With_Active_SCCM_Clients"),(Fields!Name.Value, "PC_With_Active_SCCM_Clients"),Nothing)/CountDistinct(IIf(Fields!Region.Value="AP", "Total_Count_Of_AD_PC"),(Fields!name.Value,
"Total_Count_Of_AD_PC"),Nothing)

Below is the error message....

The Y expression for the chart ‘Chart2’ has a scope parameter that is not valid for an aggregate function.  The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.

View 6 Replies View Related

Pass Parameter For Subscription

Oct 17, 2007

Hi
I want to create subscription for the report.
I have 1 date parameter. and i want the value of the date parameter as today s date.
How can i set value of the parameter as today's date.

I have tried using

getdate
today
now
getutcdate

didnt work.

any other option.

I need to create subscription either from report manager or from management studio

View 1 Replies View Related

Sync_type Parameter In Subscription

Jun 12, 2006

Hi,



I tried to change the subscription property "sync_type" whith a system procedure but I was not able to do it, because sp_changesubscription does not support this property.



Is there any chance to change this property by procedure?



So I decided to drop the subscription and define it new with sp_addsubscription. I chose to set this to "replication support only" as the value "none" is depricated based on the online help. Unfortunately using this value results in an error message "only none or automatic is allowed".



How can I set this value now to "replication support only"?



I need to set the value to "replication support only" as this value leads into the generation of the stored procedures used for insert, update and deletes.



The purpose behind this, to restart a transactional push replication, doing all the initialization stuff by myself and not with reinitialize subscirption. I would like to decide, if I do the initialisation.

Regards

Nobsay

View 5 Replies View Related

How To Make A Subscription Use The Default Value For A Parameter

Sep 18, 2007

Hi everyone,

I need to use the CreateSubscription method and have this new subscription use a default value for certain parameter. How can I do this?

View 7 Replies View Related

Parameter Driven Subscription - Error

Apr 22, 2008

I have set up a parameter driven subscription and am having strange results. This subscription is being set up as Web-archive, including the report and link.

At first when setting up the report, I didn't have a default value set in the report, but would choose it in the subscription and would see an error saying the parameter value provided is not valid. After seeing the error I would edit the subscription and see the parameter value was blank. This would happen if the subscription was set to start after at least a few hours. This didn't matter if I chose the subscription schedule or using a shared schedule.

When I set up a subscription the same way, but then had it delivered within the next few minutes, the report would work fine, using the given parameter.

Since one of reports is being sent to a manager, I put in a default parameter value and set up a few subscriptions. I was hoping at least if the subscription "didn't remember" the parameter value, the default would be used and delivered. I was right, the report was delivered using only the default... but will only be delivered using the default.

There have been quite a few people posting similar questions, but none of them are answered.

Any help is greatly appreciated.

Thanks in advance,
Eric

Ps - here is some of the log file relating to one of the failed subscriptions:
From: ReportServerService*.log
ReportingServicesService!library!10!4/19/2008-02:00:05:: i INFO: Schedule 93453b16-89d3-48d1-a470-d7a09fc163b6 executed at 4/19/2008 2:00:05 AM.
ReportingServicesService!library!10!4/19/2008-02:00:05:: i INFO: Schedule 93453b16-89d3-48d1-a470-d7a09fc163b6 execution completed at 4/19/2008 2:00:05 AM.
ReportingServicesService!dbpolling!10!4/19/2008-02:00:05:: i INFO: EventPolling finished processing item e40d5803-bb69-4d20-bd55-797074969348
ReportingServicesService!dbpolling!12!4/19/2008-02:00:05:: i INFO: EventPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!f!4/19/2008-02:00:05:: i INFO: EventPolling processing item fe04012c-6376-4599-b980-6aa1c77036fd
ReportingServicesService!library!f!4/19/2008-02:00:05:: i INFO: Schedule 93453b16-89d3-48d1-a470-d7a09fc163b6 executed at 4/19/2008 2:00:05 AM.
ReportingServicesService!schedule!f!4/19/2008-02:00:05:: Creating Time based subscription notification for subscription: f2551ca1-f6b8-4394-8036-7fa8a9be1070
ReportingServicesService!library!f!4/19/2008-02:00:05:: i INFO: Schedule 93453b16-89d3-48d1-a470-d7a09fc163b6 execution completed at 4/19/2008 2:00:05 AM.
ReportingServicesService!dbpolling!f!4/19/2008-02:00:05:: i INFO: EventPolling finished processing item fe04012c-6376-4599-b980-6aa1c77036fd
ReportingServicesService!dbpolling!12!4/19/2008-02:00:05:: i INFO: NotificationPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!f!4/19/2008-02:00:05:: i INFO: NotificationPolling processing item d1e8f484-659e-48a1-a5da-747108ce63af
ReportingServicesService!library!f!04/19/2008-02:00:06:: i INFO: Initializing EnableIntegratedSecurity to 'True' as specified in Server system properties.
ReportingServicesService!library!f!04/19/2008-02:00:06:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'day' is not a valid value., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'day' is not a valid value.
ReportingServicesService!notification!f!04/19/2008-02:00:06:: Notification d1e8f484-659e-48a1-a5da-747108ce63af completed. Success: False, Status: , DeliveryExtension: Report Server Email, Report: Daily RTS time, Attempt 0
ReportingServicesService!dbpolling!f!04/19/2008-02:00:06:: i INFO: NotificationPolling finished processing item d1e8f484-659e-48a1-a5da-747108ce63af

View 14 Replies View Related

Using Parameter Values In Subscription Fields?

Sep 6, 2007

Anyone know if it is possible to reference the parameter values stored for a given subscription, in the subscription fields (subject/comment)?

So instead of just @ReportName at @ExecutionTime it could be @ReportName at @ExecutionTime (@ReportParameter1)

I know I can do this in data driven subscriptions, but was wondering if it was possible without.

Thanks,

View 1 Replies View Related

Dynamic Parameter Values For Subscription

Jan 26, 2008

I have been trying to add in date functions for parameters in a report subscription and they are not accepted. I have a report with 2 parameters, @start and @end. I have default parameters set wtihin the report of Now - month for @start and Now for @end. Can my users create a subscriotion using something like "=DateAdd("D", -1, Now)" for the parameters rather than the default?

View 8 Replies View Related

Passing A Parameter To The Filename In A Report Subscription

Jan 18, 2007

I have defined a monthly substription for a series of reports. I would like to be able to pass a paremter used in generating the report to the file name define in the subscription.

I can do it if I used system names such as @datetime, but I want to be able to use a parameter unique to the report.

For example if the parameter for the report was CARS and I was quesrying Toyotas how can I get toyoats to show up in the file name?



Any suggestions?



View 1 Replies View Related

Delivering Multi Parameter Reprots By DD Subscription

Nov 15, 2007



HI All,

If I use more than one parameters in my reports, still would I be able to deliver those reports by Data Driven subscriptions?

Thanks

View 1 Replies View Related

Data-driven Subscription - Invalid Parameter?

Aug 23, 2007

Hi,

I've set up a data-driven subscription on a report but it's not sending and the error log says it's because:

Default value or value provided for the report parameter 'CSRFaxID' is not a valid value.

For the particular dataset record causing the error I'm passing the value Null to the report parameter. The report parameter CSRFaxID is set up with "Allow Null" and with a default value of Null. I can run the report in my browser with CSRFaxID set to null, but the scheduled subscription is not able to produce the report with the same parameter value. Does anyone have any idea what the problem is and how I can fix it?

Regards,

Greg McNamara

View 3 Replies View Related

Data-driven Subscription: Put Parameter In The Filename Text

Feb 1, 2007

Hi all,



I've developed a data driven subscription report. I have a paramete (named "Data") that is a result of my query to the current date. It is working fine.

Now I would like to make one change: In the step4 of the creation of the data-driven report we have the option to give a name to the filename.The name that I gave was TestFile. In this option i'm also able to select the parameter instead of giving the name to the filename. Can I make something like TestFile_ & @Data? Wich would result in TestFile_01-02-2007? Or the only way is to make, in the query of the paramenter another field with this result?



Thanks in advance.

Marco.

View 1 Replies View Related

Passing Null Value Parameter To A Data-driven Subscription

Jun 13, 2007

I have a data-driven subscription (DDS) stored procedure that gets called when a subscription fires and returns parameters to a report. One of the parameter values I want to return is NULL, which also happens to be the default value of the corresponding report parameter.



When I set the report parameter to use the default value (NULL) when setting up the subscription in Report Manager, the subscription works fine. When I try to pass the NULL value from the DDS proc to the report, the subscription fails.



I do not know what the error logs say. I've rarely looked at them and what I have seen seems a bit cryptic. I've narrowed down through trial-and-error that passing the NULL value is the issue.



Has anyone else experienced this issue and do you have a resolution?



Thanks in advance for your assistance.

View 5 Replies View Related

SSRS -- Data Driven Subscription And Pivoting For Dynamic Parameter Mapping

Feb 12, 2007

Hi,

For the Data Driven Subscription in SSRS we are using the following stored procedure

In Step 3 - Create a data-driven subscription



create procedure spRSGetReportSettings

(

@ReportID as integer

) as

begin

set nocount on

declare @t as table(y int not null primary key)

declare

@cols as nvarchar(max),

@y as int,

@sql as nvarchar(max)

set @cols=stuff(

(select N',' + quotename(y) as [text()]

from (select ParameterName as y from Reportsettings where reportid=1) as Y

order by y

For XML Path('')),1,1,N'');

set @sql=N'select * from

(select reportid,parametername, parametervalue from ReportSettings where reportid= ' + Cast(@ReportID as varchar(5)) +' ) as D

pivot(min(parametervalue) for parametername in(' + @cols +N')) as p'

exec sp_executesql @sql

end



Basically the idea is to maintain a single report parameter setting table for multiple reports.

Structure of the table is as given below

ReportID, ParameterName, ParameterValue.

Using Pivot we can generate the ParameterName/ParameterValue combinations for each report. This stored procedure is working fine in query editors(Management Studio)

But, in SSRS it is giving any results.

In Step 4 - Create a data-driven subscription,

Get the value from the database drop down, I am not getting any database columns.

Please help.

Kumar

View 3 Replies View Related

Reporting Services :: SSRS Custom Start Date Subscription Parameter

Jun 3, 2015

Is it possible to have a custom start date parameter on a report? I would like to have a cumulative daily report for the week, Friday to Thursday. The final daily to run on the Friday, then the next week begins.  I have a enddate, which is today()-1 (for previous day); I need a start date to be variable.

In other words,

On a Monday, report pulls data from last Friday to Sunday;
On a Tuseday, report pulls data from last Friday to Monday,
On a Wednesday, report pulls data from Friday to Tuesday, etc,
until on Friday, the report pulls data from last Friday to Thursday.

View 4 Replies View Related

Subscription Issue With Null Default Parameter - Key Cannot Be Null

May 3, 2007

I have a report that is run on a monthly basis with a default date of null. The stored procedure determines the month-end date that it should use should it be sent a null date.

The report works fine when I tell it to create a history entry; however, when I try to add a subscription it doesn't appear to like the null parameter value. Since I have told the report to have a default value of null it doesn't allow me to enter a value on the subscription page.

Now, I suppose I could remove the parameter altogether from the stored proc, but then the users would never be able to run the report for a previous time period. Can someone explain to me why default values aren't allowed to be used on subscriptions when they seem to work fine for ad hoc and scheduled reports? This is really quite frustrating as most of my reports require a date value and default to null so that the user doesn't have to enter them for the latest data.



An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help




Key cannot be null. Parameter name: key

View 1 Replies View Related

Error (Data Mining): The 'HISTORIC_MODEL_GAP' Data Mining Parameter Is Not Valid

Oct 25, 2007

Hi all,

I am using Microsoft_Time_Series and have set HISTORIC_MODEL_GAP to various values (from 1 to 21). I always get this error:
Error (Data mining): The 'HISTORIC_MODEL_GAP' data mining parameter is not valid for the 'My Time Series' model.

In Algorithm Parameters window, this parameters is not there by default, so I have to add it.

Any tip will be greatly appreciated.

View 3 Replies View Related

SSRS - Resetting A Subscription After A Subscription Run Failure

Feb 11, 2008



It seems to me that if a scheduled SSRS report subscription fails ( Status Message - An error has occurred during report processing) , that I actually need to delete the subscription and reconfigure it from scratch. The scheduled job doesn't try to run again automatically (say the next Monday on a weekly Monday schedule).

Is there a way to "reset" a failed subscription without have to recreate the entire subscription?

Thank you
Devon Kyle

View 5 Replies View Related

Existing Subscription Already Contains Table Included In The New Subscription

Sep 26, 2007







28638


SSCE_M_DUPLICATETABLE


Existing subscription already contains table included in the new subscription.


What are the possible causes of this merge replication error?
Could it be caused by a SQL Server Compact Edition User trying to sync their .sdf file after their subscription has already expired on the SQL Server?

Would you expect to see a different message if a SQL Server Compact Edition user tried to sync a subscriber database (.sdf file) with merge replication if it's been longer than the subscription retention period since their last sync?

View 6 Replies View Related

DDL Is Not Valid

Jul 24, 2006

hello,everybody ,i use the AnalysisServicesExecuteDDLTask ,but it dap an error "DDL is not valid",i don't konw what is the problem and how to solve?thank you!

View 1 Replies View Related

Specified Cast Is Not Valid

Sep 11, 2006

im doing a sum on a table and it either returns a number in decimal format or 'null' .  The problem is when it returns null i want it to just make the text say '0.00'.  So i did a test on the object that if it returns NULL just print  '0.00' but if it is not null it tells me that there is a number there and i want to store that as a decimal and print it out.  But i get an error for a type cast when im not it should not even be going to that part of the code. In the code below the first executescaler will return null so it should just go straight to the else.  But it gives me the type cast error in the if that shouldnt be seen.  The error and code are below. //Borrower NSF FEES
cmd.CommandText = "select sum(itemamount) from postmtdtls where loanid='" + LoanID + "' and Transactioncode = '310'";
object temp = cmd.ExecuteScalar();
if (temp != null)
{
decimal B_NSFFees = ((decimal)cmd.ExecuteScalar());
borrowerPayoff_NSFFees.Text = String.Format("{0:#,#.##}", B_NSFFees).ToString(); //Borrower NSF FEES
}
else
{
borrowerPayoff_NSFFees.Text = "0.00"; //borrowerPayoff_NSFFees.Text = "0.00";
}  Server Error in '/WebSite5' Application. Specified cast is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Specified cast is not valid.Source Error: Line 774: if (temp != null)
Line 775: {
Line 776: decimal B_NSFFees = ((decimal)cmd.ExecuteScalar());
Line 777: borrowerPayoff_NSFFees.Text = String.Format("{0:#,#.##}", B_NSFFees).ToString(); //Borrower NSF FEES
Line 778: }Source File: c:ProgrammingFilesWebSite5InvestorPool.aspx.cs    Line: 776 Stack Trace: [InvalidCastException: Specified cast is not valid.]
InvestorPool.GetLoanInfo(String LoanID) in c:ProgrammingFilesWebSite5InvestorPool.aspx.cs:776
InvestorPool.MortAccountText(Object sender, EventArgs e) in c:ProgrammingFilesWebSite5InvestorPool.aspx.cs:660
System.Web.UI.WebControls.TextBox.OnTextChanged(EventArgs e) +75
System.Web.UI.WebControls.TextBox.RaisePostDataChangedEvent() +124
System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +7
System.Web.UI.Page.RaiseChangedEvents() +138
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4507
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

View 10 Replies View Related

Instance Specified Not Valid

Feb 27, 2004

Hi,

I'm trying to install MSDE SP3 which I downloaded from MS at http://www.asp.net/msde/.
Following the instructions as best I can I unzipped the file into a Folder now called MSDE located on C: I then went to a command prompt and typed in the command given to start the install:

setup SAPWD=testsite SecurityMode=SQL

Hit enter and the installer started up and ran for a few secs and then came back with

The Instance named specified is invalid

There was no mention of including an instance name or the format for it.

Suggestions please?

Also, if I want to completly uninstall MSDE if I need to how would I do it?

Thanks,
Bob

View 1 Replies View Related

Specified Cast Is Not Valid

Apr 7, 2006

Can't seem to find why I'm getting this error: Specified cast is not valid.
Ok, using a stored procedure for SQL Server 2000 and here is the main part of it:
 SELECT id, rank, firstName, lastName, service, status, createdTime FROM   accessRequest WHERE  lastName LIKE @tLastName     AND    firstName LIKE @tFirstName
And the C# code behind from the class file:
SqlDataReader spResults;
conn.Open();
spResults = command.ExecuteReader();
while( spResults.Read() )
{
AccessRequestSearch request = new AccessRequestSearch( (int)spResults.GetInt32( 0 ), spResults.GetString( 2 ), spResults.GetString( 3 ), spResults.GetString( 1 ), spResults.GetString( 4 ), spResults.GetString( 5 ), Convert.ToDateTime(spResults.GetString( 6 )));
searchResults.Add( request ); // Add to Array List
}
spResults.Close();
The part in red is where I think it's happening because that is what I just added to the request.  createdTime in the table is set as DateTime.
Can anyone see what I am missing here?
More info is available if needed.
Thanks,
Zath

View 1 Replies View Related

Valid User

Jun 17, 1999

Hello:
I am getting an error:
User id 12 is not a valid user in database Dest_db
While using Database object transfer.

Using mixed security on the source database.
copy data and replace existing data options are selected.

View 1 Replies View Related

Trigger ... Is This Valid?

Nov 24, 2004

Is the following valid syntax? Thanks for your help!

IF (SELECT chargeID FROM inserted = 0) BEGIN

END

OR, should I be doing something like this:

DECLARE @thisChargeID as int
SET @thisChargeID = (SELECT chargeID FROM inserted)
IF (@thisChargeID = 0) BEGIN

END

View 14 Replies View Related







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