Hi all,

Once again an off-topic... sorry for that...

In my java beans, i'm firing a Select query to get a row of data.

"Select * From <table> Where <fld1> = '12345'"

Now, this gives single row..., and i'm trying to update the contents of this
row as mentioned below.

if(rst.next)
{
        rst.updateString("<strFld>","<strVal>");
        rst.updateInt("<intFld>","<intVal>");
        rst.updateRow();
}

Where <strFld> is a field of data type *varchar*.
and <intFld> is a field of data type *int*.

But, after executing the code mentioned above, if i open the table and see
the data in *int field*, it is very awckward and not what i updated...

e.g. if the value in that row will be..."-3" or "6809034" or "242335" or
something like that, even though the <intVal> is 1 or 5 or 8 or something
like that... 

The above code works very well and updates the table field value properly
when database is Ms-Access..

What can be the problem ?? is it with SQL Server / Table field data type in
SQL Server / in my code above ???

please help me....

thanks and regards,
Chintan Shah

Reply via email to