I have a bit of a trouble, writing a query string, to update a specific sql record. I have all my respective values stores in strings, and whebn i add them (values as parameters), it will convert the primary id to an int. So far, so good.
The problem lies in my query string it self. I can do deleting and creation of sql records (select and insert) yet the problem here, lies in updating. That i have no real experience in.
Now... For the query string that i have all ready...
SqlCommand DerGemmesMedarbejder = new SqlCommand("UPDATE MyTableInQuestion VALUES (@Tittel, @FuldeNavn, @MailAdresse, @TelefonNummer, @MedarbejderType) WHERE PersonaleID = @PersonaleID_FraRepeateren", GemDetAendredeIndhold);
I just can not seem to get it right. The debugger is telling me that the problem is "incorrect syntax near jeyword 'VALUES'