Re: Creating mdb file!
From: Viatcheslav V. Vassiliev (support_at_oledbdirect.com)
Date: 12/11/03
- Previous message: Mónica García Ruiz: "DateTime"
- In reply to: mhb: "Re: Creating mdb file!"
- Next in thread: Adnan Hebibovic: "Re: Creating mdb file!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 11 Dec 2003 22:19:37 +0300
This code does not need ADOX type library and Free method should not be
there - variant will release interface when going out of scope.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"mhb" <mhb_shrf@hotmail.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:3fd88202@newsgroups.borland.com...
> Hi,
>
> From the Project->Import Type Library->Microsoft ADO Ext. and rename
TTable
> to TADOXTable, etc..
> and use this code to create the databse:
>
> procedure TForm1.CreateDatabase(dbname: string);
> var
> db: variant;
> begin
> dbname := 'c:\test.mdb';
> db := CreateOleObject('ADOX.Catalog');
> try
> db.Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + dbname +
> ';Persist Security Info=False');
> finally
> db.Free;
> end;
> end;
>
> Regards
>
> "Atmapuri" <janez.makovsek@usa.net> wrote in message
> news:3fd87c32$1@newsgroups.borland.com...
> > Hi!
> >
> > Is it possible to create the mdb file when the application first starts
> > and then use SQL commands to create all the neccessary tables?
> > All using ADO components. It seems that creating tables can be done,
> > but I cant figure out if there is any way to also created the database
> > itself.
> >
> > Thanks!
> > Atmapuri.
> >
> >
>
>
- Previous message: Mónica García Ruiz: "DateTime"
- In reply to: mhb: "Re: Creating mdb file!"
- Next in thread: Adnan Hebibovic: "Re: Creating mdb file!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|