|
Many thanks,
guess the point was about disabling the overflow checking (which I was not aware about).
I need just one more improvement, about getting the Hash_calc result to become a value between 0000h and FFFFh (a WORD). Which would be the correct approach?
Thanks once more.
|
|
|
|
|
I guess just go back to using UInt16 .
|
|
|
|
|
seems the right choice is Ushort.
I get results within FFFFh now.
Just need to find out why those results are not matching the originator's hash, will debug further.
|
|
|
|
|
Make sure that the originator is using exactly the same algorithm, including the hash seed value.
|
|
|
|
|
yes, will ask to set some debugs in order to check it.
The seed is identical, I guess it's something related to the results or maybe Ushort is not the right choice due to positive/negative calculation results.
|
|
|
|
|
the seed was mistyped, 5381 in C# vs 5831 in VB... 
|
|
|
|
|
I have no success in installing subject software on a windows 8.1 Sony. I am attempting to install from the ISO download. The installer runs a long time, but fails to install anything. Anyone have a suggestion? There seems to be no good answer posted on the web.
Bobby
|
|
|
|
|
Everything I can find seems to say it is not compatible with Win 8. If it were me I would just download the latest express version and use that. 2012?
vbmike
|
|
|
|
|
An alternative could be Visual Studio Community edition - but it's bigger and has a lot of features you might not need.
|
|
|
|
|
Thank you both for your prompt response. I'll look into the newer versions. I am using VS210 pro on my desktop, so I wanted the same for my new notebook. I will forgo installation on the notebook for now. My next chore is to see if the installer is still trying to install it. I canceled the installation but a dialogue said it would complete the installation of the current module. But I finally had to shutdown windows installer because it was still working away. There seems to still be a lot of machine activity with windows installer worker. I hope I don't have a Freddy Kruger here.
Bobby
|
|
|
|
|
I'm working with vb.net and entity framework.
In my form , I have 2 comboboxes : Article and price. ( For both comboboxes , .Selectedvalue is an integer )
If I use this expression :
Dim gj As IEnumerable(Of Myobject)
gj = (From t In context.myobjects Where t.art = Article.SelectedValue And t.prc = price.SelectedValue
Select t).ToList
an error is produced :
An unhandled exception of type 'System.NotSupportedException' occurred in EntityFramework.SqlServer.dllAdditional information: LINQ to Entities does not recognize the method 'System.Object CompareObjectEqual(System.Object, System.Object, Boolean)' method, and this method cannot be translated into a store expression.
If I use this code :
Dim a as integer=Article.SelectedValue
Dim c as integer= price.selectedvalue
Dim gj As IEnumerable(Of Myobject)
gj = (From t In context.myobjects Where t.art = a And t.prc = c
Select t).ToList
everything is OK.
What I have wrong in first expression , and how should I modify to make it work , because I don't want to use extra variables like in the second code.
Thank you !
|
|
|
|
|
Does it work if you wrap a CInt around the SelectedValue ?
Where t.art = CInt(Article.SelectedValue) And t.prc = CInt(price.SelectedValue)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It's the same situation.
Doesn't work.
|
|
|
|
|
|
If .selectedvalue is an object , then why the expression used in second code are ok :
Dim a as integer=Article.SelectedValue
I think this is the same as :
....
...Where t.art = Article.SelectedValue
What's the difference ?
|
|
|
|
|
I believe VB will do implicit conversions. I don't think C# would allow that.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Who's talking about C# ? All the codes are in VB.net.
|
|
|
|
|
Yes, I said that VB allows you to do that. I was simply pointing out that the way you have it written won't work in C#. In other words, VB is doing stuff behind the scenes.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
ok but is there any solution ?
|
|
|
|
|
|
Hello !
Calling the ToString method , make this expression works.
But I want to know that is this correct , because inside the query , variables of different types are compared ( integer with string ).
Can this modified expression produce a correct result every time ?
Thank you !
|
|
|
|
|
You could convert to integer instead, you don't have to do to string.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
but , as I have posted before , using the Cint doesn't work and produce the same error.
|
|
|
|
|
I think you're spending too much time on this. The original problem is you can't use objects the way you were doing. So, convert it to something that works and move on.
However, all you said was CInt did not work. What was the error? It would have been a different error. And perhaps use Convert.ToInt32() instead of CInt which is old VB code anyway and not .Net.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello !
I'm spending time because my project is full with this kind of queries and each of them with 10-12 where conditions.
I try using Convert.toint32 , but I get an error :
An unhandled exception of type 'System.NotSupportedException' occurred in EntityFramework.SqlServer.dll
Additional information: LINQ to Entities does not recognize the method 'Int32 ToInt32(System.Object)' method, and this method cannot be translated into a store expression.
After I try to use convert.Toint32 but keeping the Tostring method. Again I get an error :
An unhandled exception of type 'System.NotSupportedException' occurred in EntityFramework.SqlServer.dll
Additional information: LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression.
|
|
|
|