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. General Programming
  3. C#
  4. how to get create query of msaccess table through c#

how to get create query of msaccess table through c#

Scheduled Pinned Locked Moved C#
databasecsharptutorialquestion
10 Posts 4 Posters 2 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.
  • J Offline
    J Offline
    joerozario
    wrote on last edited by
    #1

    I have the database already with the tables.I want the create query of each table. Is it possible to get the query through c#.or is it possible in msaccess?

    S 1 Reply Last reply
    0
    • J joerozario

      I have the database already with the tables.I want the create query of each table. Is it possible to get the query through c#.or is it possible in msaccess?

      S Offline
      S Offline
      sujithkumarsl
      wrote on last edited by
      #2

      HI, You can use Msaccess for generating query go to Queries->Create query by using wizard You can select the desirable tables for the queries

      My small attempt...

      J 1 Reply Last reply
      0
      • S sujithkumarsl

        HI, You can use Msaccess for generating query go to Queries->Create query by using wizard You can select the desirable tables for the queries

        My small attempt...

        J Offline
        J Offline
        joerozario
        wrote on last edited by
        #3

        thank u for u r reply. Actually i have the tables already. your solution gives me the select query for the table but not the "create query". i want create query of the existing table. is it posible to generate (create Query) query as we generate in sql server.

        S 1 Reply Last reply
        0
        • J joerozario

          thank u for u r reply. Actually i have the tables already. your solution gives me the select query for the table but not the "create query". i want create query of the existing table. is it posible to generate (create Query) query as we generate in sql server.

          S Offline
          S Offline
          sujithkumarsl
          wrote on last edited by
          #4

          I think your question is not clear do you want to create table using query? What you mean by "Create query" ?

          My small attempt...

          J V 2 Replies Last reply
          0
          • S sujithkumarsl

            I think your question is not clear do you want to create table using query? What you mean by "Create query" ?

            My small attempt...

            J Offline
            J Offline
            joerozario
            wrote on last edited by
            #5

            I have already created the tables.but i need create query of the existing table.

            J 1 Reply Last reply
            0
            • J joerozario

              I have already created the tables.but i need create query of the existing table.

              J Offline
              J Offline
              joerozario
              wrote on last edited by
              #6

              i have the tables already. i want the create table syntax of the existing table.How can i see? say for example sample is the table that i have created already. now i want the syntax like this create table sample(.....); Where can i go and find this systax in access. If the search i could get the syntax like this only(Select .......) But i want the create table syntax.

              R 1 Reply Last reply
              0
              • J joerozario

                i have the tables already. i want the create table syntax of the existing table.How can i see? say for example sample is the table that i have created already. now i want the syntax like this create table sample(.....); Where can i go and find this systax in access. If the search i could get the syntax like this only(Select .......) But i want the create table syntax.

                R Offline
                R Offline
                Russell Jones
                wrote on last edited by
                #7

                i think you need a function called createquerydef() on the access database object. Russ

                J 1 Reply Last reply
                0
                • R Russell Jones

                  i think you need a function called createquerydef() on the access database object. Russ

                  J Offline
                  J Offline
                  joerozario
                  wrote on last edited by
                  #8

                  createquerydef() how to get this function i didn't get u r idea. can u give more explanation. is function available in MsAcess or available in .net

                  R 1 Reply Last reply
                  0
                  • S sujithkumarsl

                    I think your question is not clear do you want to create table using query? What you mean by "Create query" ?

                    My small attempt...

                    V Offline
                    V Offline
                    V 0
                    wrote on last edited by
                    #9

                    he means he wants something like "Create table mytable ID int Not null, somevalue varchar2(10), " etc.

                    V. I found a living worth working for, but haven't found work worth living for.

                    1 Reply Last reply
                    0
                    • J joerozario

                      createquerydef() how to get this function i didn't get u r idea. can u give more explanation. is function available in MsAcess or available in .net

                      R Offline
                      R Offline
                      Russell Jones
                      wrote on last edited by
                      #10

                      it's a function that is part of the access runtime library. I belive there is a Primary Interop Assembly available for MS Access so you should be able to use the object from c#. have a look on MSDN for Access PIA and you should find a download. Russ

                      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