Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Create a database from a DataSet

Create a database from a DataSet

Scheduled Pinned Locked Moved Database
databasesql-serversysadminxmlquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goldoche
    wrote on last edited by
    #1

    Hi, I'm programming an application using a typed DataSet and a Sql database. I was wondering if there was a way of programmatically creating a database on the server based on the DataSet. What I want to do is during the software installation, the user enters the connection parameters of their Sql server and then the installation program automatically creates the schema/database the software needs on their database server. I thought the simplest way would be to create it from the DataSet. Is there any better way? Thnaks a lot!

    D 1 Reply Last reply
    0
    • G goldoche

      Hi, I'm programming an application using a typed DataSet and a Sql database. I was wondering if there was a way of programmatically creating a database on the server based on the DataSet. What I want to do is during the software installation, the user enters the connection parameters of their Sql server and then the installation program automatically creates the schema/database the software needs on their database server. I thought the simplest way would be to create it from the DataSet. Is there any better way? Thnaks a lot!

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You can't do it from a DataSet. The only way you can do this is one of two ways. One, execute an SQL Script to create the database, setup tables and permissions, and any custom functions, stored procedures, initial data, ... Two, execute the same script commands from a custom action in your installer.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups