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. General Programming
  3. C#
  4. How to Create a new Access database using C#?

How to Create a new Access database using C#?

Scheduled Pinned Locked Moved C#
csharpdatabasetutorialquestion
3 Posts 3 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.
  • X Offline
    X Offline
    Xytme
    wrote on last edited by
    #1

    How to Create a new Access database using C#? i want create a new access database.i don't kown how to write the SQL expression. and i want to kown is there other way to create a new database not use SQL language.beacause i kown there is ADOX in ado2.5 and it can create database.but i can't find anything can create database in ado.net. thanks.

    K M 2 Replies Last reply
    0
    • X Xytme

      How to Create a new Access database using C#? i want create a new access database.i don't kown how to write the SQL expression. and i want to kown is there other way to create a new database not use SQL language.beacause i kown there is ADOX in ado2.5 and it can create database.but i can't find anything can create database in ado.net. thanks.

      K Offline
      K Offline
      Kastro
      wrote on last edited by
      #2

      I'm interested in knowing too. The only other technique I know, and have used before, is to embed a blank database into the assembly and write it out to file using a binary stream whenever a new database is needed. I know, its ugly and bad, but it works. Though if you want to be able to create for different Access versions you'd need to embed each one, which is even more ugly and bad. Also, you can use Interop to access ADOX from C#.

      1 Reply Last reply
      0
      • X Xytme

        How to Create a new Access database using C#? i want create a new access database.i don't kown how to write the SQL expression. and i want to kown is there other way to create a new database not use SQL language.beacause i kown there is ADOX in ado2.5 and it can create database.but i can't find anything can create database in ado.net. thanks.

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        I think you have to send SQL statement to Access. (CREATE DATABASE) You can do it in this way with ado.net. Mazy No sig. available now.

        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