1

I've been trying to create a program that creates a database, creates tables, stores information in these tables, and reads off these tables. I am using delphi and microsoft access (although I am open to using another database program if one is easier to learn). Anyway, I cam across this question and answer: Delphi 7: ADO, need basic coding example

However I am confused about what my connection string would be or how to know what is is. I want the database saved in the same file area as where my program is so would it just be the file directory to that area such as:

FILE NAME=E:\project\Debug\Win32\Studentdb.accdb

Also the user uses +database. If my database name is Studentdb would I just put 'Brill1' in that space or not?

Also do I need to use ODBC connector if I am not using MYSQL? I am guessing not but do I need to use something else. Also, while saving files from microsoft access they save as .accdb however when I created a ADOConnection component on my form and pressed into the connection string property it was asking for a .udl and I haven't run across this anywhere before so I am wondering if I need to convert or do something with that.

I am a real beginner with this so I am sorry if my questions are obvious but I would really appreciate some help or pointed to a beginner's friendly resource on the subject. Thank you.

Jessie
  • 13
  • 3

1 Answers1

0

All possible connection strings from Access 2007 are here:

https://www.connectionstrings.com/access-2007/

...which one to choose depends on which driver you have and/or want to use.

(ACE, OLE, ODBC ...)

ashleedawg
  • 20,365
  • 9
  • 72
  • 105
  • How do I know which one I have (or because I haven't downloaded anything I don't have any of them) and which one would you recommend? I am only doing quite simple stuff so would one be better or are all fine/not disimilar? If I used ODBC can I just follow the tutorial I linked? – Jessie Feb 25 '18 at 15:01
  • Until you are more familiar with working with Access databases using Delphi and ADO, you would do better to set up an ODBC System DSN for your database. The reason is that ODBC set-up utility includes facilities to test a connection without having to write a Delphi + ADO app just to do that. – MartynA Feb 25 '18 at 17:41