Re: How do I execute a sql-file inside D code

2019-08-26 Thread Anders S via Digitalmars-d-learn
On Tuesday, 20 August 2019 at 13:10:55 UTC, Andre Pany wrote: On Tuesday, 20 August 2019 at 11:33:33 UTC, Anders S wrote: I'm creating an application that connect to a database and write data from another application. Now when I start the application I want it to check if the database exists an

Re: How do I execute a sql-file inside D code

2019-08-26 Thread Anders S via Digitalmars-d-learn
On Thursday, 22 August 2019 at 13:39:00 UTC, XavierAP wrote: 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

Re: How do I execute a sql-file inside D code

2019-08-22 Thread XavierAP via Digitalmars-d-learn
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 imple

Re: How do I execute a sql-file inside D code

2019-08-20 Thread Andre Pany via Digitalmars-d-learn
On Tuesday, 20 August 2019 at 11:33:33 UTC, Anders S wrote: I'm creating an application that connect to a database and write data from another application. Now when I start the application I want it to check if the database exists and if not create the database and it's tables. I have everyth

How do I execute a sql-file inside D code

2019-08-20 Thread Anders S via Digitalmars-d-learn
I'm creating an application that connect to a database and write data from another application. Now when I start the application I want it to check if the database exists and if not create the database and it's tables. I have everything working IF the database and tables exist. Use this code