locked
Query insert number to access RRS feed

  • Question

  • User810354248 posted

    in amy asp.net+vb web with access database i have form to insert data i am using this lines as code

    oledbcom.Parameters.Add(New OleDbParameter("@p", OleDbType.VarChar,50)).Value = alauthtxt.Text

    but what will come for number field OleDbType.VarChar,50)).Value = alauthtxt.Text

    Monday, April 14, 2014 2:08 AM

Answers

  • User697462465 posted

    Hi Baiju EP,

    Please don't post duplicate threads, the your thread have already replied by our engineer, the following is the reply content, please try to refer it:

    Hi Baiju Ep,

    About your problem,please try the code below:

    int a =Convert.ToInt32(Lable1.Text);
    oledbcom.Parameters.Add(New OleDbParameter("@num", OleDbType.Integer)).Value =a ;

    Best Regards,
    Terry Guo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 17, 2014 2:29 AM

All replies

  • User-1716253493 posted

    Try like this

    oledbcom.Parameters.AddWithValue("@p",int.Parse(alauthtxt.Text));

    Monday, April 14, 2014 3:18 AM
  • User810354248 posted

    i had alredy tried this it gives

    Compilation Error

    Wednesday, April 16, 2014 1:38 PM
  • User697462465 posted

    Hi Baiju EP,

    Please don't post duplicate threads, the your thread have already replied by our engineer, the following is the reply content, please try to refer it:

    Hi Baiju Ep,

    About your problem,please try the code below:

    int a =Convert.ToInt32(Lable1.Text);
    oledbcom.Parameters.Add(New OleDbParameter("@num", OleDbType.Integer)).Value =a ;

    Best Regards,
    Terry Guo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 17, 2014 2:29 AM