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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. About MS Access

About MS Access

Scheduled Pinned Locked Moved Database
questioncsharpdatabasehelp
7 Posts 4 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.
  • H Offline
    H Offline
    Hum Dum
    wrote on last edited by
    #1

    I created a .mdf file of MS-Access which contains some tables. Now i want data from two or more table in single table. So i created queries in .mdf file with in Ms-Access. And querying these from my application. Suppose Details is query name in .mdf file, then from application i am using

    "Select [nName], [nDate] from [Details]"

    . Now i have some question on this: a) If i use above way i.e. (create query on access then use this virtual table in application) It increases file size. here question is- Will this going to slow application. b) If i don't create query and from application with help of joins and sub-queries get data in DataTable object then use this DataTable. But here question is- this DataTable will grow in size by time. this will also create load on application. what if this DataTable be in MB size? So, Is creating Query(virtual-table / view) in .mdf file is good ? Or Directly get data in DataTable object, then use this data ? I am using C#. any help/comment !! :)

    M _ 2 Replies Last reply
    0
    • H Hum Dum

      I created a .mdf file of MS-Access which contains some tables. Now i want data from two or more table in single table. So i created queries in .mdf file with in Ms-Access. And querying these from my application. Suppose Details is query name in .mdf file, then from application i am using

      "Select [nName], [nDate] from [Details]"

      . Now i have some question on this: a) If i use above way i.e. (create query on access then use this virtual table in application) It increases file size. here question is- Will this going to slow application. b) If i don't create query and from application with help of joins and sub-queries get data in DataTable object then use this DataTable. But here question is- this DataTable will grow in size by time. this will also create load on application. what if this DataTable be in MB size? So, Is creating Query(virtual-table / view) in .mdf file is good ? Or Directly get data in DataTable object, then use this data ? I am using C#. any help/comment !! :)

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Hum Dum wrote:

      So, Is creating Query(virtual-table / view) in .mdf file is good ?

      Yes, in a real relational database (SQL Server, Oracle, MySQL etc) this is called a view and has no cost in disk space. This is probably NOT true for Access as Access is a POS, however using queries/views is still the correct way to go. You need to evaluate your use of Access as your datastore and make sure it is valid. If more than one user is to access the data then use SQL Server.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • H Hum Dum

        I created a .mdf file of MS-Access which contains some tables. Now i want data from two or more table in single table. So i created queries in .mdf file with in Ms-Access. And querying these from my application. Suppose Details is query name in .mdf file, then from application i am using

        "Select [nName], [nDate] from [Details]"

        . Now i have some question on this: a) If i use above way i.e. (create query on access then use this virtual table in application) It increases file size. here question is- Will this going to slow application. b) If i don't create query and from application with help of joins and sub-queries get data in DataTable object then use this DataTable. But here question is- this DataTable will grow in size by time. this will also create load on application. what if this DataTable be in MB size? So, Is creating Query(virtual-table / view) in .mdf file is good ? Or Directly get data in DataTable object, then use this data ? I am using C#. any help/comment !! :)

        _ Offline
        _ Offline
        _Damian S_
        wrote on last edited by
        #3

        Hum Dum wrote:

        I created a .mdf file of MS-Access which contains some tables.

        .mdf is the default extension for SQL Server... you sure you didn't use SQL Server? And if you used Access, renaming it .mdf won't make it SQL Server... ;-) Saving a query in Access will not increase the filesize dramatically, it's not like it's making a copy of the actual data tables... Access is going to be fine as a database engine if you have up to 10 users that are located on the same local network, and not using wireless network connections. For database size, Anything up to a couple of hundred meg in Access will still give you reasonable performance (depending on your data structures of course)

        I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

        H 1 Reply Last reply
        0
        • _ _Damian S_

          Hum Dum wrote:

          I created a .mdf file of MS-Access which contains some tables.

          .mdf is the default extension for SQL Server... you sure you didn't use SQL Server? And if you used Access, renaming it .mdf won't make it SQL Server... ;-) Saving a query in Access will not increase the filesize dramatically, it's not like it's making a copy of the actual data tables... Access is going to be fine as a database engine if you have up to 10 users that are located on the same local network, and not using wireless network connections. For database size, Anything up to a couple of hundred meg in Access will still give you reasonable performance (depending on your data structures of course)

          I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

          H Offline
          H Offline
          Hum Dum
          wrote on last edited by
          #4

          _Damian S_ wrote:

          you sure you didn't use SQL Server?

          Yup i am sure on that :), Only here i mistype .mdb to .mdf. I have some more question a) A .mdb file we can store anywhere we want. Like this can we store .mdf(sql server DB file). b) How can i transfer .mdb file to .mdf along data inside. Or more like moving to sql server. Is there any feature in SQL server to import and convert. c)At present i am storing mdb file path in my connection string by OpenFileDialog(built in C#.net). Like this Can i search for .mdf file? and using this file on different pc(LAN network) with my application. In sql server where can we find our DB file( i hadn't explore much on myself) regards

          _ 1 Reply Last reply
          0
          • H Hum Dum

            _Damian S_ wrote:

            you sure you didn't use SQL Server?

            Yup i am sure on that :), Only here i mistype .mdb to .mdf. I have some more question a) A .mdb file we can store anywhere we want. Like this can we store .mdf(sql server DB file). b) How can i transfer .mdb file to .mdf along data inside. Or more like moving to sql server. Is there any feature in SQL server to import and convert. c)At present i am storing mdb file path in my connection string by OpenFileDialog(built in C#.net). Like this Can i search for .mdf file? and using this file on different pc(LAN network) with my application. In sql server where can we find our DB file( i hadn't explore much on myself) regards

            _ Offline
            _ Offline
            _Damian S_
            wrote on last edited by
            #5

            Yes, you can store your mdb file wherever you like. So long as it can be accessed by your front end software (on the same LAN, as I said earlier). Yes, you can transfer Access data to SQL Server. You can either use the "upsizing wizard", or simply create a blank SQL Server database and import from Access. (Note - this doesn't work with SQL Express - but you can create SQL Express tables and link to Access, then use queries to get your data across). Yes, you can do similar for SQL Server. Check out www.connectionstrings.com for comprehensive details on how to connect to SQL Server. I wouldn't worry about letting the user search for the .mdf file though - that's not how it works. They simply connect to the SQL Server and your userid/password/login that is set up handles the rest. In SQL Server, your default location for data files is under MSSQL\Data, and depending on what version you have installed it may be directly under C:\, or in c:\program files etc... have a look around for it. Of course, you could simply open SQL Server and look at the file details of a created database.

            I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

            H 1 Reply Last reply
            0
            • _ _Damian S_

              Yes, you can store your mdb file wherever you like. So long as it can be accessed by your front end software (on the same LAN, as I said earlier). Yes, you can transfer Access data to SQL Server. You can either use the "upsizing wizard", or simply create a blank SQL Server database and import from Access. (Note - this doesn't work with SQL Express - but you can create SQL Express tables and link to Access, then use queries to get your data across). Yes, you can do similar for SQL Server. Check out www.connectionstrings.com for comprehensive details on how to connect to SQL Server. I wouldn't worry about letting the user search for the .mdf file though - that's not how it works. They simply connect to the SQL Server and your userid/password/login that is set up handles the rest. In SQL Server, your default location for data files is under MSSQL\Data, and depending on what version you have installed it may be directly under C:\, or in c:\program files etc... have a look around for it. Of course, you could simply open SQL Server and look at the file details of a created database.

              I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

              H Offline
              H Offline
              Hum Dum
              wrote on last edited by
              #6

              _Damian S_ wrote:

              I wouldn't worry about letting the user search for the .mdf file though - that's not how it works. They simply connect to the SQL Server and your userid/password/login that is set up handles the rest.

              Well for file search i am doing only for first time. If user installing application for first time then it asks for mdb file then i create a text file on local pc, then from next time onward i simply read this file for getting DB file path. Now Can SQL express do the work(As its freeware i hope so :) , SQL server is not). If i install Sql Express on one machine then create DB. After this can i use this DB from LAN ? By providing userid/pass as u said and it handle rest? regards

              T 1 Reply Last reply
              0
              • H Hum Dum

                _Damian S_ wrote:

                I wouldn't worry about letting the user search for the .mdf file though - that's not how it works. They simply connect to the SQL Server and your userid/password/login that is set up handles the rest.

                Well for file search i am doing only for first time. If user installing application for first time then it asks for mdb file then i create a text file on local pc, then from next time onward i simply read this file for getting DB file path. Now Can SQL express do the work(As its freeware i hope so :) , SQL server is not). If i install Sql Express on one machine then create DB. After this can i use this DB from LAN ? By providing userid/pass as u said and it handle rest? regards

                T Offline
                T Offline
                The Man from U N C L E
                wrote on last edited by
                #7

                With SQL all you are doing is providing the Servername and Database name to connect. This is the same no matter where you connect from. Directly connecting to the underlying files is something that is only of use in on-the-fly demos and not to be used for serious applications. SQL Express will work fine for this, though it has some limitations See this Microsoft article for details[^]. The two main issues will be a reduced functionality Management Studio GUI and the 4GB data limit.

                If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

                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