我的代码正常工作,但是数据库中的数据未更新。我正在使用MySQL数据库,请在附件中找到我的代码。如果有其他需要,请帮助我。 情况5:
Scanner sc1 = new Scanner(System.in);
System.out.println("Enter roll no You Want to update");
int rollno = sc1.nextInt();
System.out.println("Enter Student update Name: ");
String name = sc1.next();
System.out.println("Enter Student update Address: ");
String address = sc1.next();
updateStudent(name,rollno,address);
break;
答案 0 :(得分:2)
您在准备好的语句中的索引有问题。
rollno必须是索引3
public async Task<SetParams> GetParams(CreateRequest request)
{
var user = await _userRepository.GetUserByLogin(request.Login);
var client = await _clientRepository.GetClientByCode( request.ClientCode);
// many other getters here
return new SetParams
{
IdUser = user.IdUser,
ClientName = client.Name,
// and so forth...
};
}