Unsupported File Driver Function (80) trying to save a SQLite file

When trying to save a SQLite file, the app generates a error. The dialog says “Record was not updated,” and the message says that, “An error (Unsupported File Driver Function (80) was experienced when making changes to the xxx file.”

First time using the SQLite files and have no clue what this means/what I should be checking.

Any help appreciated.

a little more information would help.

Turn on Trace.exe and upload the debug log

That can be a symptom of the buffer used by POSITION() being too small.
In the ABC chain in C12 this was recently increased from 1024 to 2048.

If you look at

It can tell you what to change. Or you could look at altering your key sizes, assuming that this is in fact the problem

As Kevin said more details.

Like does “save a SQLite file” mean are you in a Browse that opened a record in a Form and you pushed OK button? Post your FILE declaration. Did your Create the file using SQL code or did you let a Clarion CREATE() do it.

IMO the SQLite driver is generally poor in typical App use, like it feels unfinished.

There’s a Clarion Live where we remade the Invoice example using SQLite. I tried creating a duplicate key and the error returned by the driver was not the right one, it was some nonsense.

AI came back with this…

The error “Unsupported File Driver Function (80)” is a Clarion development environment error code indicating that the file driver has detected a data structure or file access statement that it cannot process. When attempting to save an SQLite database table in Clarion, this specifically happens because the SQLite file driver encounters a schema mismatch—most commonly a column set as an identity/auto-increment but configured as a string data type, or an unmapped primary key configuration. [1]

Why This Happens

  • String Auto-Increments: You have checked IsIdentity or AutoIncrement on a column that is mapped to a string data type (CSTRING, STRING) instead of a valid integer type (LONG).
  • Missing or Mismatched PK: The SQLite backend table requires an integer primary key for auto-increment functionality, but your Clarion dictionary (.DCT) does not match the underlying database constraints.
  • Unsupported Statements: The template code is trying to issue a backend statement format that the SQLite driver doesn’t support. [1, 2, 3]

How to Fix It

  1. Check Column Identity Settings

Review your Clarion data dictionary (.DCT) for the SQLite table:

  • Ensure that any column marked as an Identity Column or Auto-Increment is explicitly a LONG (or matching 4-byte/8-byte integer) data type.
  • If a text/string column needs a unique identifier, uncheck the IsIdentity attribute and handle the string generation manually in your code.
  1. Match the SQLite Native Schema

SQLite naturally handles auto-increment using a specific column syntax. Ensure your underlying table was created natively as:

sql

CREATE TABLE table_name (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    ...
);

Use code with caution.

In Clarion, map this id field exactly as a LONG with the auto-increment property enabled.

  1. Verify Driver String Configurations

If you are passing options through the driver string option parameter (in the table properties), verify your syntax. Passing unparsed or poorly formatted parameters can trigger an Error 80 statement failure. [1]

The short answer is that not all drivers support all file driver commands. For example the DOS driver doesn’t support KEY commands and so on.

The commands supported by the shipping SQL drivers are also limited (and covered in the docs). If you call an unsupported function, you get this error.

Of course it’s also possible to be getting the wrong error - the Sqlite driver has its share of bugs.

The better option these days is to use the SQLite2 driver. It’s free on github or cheap if you want the examples, template etc.
https://capesoft.com/accessories/filedriverkitsp.htm

This has fewer bugs, is faster, more secure and supports far more of the file driver commands (not to mention adding more commands.) Frankly, if you’re going to use SQLite is a no-brainer.

SQLite2 is an “actual file driver” so all existing code just works.

My guess is that you have not declared a primary key for the file/table. You have asked the driver to update the row it has and it wants to create an update statement like this:

update yourfile set =
where yourfile_ID =

but since you have not declared a primary key, it can’t.

Thanks for all the suggestions and information…I’ll let you know when I solve the issue.

I started getting other error codes that didn’t make sense…I deleted the procedure and re-coded it. Now everything is good???

Could not find what I had wrong in the original procedure.

Thank you for all the support on trying to fix this.