CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: ADO help!!!

  1. #1
    Join Date
    Nov 2001
    Posts
    46

    ADO help!!!

    1. How can i create a database programatically using ado?

    2. How can i determine the no of tables in a database programatically?

    3.How can i determine the no of sheets present in a excel sheet programatically?

    Expecting positive and quick reply
    regards
    anish


  2. #2
    Join Date
    Apr 2001
    Location
    Turkmenistan
    Posts
    674

    Re: ADO help!!!

    Hi there! I think you'd better have a look at MSDN library help for more detail information, however, the outline of using ADO object from your code as follows:

    1) firstly create an ADO object;
    2) then using EXECUTE method execute sql query against a database that creates a db.

    Best regards,
    Bayram.


  3. #3
    Join Date
    Nov 2001
    Posts
    46

    Re: ADO help!!!

    But how do i create a database (an access 2000 database) programatically??


  4. #4
    Join Date
    Apr 2001
    Location
    Turkmenistan
    Posts
    674

    Re: ADO help!!!

    for example:
    CREATE DATABASE 'C:\myFolder\myDatabase'

    Bayram.


  5. #5
    Join Date
    Nov 2001
    Posts
    46

    Re: ADO help!!!

    but how could i create a connection string for the connection object

    plz do give me some code



  6. #6
    Join Date
    Apr 2001
    Location
    Turkmenistan
    Posts
    674

    Re: ADO help!!!

    a connection string should look like:
    "Provider=MSDASQL;Driver=Microsoft dBase Driver (*.dbf);SERVER=myServer; UID=myUser;PWD=myPwd;Database=myDatabase; DEFAULTDIR=C:\\myFolder"

    Bayram.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured