gpt4 book ai didi

java - UCanAccess 读取表的最后一列作为第一列

转载 作者:行者123 更新时间:2023-11-30 08:08:26 25 4
gpt4 key购买 nike

<分区>

我的程序总是将 Access 数据库中的第一列读取为第二列,将第二列读取为第三列,依此类推,但最后一列读取为第一列。

public void actionPerformed(ActionEvent e) {
try{
String query = "insert into Staff values ('2', 'w', 'w', 'w', 'e', 'w', 'd','d','end')";
stmt.executeUpdate(query);
status.setText("1 row of record have been inserted");
}catch(Exception ex){
ex.printStackTrace();
}
}

但是当我指定列名时,它读取正常

public void actionPerformed(ActionEvent e) {
try{
String query = "insert into Staff (id, lastName, firstName, mi, address, city, state, telephone, email) "
+ "values ('2', 'w', 'w', 'w', 'e', 'w', 'd','d','end')";
stmt.executeUpdate(query);
status.setText("1 row of record have been inserted");
}catch(Exception ex){
ex.printStackTrace();
}
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com