Re: Creating mdb file!

From: Viatcheslav V. Vassiliev (support_at_oledbdirect.com)
Date: 12/11/03

  • Next message: S.B.Chrisstensen: "MS SQL Server ADO datatype error"
    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.
    > >
    > >
    >
    >


  • Next message: S.B.Chrisstensen: "MS SQL Server ADO datatype error"

    Relevant Pages

    • Re: [STAThread]
      ... Java failed on the Windows client. ... SQL Server and many more expsose ... The unmanaged hosting interface ... 'Apartment' threaded COM objects have STA thread affinity, ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Tabs, Comboxes and ADO.Net Problems
      ... Thank You Bart. ... I was hoping SQL Server might solve problem 1. ... The ADO.Net interface that addresses this ... The problem is that sometimes and only sometimes the dll won't ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: @@Identity
      ... How Does SQL Server Manage Identity Values? ... When you add a row to a table with an Identity column you don't include a ... A scope is a module -- a stored procedure, trigger, function, or ... > If you are inserting a row with your ADO.Net code that will increment the ...
      (microsoft.public.dotnet.framework.adonet)
    • Application Generator For SQL Server and Challenge
      ... The generator does the rest. ... next MS SQL Server application, for you, in only one forth the amount of the ... interface is a familiar modern metaphor with a navigation tree on top or at ... interface remembers customizations to each data entry screen. ...
      (borland.public.delphi.thirdpartytools.general)
    • Looking for ASP.NET/SQL Server 2000 App Security Recommendations
      ... I am working on an active directory user management app with an ASP.NET ... User account requests are stored in a SQL Server 2000 store, ... connection between the ASP.NET interface and the data store. ... We have the SQL Server set up as mixed mode security. ...
      (microsoft.public.dotnet.framework.aspnet.security)