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. Advertising

  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. Advertising

  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. Advertising

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:
    585
    Guest
    Nov 10, 2003
  2. John

    empty/non-empty element

    John, Jul 15, 2003, in forum: XML
    Replies:
    1
    Views:
    1,025
    Klaus Johannes Rusch
    Jul 16, 2003
  3. Finn Stampe Mikkelsen

    Column count / Access GridView Column after DataBind

    Finn Stampe Mikkelsen, Aug 19, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    3,195
    Finn Stampe Mikkelsen
    Aug 20, 2010
  4. 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:
    198
    Gregory Rampton
    Aug 6, 2003
  5. ela
    Replies:
    7
    Views:
    733
Loading...

Share This Page