Log in

View Full Version : Why I hate Microsoft (Techy)


timwilky
13-06-06, 04:16 PM
OK my boss is insisting I write his new app using C#.net. I have explained that java runs perfectly well on a PC but he is the boss.


I need to read some values off of a sql database. He won't even let me use oracle. one of the values is of type float. So when I then use the appropriate function, ie DbDataReader.GetFloat(), it errors with cannot cast infinity. WTF. so before the call I have a debug line to return the DbDataReader.GetDataTypeName() and it tells me it is of type Float.


So lots of banging of heads against a wall, then I look at the database and check there is appropriate values. yes there are. I then accidently go into the table design. and oh! SQL server allocates 8 bytes to a floating point number.

Change my call to float value = (float) DbDataReader.GetDouble(); and everthing works.

4 hours chasing a bug, to find it is an incompatability between data type definitions in Microsoft ****ty products.


AAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHH

Sorry the above is techy coding. I just need to shout at somebody and Microsoft don't listen

kciN
13-06-06, 04:19 PM
OK my boss is insisting I write his new app using C#.net. I have explained that jave runs perfectly well on a PC but he is the boss.


I need to read some values off of a sql database. He won't even let me use oracle. one of the values is of type float. So when I then use the appropriate function, ie DbDataReader.GetFloat(), it errors with cannot cast infinity. WTF. so before the call I have a debug line to return the DbDataReader.GetDataTypeName() and it tells me it is of type Float.


So lots of banging of heads against a wall, then I look at the database and check there is appropriate values. yes there are. I then accidently go into the table design. and oh! SQL server allocates 8 bytes to a floating point number.

Change my call to float value = (float) DbDataReader.GetGetDouble(); and everthing works.

4 hours chasing a bug, to find it is an incompatability between data type definitions in Microsoft sh*tty products.


AAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHH

Sorry the above is techy coding. I just need to shout at somebody and Microsoft don't listen

..To all of what you just said!! :wink: :wink:

Carsick
13-06-06, 04:20 PM
I always find it amusing when MS stuff doesn't even work together as they should.
I'm almost exclusively a Java coder and I'm quite happy that way. I'm lucky though, the co I work for are very adamant about sticking with Java as long as it's viable.

didge
13-06-06, 04:24 PM
what does fload and string mean?

Abyss
13-06-06, 04:25 PM
Change is bad.... it = more work :P

Ping
13-06-06, 04:26 PM
*stays very very quiet but takes notes in the hopes of one day making a java programmer look stupid*

;)

Xerbraski
13-06-06, 04:28 PM
4 hours chasing a bug

Wasn't Northwind doing the same the other day, I think he killed his one though and got lots and lots of satisfaction from it.

Somtimes I find it helps if you write down the word Microsoft and then draw little stick men with guns and stuff shooting the word Microsoft with little dots for bullets and stuff.
At the same you can make your own explosion sound effects with your mouth!!
Then just crumple up the piece of paper and set it on fire... Job done!!

timwilky
13-06-06, 04:40 PM
what does fload and string mean?

float and string are data types

float is a floating point number as in not an integer, as in contains a decimal point

although I have not made any reference in my post to a string, a string is a simple text object, such as a persons name.

Both these data types have properties and methods etc. I aint in the business of teaching anyone code hacking. suffice to say a method is a way of doing things with a data object, and a property is information about that object such as the number of characters in the string etc.

didge
13-06-06, 05:03 PM
ahh i see, i know you didn't say anything about strings but when i have heard them they have been in the same context hence why i asked

kciN
13-06-06, 05:55 PM
what does fload and string mean?

float and string are data types

float is a floating point number as in not an integer, as in contains a decimal point

although I have not made any reference in my post to a string, a string is a simple text object, such as a persons name.

Both these data types have properties and methods etc. I aint in the business of teaching anyone code hacking. suffice to say a method is a way of doing things with a data object, and a property is information about that object such as the number of characters in the string etc.

I remember when I used to program on my Acorn Electron in Basic *cough* I used to use the string command, known as $, if I recall.
Inkey$ I think, a command to wait for a key to be pressed... :?:

And I think everyone remembers the

10 Print "Whatever";
20 Goto 10

(The ; is there to make it not just scroll down the page but across it too.)

I'll shut up now! :wink:

jonboy
13-06-06, 06:02 PM
I quite like Microsoft.


.

Filipe M.
13-06-06, 11:13 PM
I quite like Microsoft.


