.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error: Expression does not produce a value.

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :Windows Application
Hello all, I need your help. I have a problem of writing the code on if statement. I am trying to read the strings for the textbox from the classlibrary. What I am doing that when I input the strings in the textbox on the form, I want to check in the classlibrary whether if the strings is matched or not.   Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click Dim c As New TestString.Strings If c.TestString(Textbox1) Then '....write the code here End If   There is an error that are jumping on If c.TestString(Textbox1) Then statement. It suggests that I need to included the value which I doesn't want to write in the long code.   Does anyone know a solve for this?

View Complete Post

More Related Resource Links

Syntax error (missing operator) in query expression

Good Day Gurus!

I have a Excel user application which has a user form (named 'Registo') that displays criteria and an image that has been entered in it's corresponding spreadsheet. This works the way it should.  There's also the ability to search the spreadsheet via a form (by clicking 'Pesquisar' button) this opens a search form. However, I having a bit of a problem with it. When I try to search for something it basically doesn't do anything at all. It just sits there. So I tried to debug it and I think I'm having a problem with either the JET db engine or somethign with teh query or maybe I don't have the correct reference.

I 'borrowed' this Excel application from another forum because it's exactly what I'm looking for! However, I suck at vb.

So I was hoping somebody could take a look at the code and see if I'm missing something?  I'm kinda' desparate to get this working because I'm been trying to figure it out for days and I'm running out of time.  Cry
Option Explicit

'constantes para auxiliar na verificação do código
Private Const Ascendente As Byte = 0

Error handling on Connection Manager Expression

I am using a connection manager with an expression to set the connection string. (see my question http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/1ea71f9a-df5c-4c1c-a2fd-9e24632afbd8) I would like to put some error handling just incase things go wrong. Can anybody give me some tips on where to place error handling?Mr Shaw

