Results 1 to 3 of 3

Thread: Saving textbox into DB using ADO

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Malaysia
    Posts
    69
    How come I couldn't assign the field with a textbox?

    eg.
    datADO.Recordset!code = txtCode

    I have to use the CStr(txtCode) in order to save into the code.

    But another problem is, I want to save a list in a combo box into the DB. I tried using CStr and without, it also have the same problem as my early problem without using CStr.

    I tried.
    datADO.Recordset!code = cboCode.List(cboCode.ListIndex)
    and
    datADO.Recordset!code=CStr(cboCode.List(cboCOde.ListIndex)

    Both failed.

    Plz help. Thx.


  2. #2

    Something is wierd

    Something is really wierd. You should be able to do exactly that without using CSTR (even though it's a good idea for documented, explicit code). If you send more bits of code, it might help.
    Senior Systems Architect/Programmer

  3. #3
    Junior Member
    Join Date
    Jun 1999
    Location
    Karachi, Sind, Pakistan
    Posts
    20

    Thumbs up

    Use
    datADO.Recordset!code = cboCode.Text

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width