Skip to content
Advertisement

The Delete code doesnt work after it updates a column

When I send data to the procedure which contains the ResStatus as C it updates the ResMaster’s ResStatus as X After it updates the column, I want to delete a record from 2 tables they are- Folio,ResRoomAllocation.

I have done the coding but it doesn’t work it only updates the ResStatus as X

What’s wrong with my code?I’m new to MSSQL

Advertisement

Answer

I have no idea what other problems you have in the code, but this is simply wrong:

First, “id”s are often stored as numbers, especially when associated with something with a name like “ResNo” (presumably “no” implies number).

But let me assume that ResNo is a string. Your declaration:

declares a string with ONE character. That usually breaks code. You need a length — preferably the correct on. I tend to use 255 when I don’t know the length:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement