0

I am doing my A Level coding project in Visual Basic and the AQA requirements are that you should use an SQL database. I have looked online and have successfully setup SQLStudio in VB with no problems. It is a fantastic piece of software. However I am wondering whether using the third party software could somehow limit how capable the examiners see me as (since I am cutting out alot of work by using SQLS).

I am not using Excel in my project, I am going to build a modelling program that runs through Thomas Schelling's segregation model - and needs to save user settings and data.

Is there a way to use SQLite in VBA without using the third party software, and saving the db file locally - not on a MSQL or such server (since I don't have one).

Joe Moore
  • 1,229
  • 2
  • 4
  • 21
  • What is SQLStudio? Googling for it returns no relevant results. SQLite is afifle-based embedded database anyway, you only need the correct driver. The driver you need depends on your language though and VB isn't VBA. VBA can only work with OLEDB drivers. It can also use ODBC drivers through an OLEDB-to-ODBC bridge. VB.NET works with ADO.NET drivers. VB6 isn't used at all except for some very rare legacy applications. You'd still need OLEDB drivers for it – Panagiotis Kanavos Jan 18 '21 at 10:26
  • Does this answer your question? [Accessing a SQLite Database in VBA in Excel](https://stackoverflow.com/questions/42509154/accessing-a-sqlite-database-in-vba-in-excel) – Panagiotis Kanavos Jan 18 '21 at 10:28
  • SQLStudio is a piece of software here (https://sqlitestudio.pl/) that helps with using SQL dbs in VBA. I need to find a way of doing what SQL studio does (without the software) using a plugin that allows me to connect to a local SQL db - or something similar – Joe Moore Jan 18 '21 at 10:33
  • 1
    That's SQLiteStudio, not SQLStudio. SQLite Studio is an application that allows you to manage SQLite databases the same way you would server-based databases. Just like any other application, it uses a driver as well. You don't need it to connect to open SQLite databases, you need the correct driver. – Panagiotis Kanavos Jan 18 '21 at 10:41
  • Did you read the duplicate question? It answers the exact same question you have – Panagiotis Kanavos Jan 18 '21 at 10:41
  • 1
    Why not use Access? It is an SQL database. You can write your project in ms access directly (which is the simplest way), or use excel vba (if you prefer) – Super Symmetry Jan 18 '21 at 10:49
  • @PanagiotisKanavos ahhh, sorry I saw Excel and discarded it as the same – Joe Moore Jan 18 '21 at 10:54
  • @SuperSymmetry I cannt use Access, although I want to, the A level requirements would force me to use a more strung out structure of project, meaning I would have to use vb coding with a SQL database – Joe Moore Jan 18 '21 at 10:55
  • 1
    @Proto VBA is a language only used for Office macros, especially Excel. If you have VBA questions, 99% of the answers will be for Excel. No other application uses VBA – Panagiotis Kanavos Jan 18 '21 at 10:56
  • @PanagiotisKanavos Ahh, thats interesting - we have use it with Excel at school however I didnt realise it was used mainly with that. Thank you – Joe Moore Jan 18 '21 at 10:58
  • 1
    The point I was making is that your local database file may be an access file: I wasn't suggesting for you to use its graphical user interface to build and manage your database. Using VB or VBA you can create an access database and then create and manipulate tables using SQL statements from within your VB/VBA code. – Super Symmetry Jan 18 '21 at 11:03
  • 1
    @SuperSymmetry thank you very much, this is what I was looking for – Joe Moore Jan 18 '21 at 11:04

0 Answers0