Board index » delphi » Create a new MDB or a Table with ADO ?

Create a new MDB or a Table with ADO ?

Hi,

I have a few questions:

1. How can i make a new MDB file with ADO ?
2. How can i make or delete a Table with ADO ?

Maybe someone can help me.

Thanks
Baldemaier Florian

 

Re:Create a new MDB or a Table with ADO ?


Baldemaier Florian,

The answer to question 2 using ado is simple

with TADOQuery.Create(Self) do
 begin
 Try
    Connection := YourConnection
    SQL.ADD('Drop Table TheTableToDrop') //this is the key
    ExecSQL;
  Finally
    Free;
  end;
end;

The answer to 1 needs ADOX, an activex thingy and its also quite
straight forward, go to

http://www.geocities.com/SiliconValley/Lakes/1636/ADOX1.htm
there is a detailed description there on how to do it.
I was there last October, if the site is down let me know and I would
try and describe the whole process.

In article <39217a1f@dnews>, Baldemaier Florian
<Florian.Baldema...@Chello.at> writes

Quote
>Hi,

>I have a few questions:

>1. How can i make a new MDB file with ADO ?
>2. How can i make or delete a Table with ADO ?

>Maybe someone can help me.

>Thanks
>Baldemaier Florian

--
Arnold Johnson

Other Threads