How to update a column in Access to empty???

Discussion in 'ASP General' started by D, Oct 2, 2004.

  1. D

    D Guest

    Guys, i had try to update the "Date" value in my access to empty string.
    The data type for the column value is Date/Time. I use the following
    simple code:

    rsForum ("Date") = ""

    It give me error when i try to run the asp and do an update. the error
    is

    Error Type:
    Provider (0x80020005)
    Type mismatch.

    I think because the datatype is Date/Time and not text so I cant like
    that straightaway update it as empty strong. HOW CAN I DO IT???
    cheers

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    D, Oct 2, 2004
    #1
    1. Advertisements

  2. You can not update a non-string field to a string value (even empty).
    However, you can set it to Null

    rsForum ("Date") = Null

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    <D> wrote in message news:...
    > Guys, i had try to update the "Date" value in my access to empty string.
    > The data type for the column value is Date/Time. I use the following
    > simple code:
    >
    > rsForum ("Date") = ""
    >
    > It give me error when i try to run the asp and do an update. the error
    > is
    >
    > Error Type:
    > Provider (0x80020005)
    > Type mismatch.
    >
    > I think because the datatype is Date/Time and not text so I cant like
    > that straightaway update it as empty strong. HOW CAN I DO IT???
    > cheers
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Manohar Kamath, Oct 2, 2004
    #2
    1. Advertisements

  3. D

    D Guest

    Thanks. that is the keyword which can help me :)

    cheers

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    D, Oct 2, 2004
    #3
  4. D

    John Guest

    =Null or VbNull (in VB)

    <D> schreef in bericht news:...
    > Guys, i had try to update the "Date" value in my access to empty string.
    > The data type for the column value is Date/Time. I use the following
    > simple code:
    >
    > rsForum ("Date") = ""
    >
    > It give me error when i try to run the asp and do an update. the error
    > is
    >
    > Error Type:
    > Provider (0x80020005)
    > Type mismatch.
    >
    > I think because the datatype is Date/Time and not text so I cant like
    > that straightaway update it as empty strong. HOW CAN I DO IT???
    > cheers
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    John, Oct 2, 2004
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    758
    Guest
    Nov 10, 2003
  2. John

    empty/non-empty element

    John, Jul 15, 2003, in forum: XML
    Replies:
    1
    Views:
    1,328
    Klaus Johannes Rusch
    Jul 16, 2003
  3. Lukas
    Replies:
    3
    Views:
    1,078
    spiff
    Nov 10, 2005
  4. Marcia Hon

    Check if a directory is empty and empty it

    Marcia Hon, Feb 8, 2004, in forum: C Programming
    Replies:
    8
    Views:
    914
    Dave Thompson
    Feb 14, 2004
  5. Brian Roberts

    empty lists vs empty generators

    Brian Roberts, May 3, 2005, in forum: Python
    Replies:
    12
    Views:
    921
    Jeremy Bowers
    May 4, 2005
  6. Finn Stampe Mikkelsen

    Column count / Access GridView Column after DataBind

    Finn Stampe Mikkelsen, Aug 19, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    3,659
    Finn Stampe Mikkelsen
    Aug 20, 2010
  7. Gregory Rampton

    Convert an MS Access Yes/No column to a checkbox column in C# datagrid

    Gregory Rampton, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    439
    Gregory Rampton
    Aug 6, 2003
  8. ela
    Replies:
    7
    Views:
    1,097
Loading...