Update command using Npgsql postgres and C#

前端 未结 1 1472
野趣味
野趣味 2021-01-19 03:58

I have created a search form to locate a record based on a search value called license ID. I am able to pull the all the fields for that value. My question is I am trying to

相关标签:
1条回答
  • 2021-01-19 04:37

    You only need "set" once per command.

    NpgsqlCommand cmd = new NpgsqlCommand("update info set \"Fname\" = :FirstName, \"Lname\" = :LastName, \"Address\" = :Address," +
                    "\"City\" = :City, \"State\" = State, \"Zip\" = :Zip," + 
                    "\"PhoneNumber\" = :PhoneNumber where \"LicenceNumber\" = '" + LicenseID + "' ;", conn);
    
    0 讨论(0)
提交回复
热议问题