On Tuesday, 20 August 2019 at 11:33:33 UTC, Anders S wrote:
Use this code to check
conn.exec("CREATE DATABASE IF NOT EXISTS boxweb;");
however haven't found a way to run the sql file that create the
tables. The file is in the source folder
I understand you're using some API to some SQL implementation
which allows you to run SQL commands from strings, but not from
files which is what you want?
Just read the file into a string with the D std lib:
import std:file;
conn.exec( readText(fileName) );
https://dlang.org/phobos/std_file.html#.readText