Expression evaluation caused an overflow error when calling ExecuteResultSet(SqlServerCe.ResultSetOp

HelloWhen I call ExecuteResultSet(SqlServerCe.ResultSetOptions.Scrollable) I am getting the following error when the data type is Numeric(18, 4):Expression evaluation caused an overflow. [ Name of function (if known) =  ]The numbers involved are not that big and work fine when ExecuteReader() or ExecuteResultSet(SqlServerCe.ResultSetOptions.None) are called on the same SQL.Any ideas? Thanks in advance!Cheers,DaveCode:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim errorDescription As String = String.Empty        Dim numericNumber As String = String.Empty        Try            Using sqlCE As New System.Data.SqlServerCe.SqlCeConnection("Data Source = '" & My.Application.Info.DirectoryPath & "\MyDatabase.sdf';")                sqlCE.Open()                Dim sqlCECommand As SqlServerCe.SqlCeCommand = sqlCE.CreateCommand()                sqlCECommand.CommandText = "SELECT SUM(MT.TPM_Measure1) AS CurrentAmount FROM BUS_Table MT"                System.Diagnostics.Debug.WriteLine(sqlCECommand.CommandText)                Dim reader As System.Data.IDataReader = Nothing                If RadioButton1.Checked Then                    reader = sqlCECommand.ExecuteReader() 'Works fine                ElseIf RadioButton2.Checked Then                    reader = sqlCECommand.ExecuteRe

Arithmetic overflow error converting expression to data type smallint

Can anyone tell me what exactly this means? Arithmetic overflow error converting expression to data type smallint. 

Help needed on XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

Im trying to determine if a value already exists in an XML file. In this case I want to know if there's a node "id" with value 3. But I cant figure out how...XML:<root><data><compare><locations><id>3</id><id>5</id></locations></compare></data></root>XSL:xmldoc.SelectSingleNode("//root/data/compare/locations/id=""3""")Error:XPath Error: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

The expression contains undefined function call MyUserFunction() error :Telerik Reports

  Hello All, I am getting the error."An error has occured while processing textbox:The expression contains undefined function call FormType()". I have a report..where in i used a user function called "FormType". My datasource  for teh report is sharepoint list. I am passing a parameter to the user function in the code.My user functions retrieves three values(one each time based on the conditions)But when i select the user function..in the edit expression dialog box.. i am not writing any parameter inside the user function as i am not sure what to write there. I have gone through http://www.telerik.com/support/kb/reporting/designing-reports/the-expression-contains-undefined-function-call-myuserfunction-error.aspx and thought i might fall in 2nd cateogry..but unable to find a solution for that Please help me. Here is the code. InitializeComponent();             string strType;             SPSite oSite = new SPSite("spsiteurl");             SPWeb oWeb = oSite.OpenWeb();             string[] parameters = { "10", "100", "1000" };             T

#Error when building an IIF expression for a column label




This is a report based on two different hierarchy. PCA and CCA hierarchy.

The @hierarchy parameter will determine which hierarchy to use and that will drive what is displayed on the row names.

When I write the following expression, all I get is #Error.

Parameters!hierarchy.Value = "PCA",


If I change the expression to

Parameters!hierarchy.Value = "PCA",

The the PCA Hierarchy names appear but when I switch to the CCA on the @hierarchy, I get the #Error message again.


Can any one help?




SSIS 2008-Variable Expression Type Cast Syntax Error


Hi all members.

I need to ask for the following code. I need to convert the variable into a string.

"Select Distinct convert (int ,A.CustomerCategory) as AccountReceivableCategoryID, convert (varchar(40), B.Text) as AccountReceivableCategoryNameE
from Inkunde A , inpara B
where A.CustomerCategory= B.SearchItem
and B.Language1 = 'EN'
and B.ParameterName = 'CATEGORY'
and A.CustomerCategory = (DT_STR,200,1252) "+  @[User::CategoryID] +"
Order By A.CustomerCategory"

Kindly any member let me know, How to correctly use the Type Cast fucntion in variables

Thanks and Best Regards,


Regular Expression Validator error for masked SSN number


Hi all,

I need a small help.
Below given is the ASP.NET Regular Expression Validator that i am using to validate the SSN number being used in my project.

<asp:textbox id="txtSSN" runat="server"  size="14" onBlur="javascript:return mask(this.value,this,'3,6','-','Pri');" maxlength="9" AutoCompleteType="Disabled"></asp:textbox>

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="<span style='display:none'></span><img src='../images/arrow.gif' alt='Enter a valid 9 digit SSN number'>" ControlToValidate="txtSSN" ValidationExpression="^[0-9X]{3}[\- ]?[0-9X]{2}[\- ]?[0-9]{4}$"></asp:RegularExpressionValidator>

In this project the SSN number is masked before being displayed to the user.
Below given is the format for the display of the SSN number in the front end code

SSN NUMBER in the code behind            :     333-44-2222
SSN NUMBER displayed in textbox as    :     XXX-XX-2222


ConnectionString Expression to dBASE5.0 parse error



I am getting the following error:

The expression "“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” + @[User::vCurrentFilePath] + “;Extended Properties=\”dBASE 5.0\”" on property "ConnectionString" cannot be evaluated. Modify the expression to be valid.

Thanks for any help.

SSRS 2005 error: The Value expression for the textbox contains an error: [BC30205] End of statement



I am trying to run an ssrs 2005 report and receiving the error above.

I want to run custom code in the CODE tab.

Here is my code

Public Function GetDayName (dayIn as integer) as String
Select Case dayIn
Case 0
 Return "Sunday"
Case 1
  Return "Monday"
Case 2
 Return "Tuesday"
Case 3
  Return "Wednesday"
Case 4
  Return "Thrusday"
Case 5
  Return "Friday"
Case 6
   Return "Saturday"
 Case Else
  Return  "None"
End Select
End Function

What is wrong with my code?


Arithmetic overflow error converting expression to data type int.


I have a table with a row called row1, this row1 is a bigint and has values from 0  To  4278190080


I am running a query such as: select top 1 * from tableA where row1 <= (((73*256+62)*256+53)*256 + 12)


How can I get this to work? I tried to do where cast(row1 as float) <= ....... but I get the same error.

Error: cannot be translated into a LINQ to Entities store expression


When I run my code i get this error:

The specified method '{0}' on the type '{1}' cannot be translated into a LINQ to Entities store expression

it happens in this part of the code:

 public Boolean valtOpVerlofDag(Dictionary<string, object> afw)
            DateTime start = DateTime.Parse((string)afw["startDatum"]);
            IEnumerable<Period> holidays = from hol in periods
                                               where (hol.Type == "Holiday") && hol.IsInPeriod(start)
                                               select hol;
            if (holidays.Count() == 0)

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


Handling 404 page not found with Error page



      How do i handle 404 page not found?

Inserting personal error message in ValidationSummary



I am creating a web form that requires a lot of validation. I use many of the validation control in asp.net already like RequiredFieldValidator and CompareValidator. 

My Problem: after my custom validation for the value entered return an error message, and I pressed enter key when the field is empty, my custom error message is overlapped by my ValidationSummary. 

Setting my custom error to visible = false on button click also does not seem to work as it requires for me to enter the value first.

This made me think, is there a way to insert my custom validation inside the ValidationSummary as an error message like for other validation control?

Thanks in advance

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend