none
can't insert double type into data base RRS feed

  • Question

  • hey all ...

    i have double number = 332655.238519441 and i convert it toString() when i try to insert this to database it is work with no error but i checked the database and i saw the row contain 1 not my number i try many times

    any idea .....

    i usnig sql server compact edition 3.5

    Wednesday, June 9, 2010 12:07 AM

Answers

  • Please add more details. Some code snipate so we can check problem
    Regards
    Nayan Paregi (MCTS)
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, June 9, 2010 3:07 AM
  • hey all ...

    i have double number = 332655.238519441 and i convert it toString() when i try to insert this to database it is work with no error but i checked the database and i saw the row contain 1 not my number i try many times

    any idea .....

    i usnig sql server compact edition 3.5

    please check your database column length

    If this is helpful
      { Please Mark as Answered }
    else if it is not helpful
      { Un-Mark as Answered }


    Best Regards
    Huan Li, Code Blog: Small is New Big In C#
    Wednesday, June 9, 2010 8:30 AM

All replies

  • Please add more details. Some code snipate so we can check problem
    Regards
    Nayan Paregi (MCTS)
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, June 9, 2010 3:07 AM
  • hey all ...

    i have double number = 332655.238519441 and i convert it toString() when i try to insert this to database it is work with no error but i checked the database and i saw the row contain 1 not my number i try many times

    any idea .....

    i usnig sql server compact edition 3.5

    please check your database column length

    If this is helpful
      { Please Mark as Answered }
    else if it is not helpful
      { Un-Mark as Answered }


    Best Regards
    Huan Li, Code Blog: Small is New Big In C#
    Wednesday, June 9, 2010 8:30 AM
  • thx nayan :)

    solved when i install visual studio sp1 i dnt now the reason but i restart the vs and install sp1 and solved :)

    i have some issues too :

    1- i am working in mobile application program and i have form contain combox i need to make this combox take column from the database table

    2-i tried this code

     

    DataBaseDataSet ds = new DataBaseDataSet();

     

    DataBaseDataSet.Favorities1DataTable dt = new DataBaseDataSet.Favorities1DataTable();

    favorities1TableAdapter1.Fill(dt);

     

    foreach (DataRow dr in dt)

    {

    comboBox1.Items.Add(dr[1].ToString());

     

    }

    it is work fine but take veeeeeeeeeeeeeeeeeery much time to load...

    and when i tried to set the combox datasource and display member and value member by wizard, i got nothing in combox

    any additional steps ....

    sry i know this page about other question but maybe u help me :)

    thx..

    Wednesday, June 9, 2010 5:46 PM