Hi any one help me

  • when we update detetime column with string value in c# which is given

    update Add_Flight set Date_of_Travel='"+Label3.Text+"'

    then error given as

    doesnot match datatype

    any one help me

  • The most likely for that is Label3.Text has a value that is not a DateTime value.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Step 1, parameterise that query

    Step 2, read up on the .NET parameters collection and use it.

    Step 3, read up on all the horrors of SQL injection attacks that you've now removed the risk of by doing 1 and 2.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • SQL Injection

    It's not a good thing. You are absolutely making it possible with that code. Please stop and tell all your friends.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Kind of necessary to share :hehe:

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • 1)Check datatype of text

    2)Remove quotes("")

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply