Re: where is the error....???help me to find it!!!!
gbattine wrote:
Hi guys,
i'm a great problem. I've developed a java application that receive in
input a txt file, stores it into an array of byte and put it in a blob
field of a mysql db in the table tbl that has 2 columns, a string and a
blob.
The question is that i have a function called carica that create the
array of bytes and another function Test.java that put the array of
byte into the blob field and a string in the string field.
The problem is that the string is inserted correctly while the blob
no,it's null.
There is(i think) a problem in the passing array of bytes (called
data)beetwen carica function and test.
Can you help me,please?
I'm crazing and i'm stopping....please help me to go on
Your code is a bit too long for me to debug by inspection, and a bit
inconvenient to run, because it requires a database.
However, I have some notes on how to debug problems that you can't find
by just looking at the source code at
http://home.earthlink.net/~patricia_shanahan/debug/index.html
In terms of the approach I described, you currently have a theory that
the problem is in the passing of the "data" array between the carica
function and test.
Either start adding debug printouts, or fire up your favorite debugger,
and look a the data on both sides of the suspect interface. Is the
theory correct or not?
If it is correct, try to look in more detail at what is going wrong. Can
you construct an example that isolates that problem?
If it is not correct, think of another theory. If you don't have enough
data to think of another theory, do some experiments with extra data
collection to find out more about what is going on.
Remember, every time you eliminate a possibility or get some more data,
you are making progress even if you can't jump straight to the answer.
Patricia