Operator '=' is not defined for type 'Char' and type 'Boolean'.

Hello,

In my application when i click the button i'm getting this " Operator '=' is not defined for type 'Char' and type 'Boolean'. " But when i test it locally there is no problem at all!!!!

Please tell me why this error is occuring...


Thanks
Swapna
Please click "mark as answer" if this post helped you.
0
swapnasamsonvarkey
4/16/2009 7:10:06 AM
asp.net.visual-basic.net 3721 articles. 0 followers. Follow

2 Replies
2050 Views

Similar Articles

[PageSpeed] 45

swapnasamsonvarkey:

Hello,

In my application when i click the button i'm getting this " Operator '=' is not defined for type 'Char' and type 'Boolean'. " But when i test it locally there is no problem at all!!!!

Please tell me why this error is occuring...

i think you used single "=" in if condition in C#

if (a = b) // this is wrong

do

if(a == b)


MAKMark as Answer if this reply helps you
MVP ASP/ASP.Net
MVP ASP/ASP.Net
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
0
mudassarkhan
4/16/2009 7:28:06 AM

Hi,

" Operator '=' is not defined for type 'Char' and type 'Boolean'.

R u passing Eql operator To filed Which Has CHAr or Boolean Data Type..

Kindly  Check Local and server table..R same or Not

 


Thanks
Avinash Tiwari

Remember to click “Mark as Answer” on the post, if it helps you.
0
qwe123kids
4/16/2009 7:30:41 AM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

Operator '*' is not defined for type 'DBNull' and type 'Decimal'.
 I am getting an error from the following line   <asp:Label ID="Label1" runat="server" Text='<%# String.Format("{0:C}", Eval("ProductQty") * Eval("Price"))   %>' ></asp:Label> I think I may need to convert/define the Variables but not quite sure how to do it. Any help would be great. it's not a matter of converting...its the fact that the value from the DB is Null... You'll have to wrap an IF check around it or change your query to return 0 instead of Null. If the field ...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

Operator '>' is not defined for type 'DBNull' and type 'Integer'.
this is my code I don't get why I'm getting this error SubModel is a number :   Example : 823 If Ds.Tables(0).Rows(0).Item("SubModel") > 0 Then Dim crst As New DataSet SqlStr = "SELECT SubModelName FROM SubModel,AcesData WHERE AcesData.SubModel = SubModel.SubModelID and (SubModelID = ?)" Dim da2 As New Data.OleDb.OleDbDataAdapter(SqlStr, conn) da2.SelectCommand.Parameters.Add("?", Data.OleDb.OleDbType.VarChar).Value = Ds.Tables(0).Rows(0).Item("SubModel")...

table_info('','','','%') cannot return any types
I was recently confirming table_info special cases and discovered the case for getting table_types cannot work. table_info('','','','%') should return a list of table types but it returns a list of empty strings instead: my @types = $h->tables('', '', '', '%'); print "all types:\n", join("xxx\n", @types), "\n"; # should output something like: # "dbo" # "INFORMATION_SCHEMA" # "sys" # and actually outputs: xxx xxx It seems to be down to the following ...

Cannot convert type 'type' to 'type'
I am learning all of this, so I am still fresh, so please bear with me :)I have a page that has some txtboxes in it, simple registration form, and I have a button that will save those txt boxes to the db. I am using:- I am using Visual Web Developer 2008 Express Edition- C# When I try to compile the project I get error: Cannot convert type 'System.Web.UI.WebControls' to 'String' This is content of my web.config    <profile> <properties> <add name="FirstName"/> <add name="LasttName"/>...

E2094 'operator+' not implemented in type 'XXX' for arguments of type 'int'
Okay I have a problem; I am trying to extend a string class that I wrote for a friend so I can use it another project I am working on. I have an error that makes absolutely no sense. Here is the code for the copy constructor: String(const String &str) // for copying into a new string object { Size = str.Size; Data = new char[Size+1]; for (int i = 0; i<Size; i++) Data[i] = str[i]; // recieving the following error on the above line: [BCC32 Error] Mystring.h(33): // E2094 'operator+' not implemented in type 'String' for arguments of typ...

'do' won't 'do' if '/'
Greetings to All from Au, Have a NetWare Perl 5.8.4 and wanted to tweak File\Spec\NW.pm to try and standardise on '/' separators. If I run a test script (t/uni/lower.t) with an unmodified NW.pm, it calls t/uni/case.pl, that, in case.pl, (when the path separators are '\'), the $file is '..\lib\unicore\To\Lower.pl' and the following code portion works, with $simple getting a returned table: sub casetest { my ($base, $spec, $func) = @_; my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", &qu...

'''
Name: L Lachowsky Email: e2brutus_10atyahoodotcom Product: Firefox Summary: ''' Comments: why duddn this surprise me... I change default server from IE to Mozilla, and then i get error messages. well, shud I decide to not get on my computer with Mozilla..or shud I risk security breeches with IE....hmmm at least i can get on the internet with IE Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this fee...

Operator '==' incompatible with operand types 'Int64' and 'Object'
I have the typical gridview control driving a formview control.  Both use LinqDataSources.  I'm using the table's ID field, DelID to find the record to be displayed by the FormView when a record is selected from the GridView.  This gives me the above error.  Why, and how do I fix this?Diane Check the type of the operands you are trying to compare.You will have to cast on your operands. something like intvariable == (int)objectvariable; or if(((object)intvariable).Equals(objectvariable))*** If this post helps you, then Mark this post as Answer *** I'm ...

Operator '==' cannot be applied to operands of type 'string[]' and 'string'
Hi, I have the following C# code and the line - " if(a == "Document Library") break; " - is giving me the error - Operator '==' cannot be applied to operands of type 'string[]' and 'string' I am not very familar with c# and would appreciate any help as to how to get around this. I have checked google but can't see anything covering this. Cheers for all help... string [] a; try { currentFolder = currentFolder.Replace("%2f","/"); currentFolder = currentFolder.Replace("%20"," "); a = curre...

BC30452: Operator '&' is not defined for types 'String' and 'System.IO.Stream'.
I try to upload an file into an image-field in my SQL but I get this error: BC30452: Operator '&' is not defined for types 'String' and 'System.IO.Stream'. What is this error and how can I solve it? Piece of the code:Dim MyFileCollection As HttpFileCollectionDim MyFile As HttpPostedFileDim FileLen, Loop1 As IntegerDim bijlage As Stringbijlage = ""Dim MyStream As System.IO.StreamDim ContentType As StringMyFileCollection = Request.FilesMyFile = MyFileCollection(0)ContentType = MyFile.ContentTypeFileLen = MyFile.ContentLengthDim Input(FileLen) As ByteMyStream = MyFile.InputStreamA...

Operator '=' is not defined for type 'DBNull' and string
Hi,   This error occurs and im not sure why????? This is my code :   Dim Str_Staff As String = "SELECT * FROM sec_Staff"Dim cmd_Staff As New System.Data.SqlClient.SqlCommand(Str_Staff, myConnection_Staff) Dim ds_Staff As New DataSetDim da_Staff As New SqlClient.SqlDataAdapter(cmd_Staff) da_Staff.Fill(ds_Staff)   Dim i As Integer  For i = 0 To ds_Staff.Tables(0).Rows.Count - 1 If ds_Staff.Tables(0).Rows(i).Item("Email") = txtStep4_Email.Text ThenMsgBox("Email already used, please try again") rbtnStep3_SystemUser.SelectedValue =...

Web resources about - Operator '=' is not defined for type 'Char' and type 'Boolean'. - asp.net.visual-basic.net

Resources last updated: 1/20/2016 10:57:53 AM