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. Visual Studio
  4. Create a database with custom extension for vb?

Create a database with custom extension for vb?

Scheduled Pinned Locked Moved Visual Studio
databasevisual-studiohelptutorialquestion
17 Posts 2 Posters 44 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.
  • M Member 13336882

    Hello! I have created a database software in vs 2013! But the problem is, the program loads a database created by ms access, i mean the program loads the database from an (.aacdb) file stored in the program directory! but is there a way to create a custom file type but my vb program will detect it as a databse and user will be able to read and write data in to the database from vb but the database will have a different file extension.For example: userdata.abc instead of userdata.aacdb...So is there a way to do so??

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #2

    Yes[^], you'd have to register the new file-type and the application to open it with on the local system.

    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

    M 2 Replies Last reply
    0
    • L Lost User

      Yes[^], you'd have to register the new file-type and the application to open it with on the local system.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      M Offline
      M Offline
      Member 13336882
      wrote on last edited by
      #3

      But how am i supposed to do that ? Any codes please?

      L 1 Reply Last reply
      0
      • L Lost User

        Yes[^], you'd have to register the new file-type and the application to open it with on the local system.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        M Offline
        M Offline
        Member 13336882
        wrote on last edited by
        #4

        u said if ur code doesn't work, then convert it ! But where is your code ??

        L 1 Reply Last reply
        0
        • M Member 13336882

          But how am i supposed to do that ? Any codes please?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #5

          Member 13336882 wrote:

          But how am i supposed to do that ? Any codes please?

          How it is done is explained in the article I linked to. No code; this is a registry-setting, usually done from an installer, not a running application. If you want to have code, you could "search" this site and get to this[^].

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          1 Reply Last reply
          0
          • M Member 13336882

            u said if ur code doesn't work, then convert it ! But where is your code ??

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #6

            That's a signature :) The reason you're not seeing "my code" is because I did not post any. The site provides answers, not code.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            M 1 Reply Last reply
            0
            • L Lost User

              That's a signature :) The reason you're not seeing "my code" is because I did not post any. The site provides answers, not code.

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              M Offline
              M Offline
              Member 13336882
              wrote on last edited by
              #7

              but how am i supposed yo create the database file with a custom extension?? i mean, if create a db usin access, well then, accesss is the software which creates the (.aacdb) file right?? I mean that a software generates/exports the file right? idd so, which software should i use to make my own file type? u said it's a registry thing! well, i have read a lot of forums saying its a registry thung! ok, i get it! but how can i CREATE THE FILE?? registry cant create it, thn wht should i do????//

              L 1 Reply Last reply
              0
              • M Member 13336882

                but how am i supposed yo create the database file with a custom extension?? i mean, if create a db usin access, well then, accesss is the software which creates the (.aacdb) file right?? I mean that a software generates/exports the file right? idd so, which software should i use to make my own file type? u said it's a registry thing! well, i have read a lot of forums saying its a registry thung! ok, i get it! but how can i CREATE THE FILE?? registry cant create it, thn wht should i do????//

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #8

                Try renaming the file and its extension. The executable used to open the file is determined by the file-extension, which is simply part of the name.

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                M 1 Reply Last reply
                0
                • L Lost User

                  Try renaming the file and its extension. The executable used to open the file is determined by the file-extension, which is simply part of the name.

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                  M Offline
                  M Offline
                  Member 13336882
                  wrote on last edited by
                  #9

                  But wait!! oke, if u try your method, i may get a new file, but will vb open it? because lemme remind u, i am making a database software.Well, when you create a db software in vb, u need to add an existing database using the DATASET CONTROL, which can only open (.aacdb) or other file types that are associated to database, so if i create a new file type using ur method, vb will not even be able too open it! EVEN IF U DONT USE THE DATASET CONTROL TO IMPORT AN EXISTING DATABASE, VB WILL CREATE A BLANK DB ITSELF WITH A FILE EXTENSION OF (.mdf)! well, it is back where it started?!!!!!

                  L 1 Reply Last reply
                  0
                  • M Member 13336882

                    But wait!! oke, if u try your method, i may get a new file, but will vb open it? because lemme remind u, i am making a database software.Well, when you create a db software in vb, u need to add an existing database using the DATASET CONTROL, which can only open (.aacdb) or other file types that are associated to database, so if i create a new file type using ur method, vb will not even be able too open it! EVEN IF U DONT USE THE DATASET CONTROL TO IMPORT AN EXISTING DATABASE, VB WILL CREATE A BLANK DB ITSELF WITH A FILE EXTENSION OF (.mdf)! well, it is back where it started?!!!!!

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #10

                    Member 13336882 wrote:

                    when you create a db software in vb, u need to add an existing database using the DATASET CONTROL, which can only open (.aacdb) or other file types that are associated to database

                    The application "Access" cannot open Word-files, since it would not recognize the layout. An access-file that is saved with the file-extension "test" would still be openable by Access. It would just not open automatically using the correct application if it is not registered.

                    Member 13336882 wrote:

                    EVEN IF U DONT USE THE DATASET CONTROL TO IMPORT AN EXISTING DATABASE, VB WILL CREATE A BLANK DB ITSELF WITH A FILE EXTENSION OF (.mdf)! well, it is back where it started?!!!!!

                    ..so? The wizard in VB is expecting that extension. If you want another then simple create a file with a different name.

                    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                    M 1 Reply Last reply
                    0
                    • L Lost User

                      Member 13336882 wrote:

                      when you create a db software in vb, u need to add an existing database using the DATASET CONTROL, which can only open (.aacdb) or other file types that are associated to database

                      The application "Access" cannot open Word-files, since it would not recognize the layout. An access-file that is saved with the file-extension "test" would still be openable by Access. It would just not open automatically using the correct application if it is not registered.

                      Member 13336882 wrote:

                      EVEN IF U DONT USE THE DATASET CONTROL TO IMPORT AN EXISTING DATABASE, VB WILL CREATE A BLANK DB ITSELF WITH A FILE EXTENSION OF (.mdf)! well, it is back where it started?!!!!!

                      ..so? The wizard in VB is expecting that extension. If you want another then simple create a file with a different name.

                      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                      M Offline
                      M Offline
                      Member 13336882
                      wrote on last edited by
                      #11

                      can u please elaborate??

                      L 1 Reply Last reply
                      0
                      • M Member 13336882

                        can u please elaborate??

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #12

                        On which part? The "accdb" and "mdf" file types are only registered on machines that have Access installed (a simplification); but it still is an Access database regardless of whether Access is installed or not. It will remain an Access database if you change its file-extension.

                        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                        M 1 Reply Last reply
                        0
                        • M Member 13336882

                          Hello! I have created a database software in vs 2013! But the problem is, the program loads a database created by ms access, i mean the program loads the database from an (.aacdb) file stored in the program directory! but is there a way to create a custom file type but my vb program will detect it as a databse and user will be able to read and write data in to the database from vb but the database will have a different file extension.For example: userdata.abc instead of userdata.aacdb...So is there a way to do so??

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #13

                          Yes, it's easy. You just have to write all the database handling code in your application. So if you have a few years' of free time ...

                          M 1 Reply Last reply
                          0
                          • L Lost User

                            Yes, it's easy. You just have to write all the database handling code in your application. So if you have a few years' of free time ...

                            M Offline
                            M Offline
                            Member 13336882
                            wrote on last edited by
                            #14

                            what are da codes thn? at least any link to an article??

                            L 1 Reply Last reply
                            0
                            • L Lost User

                              On which part? The "accdb" and "mdf" file types are only registered on machines that have Access installed (a simplification); but it still is an Access database regardless of whether Access is installed or not. It will remain an Access database if you change its file-extension.

                              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                              M Offline
                              M Offline
                              Member 13336882
                              wrote on last edited by
                              #15

                              okeee....finally i get it!! But, when i am done changing the file type, how wiuld i add it in vb using DATASET control??

                              L 1 Reply Last reply
                              0
                              • M Member 13336882

                                what are da codes thn? at least any link to an article??

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #16

                                Like I said, you have to write the codes. Google will find you lots of articles on database design, you have to convert that into real programming.

                                1 Reply Last reply
                                0
                                • M Member 13336882

                                  okeee....finally i get it!! But, when i am done changing the file type, how wiuld i add it in vb using DATASET control??

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #17

                                  The same way you use a regular database-file; it still is one after all, and the wizards and tools won't care about the name. Most of us would probably not use the wizard and load the data from code. That way one has a bit more control over what is happening. Basically, you make a connection, issue a command, and retrieve the results thereof.

                                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                                  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