First of all, I didn't write this question except after hammering the entire section and the Internet in general for days looking for the right answer, but unfortunately, some answers are too old some are not complete etc.
I saw the chapters in About.com Delphi section but it requires ADOX 2.x dll which is not in my system. I have msadox.dll (ver 6) and I tried to import it but Delphi XE2 seems not to recognize the file. So I decided to go with the old-fashioned way.
Anyway, the program that will create a table after clicking a button. Everything is set up perfectly except the query sentence that will be sent to the database.
Here is the code:
procedure TAddIndivdualForm.OkClick(Sender: TObject);
Name := NameEdit.Text;
QString:= 'CREATE TABLE ' + Name + ' (ProcessCaleneder DateTime, IndivName text(30),
Position text(30), Mobile text(20), Salary Currency, Notes text(255))';
with MainForm.IndivdualsQuery do
The result after clicking the button is: Syntax error in field definition. (because of the query)
the SQL.Add parameters were those of QString variable. But I took the string out, chopped it up a little and added string variables in between. String concatenation could be a huge mess sometimes in my personal opinion.
I tried to find the MS-Access queries reference on the net but I couldn't. I want to know how the sql queries were formed ?
So, to keep the post organized, here are my questions:
1. If you can correct the query sentence, I appreciate that.
2. Where do I find the queries reference ?
3. How do I make the XE2 IDE recognize ADOX 6.0 ?
4. The jet engine used in my example is ver 4.0 and .mdb, how do I make the IDE recognize access 2010 files ? will this enforce the other users of my app to install the distribution package ?
I appreciate your help even if you answer a portion of the questions.