#tauri-plugin-sql Can't get it working.
7 messages · Page 1 of 1 (latest)
Please share the output of tauri info.
I wasn't able to replicate this on my end with the same code.
try call database like this
`"use client";
import Database from "tauri-plugin-sql-api";
class DB {
constructor() {
this.db = null;
this.connect();
}
connect = async () => {
try {
const db = await Database.load("sqlite:app.db");
this.db = db;
} catch (error) {
console.log("Error connecting to the database:", error);
}
};
}
let dbInstance = null;
export const getDBInstance = () => {
if (!dbInstance) {
dbInstance = new DB();
}
return dbInstance;
};`
Maybe the MSVC line?
I'll give this a try later today, thank you
It's strange you could build the app at all without the VS Build Tools installed.