DB PrepUpdate Queries?

I’m getting this error: “The conversion from UNKNOWN to UNKNOWN is unsupported.”
The documentation for SRConnection “runPrepUpdate” says the parameters are:

  1. java.lang.String query
  2. java.lang.Object… args

What is args expecting?

Assuming MSSQL driver, why does this error?

SRConnection connection = this.connection();
String query = "INSERT INTO [table] (col1, col2) VALUES (?, ?), (?, ?), (?, ?)";
List<Object> args = new ArrayList<>() {{
           add("A");
           add(LocalDateTime.now());
           add(null);
           add(LocalDateTime.now());
           add("C");
           add(null);
}};
connection.runPrepUpdate(query, args); //errors here....

I figured this method is similar to system.db.runPrepUdate, right?

This is varargs syntax and you’re passing it a List instead. Try an array if you can’t actually expand the arguments.

Thank you! That did it.

connection.runPrepUpdate(query, args.toArray());