Lists all of the journal entries for the day.

Sun, 28 Sep 2003

10:14 AM - AHHHH

I've been trying to figure out a bug for 4 days now, and I can't believe how stupid it was..

Damn MICROSOFT PRODUCTS. I wrote this damn handling rate update/view page and it used a data transfer object between a DAO and the .NET gui page. No problem right... well every time i updated the value it trunicated everything after the decimal point.

For example, the regular value is 1.50. If i tried to change it to 1.60, it would return 1. If i changed it to 2.5 it would return 2.

Now I figured it was the conversion of the decimal variable to a string to store it. See it has to go into a sql server table that contains a varchar 50 field as its the params table. It doesn't make sense to create a whole table to store 1 decimal.

I was using stored procedures to do the update and views. Guess what the damn stored proc looked like this:

CREATE PROC handling_rate_u
@rate varchar

...

well @rate varchar translates to 1 character instead of just saying its the character data type.. HOW IRRITATING. With other data types, you can just say int... not int 4 or some shit like that.

Sure from a C standpoint its a DUH.. i should have known that. I guess i expect a database server to be a few levels away from obvious ARRAYS of a fixed size.

(technicall malloc'd i'm sure)

What bullshit.

so i fixed it by changing it to
VARCHAR(50)
i could make it smaller being a decimal, but screw it.. it works.

location: Home

()