Add Birthday
Cutome code after deployment gives an error
No replies to this topic
Sushilb Bansode
#1
|
Member
14
Points
|
Posted on
18 Nov 2011 12:49 PM IST
Hi All
I wrote and Cutome code as below , that works well in development environment,
During Preview it gives me perfect Output,
but after the deployement it gives me error.
What must be fix to this. Please attached files where i added customcode and reference to System.data.dll
Function IsBudgetRevised(ByVal Proj_Id As Integer, ByVal Comp_Id As Integer, ByVal Sbu_Id As Integer, ByVal Contract_Type As Integer, ByVal FinYear as Integer) As String
Dim oConn As New System.Data.SqlClient.SqlConnection
oConn.ConnectionString = "Data Source=C-41396\C41396;" & _
"Initial Catalog=Finance_Dashboard; Integrated Security=true"
oConn.Open()
Dim oCmd As New System.Data.SqlClient.SqlCommand
oCmd.Connection = oConn
oCmd.CommandText = "Select Convert(Varchar(50),UpdatedBudget)+'-'+Convert(Varchar(50),LatestForecast) from tbl_CalculateUpdatedBudLatestFor" & _
" Where Proj_Id=@Proj_Id" & _
" and Comp_Id=@Comp_Id" & _
" and Sbu_Id=@Sbu_Id " & _
" and Contract_Type=@Contract_Type " & _
" and FinYear= @FinYear "
oCmd.Parameters.AddWithValue("@Proj_Id", Proj_Id)
oCmd.Parameters.AddWithValue("@Comp_Id", Comp_Id)
oCmd.Parameters.AddWithValue("@Sbu_Id", Sbu_Id)
oCmd.Parameters.AddWithValue("@Contract_Type", Contract_Type)
oCmd.Parameters.AddWithValue("@FinYear",FinYear)
Dim nRetVal As String = oCmd.ExecuteScalar()
oConn.Close()
If(nRetVal<>Nothing)
Return nRetVal
else
Return "0-0"
End If
End Function
|
SSRS
946
views
Reply to this topic
|
|
|