.


*cof*Can we ban him?*cof* 8-[

didge
13-06-06, 11:15 PM
what does fload and string mean?

float and string are data types

float is a floating point number as in not an integer, as in contains a decimal point

although I have not made any reference in my post to a string, a string is a simple text object, such as a persons name.

Both these data types have properties and methods etc. I aint in the business of teaching anyone code hacking. suffice to say a method is a way of doing things with a data object, and a property is information about that object such as the number of characters in the string etc.

I remember when I used to program on my Acorn Electron in Basic *cough* I used to use the string command, known as $, if I recall.
Inkey$ I think, a command to wait for a key to be pressed... :?:

And I think everyone remembers the

10 Print "Whatever";
20 Goto 10

(The ; is there to make it not just scroll down the page but across it too.)

I'll shut up now! :wink:
sounds good :D

Ping
14-06-06, 12:27 AM
what does fload and string mean?

float and string are data types

float is a floating point number as in not an integer, as in contains a decimal point

although I have not made any reference in my post to a string, a string is a simple text object, such as a persons name.

Both these data types have properties and methods etc. I aint in the business of teaching anyone code hacking. suffice to say a method is a way of doing things with a data object, and a property is information about that object such as the number of characters in the string etc.

I remember when I used to program on my Acorn Electron in Basic *cough* I used to use the string command, known as $, if I recall.
Inkey$ I think, a command to wait for a key to be pressed... :?:

And I think everyone remembers the

10 Print "Whatever";
20 Goto 10

(The ; is there to make it not just scroll down the page but across it too.)

I'll shut up now! :wink:

YAY!!! :lol: That was the first programming language i ever learned too! (I was one of two girls in my year who passed the logic test and were 'allowed' to take computing :roll: ) ... Oh, hang on.. that's after i wrote a stupidly breakable password script on my zx spectrum... :lol: Had to load it first just to run it (as in load it and tell the spectrum to run it)... :lol:

Ah, the heady days of youth...

BillyC
14-06-06, 08:01 AM
Sorry Tim,

First rule of database programming - language data types are not necessarily the same specification as database ones. It's been a point to watch out for in SQL & VB programming for a long time.

But, now you know! ;)

Terence
14-06-06, 08:59 AM
Sorry Tim,

First rule of database programming - language data types are not necessarily the same specification as database ones. It's been a point to watch out for in SQL & VB programming for a long time.

But, now you know! ;)

But it seems from his post that Java will always work with Oracle and MySQL? I dunno, I'm more into networks :roll:

timwilky
14-06-06, 09:06 AM
Sorry Tim,

First rule of database programming - language data types are not necessarily the same specification as database ones. It's been a point to watch out for in SQL & VB programming for a long time.

But, now you know! ;)

Yeah now I know, I am new to MS stuff. so learning all the time. It is nice when some stuff like DateTime seems to co exist quite nicely though. Daft thing is that now I know I notice visual studio tellsme that the sqlDataType.Float is actually an instance of double. doh use the tools

Carsick
14-06-06, 09:33 AM
Sorry Tim,

First rule of database programming - language data types are not necessarily the same specification as database ones. It's been a point to watch out for in SQL & VB programming for a long time.

But, now you know! ;)

But it seems from his post that Java will always work with Oracle and MySQL? I dunno, I'm more into networks :roll:
The difference is that the DB interface stuff in Java takes care of that type of thing for you.

BillyC
15-06-06, 08:26 AM
Tim,

The key is to look at the specifications for the datatypes between the SQL db and the Programming Language - as you've already ascertained. The problem mainly occurs with the number data types.

I'm not a C# man myself, have always been on the VB side. I don't know how these things are constructed in Java, but I would guess that it uses the same ADO interface that the others use. However, I couldn't even speculate what the practical considerations would be.

Mr Toad
15-06-06, 08:36 AM
Bring back Fortran that's what I say :lol:

Captain Nemo
15-06-06, 08:38 AM
:twisted: :twisted:

everyone, , , like get a life, , ,

i havent a clue what you said, but if you need string ive a 100m ball of blue string in the shed, just pay me for postage

Kinvig
15-06-06, 09:29 AM
Why are you using a float?

I generally avoid the float data type, if I can. Approximate numerical data types aren't ideal for performing quality checks between values or rounding numbers...and referencing float columns in WHERE clauses is, funnily enough, something else I avoid.

Ditto the real data type.


Right, I'll get me coat.