gpt4 book ai didi

java - SQLJet 表插入参数

转载 作者:行者123 更新时间:2023-12-01 15:14:52 25 4
gpt4 key购买 nike

我想我在 SQLJet 数据库中插入记录时遇到了一个奇怪的错误。我打开数据库连接并使用以下代码插入测试记录。

ISqlJetTable tbl = db.getTable("file");
tbl.insert("filename");

Eclipse 显示了一个带有信息消息的红色图标

The method insert(Object[]) in the type ISqlJetTable is not applicable for the arguments (String).

出了什么问题?如果我没记错的话,在我的 Mac 上我不会收到此错误消息。抱歉,我目前无法访问我的 Mac。如何解决这个问题? tutorial使用同样的方式。问候

最佳答案

The method insert(Object[]) in the type ISqlJetTable is not applicable for the arguments (String).

您需要传递 String[]/Object[] 而不仅仅是 String。根据插入方法的文档语法为 insert(Object[] arr)

关于java - SQLJet 表插入参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11766043/

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