Home > Software design >  how to use reserved words in an access database with dapper in VB.NET
how to use reserved words in an access database with dapper in VB.NET

Time:10-17

how to use reserved words in an access database with dapper in VB.NET? I want to use "name" if there is a solution without changing the name in the field in the access database.

Thanks

              Con.Execute($"Update Users Set name = name,email = @email,phone = @phone,password = @password Where id = @id", New With {
                    Key .name = bunifuTextBox1.Text,
                    Key .email = txtEmail.Text,
                    Key .phone = bunifuTextBox2.Text,
                    Key .password = txtPassword.Text,
                    Key .id = id
                })

CodePudding user response:

Use brackets:

Con.Execute($"Update Users Set [name] = @name, email = @email, phone = @phone, [password] = @password Where id = @id", ...
          
  • Related