Results 1 to 13 of 13

Thread: T-sql

  1. #1
    Join Date
    Dec 2003
    Posts
    44

    Unanswered: T-sql

    I have a web application that can connect to an MSSQL DB. It grabs all the info of all the tables and columns in sp_columns etc etc.

    But.... what if I want to use the same app to connect to an Cold Fusion DB, or an Access DB, or a MySQL DB, what kind of changes would I have to make, do all of them use T-SQL, or is there variations with each DB that I should know about?

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Re: T-sql

    Originally posted by sabastious
    do all of them use T-SQL
    NO

    , or is there variations with each DB that I should know about?
    YES
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Dec 2003
    Posts
    44

    ...

    Thanks for nothing.... I needed a little more of answer than that...

    what about Access, does access use the same SQL as MSSQL?

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You asked a general question and you got a general answer. Don't belittle it.

    In regards to your question about Access, it uses a flavor of SQL similiar but not identical to SQL Server. Regardless, your original post deals with enumerating objects and object properties within the SQL Server environment. SQL Server uses its own internal organizational schema, and no other two RDBMSs will use the same schema (with the possible exception of Sybase/SQL Server).
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Dec 2003
    Posts
    44
    sorry, I am just gettin a bit frustrated with some code I am trying to get to work.

    Ok, in the SQL Server environment, you can query the table "sysobjects" to get the tables.... But you cant do that with Access. Does access have similer info stored somewhere you can query?

  6. #6
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Tables collection.

  7. #7
    Join Date
    Dec 2003
    Posts
    44
    Originally posted by rdjabarov
    Tables collection.
    hmmm, how do I access the Tables Collection, can I access it via a recordset? or some other component?

  8. #8
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    In MS Access, select Options from the menu and then in the View tab check the box marked "System Objects". The system table names all start with "MSys".
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  9. #9
    Join Date
    Dec 2003
    Posts
    44
    Originally posted by blindman
    In MS Access, select Options from the menu and then in the View tab check the box marked "System Objects". The system table names all start with "MSys".
    Is there way to get Column information, like datatype etc in Access, like the way you can in SQL Server with sp_columns?
    Last edited by sabastious; 01-22-04 at 18:38.

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Access doesn't store its metadata in database tables like SQL Server does. Instead, the data is stored in VB objects. You can navigate and enumerate these objects and their components using VB. It's been years since I've done it, but you should be able to find instructions and sample code in MS Access help. Try doing a search on the keywork "enumerate" and see what turns up.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  11. #11
    Join Date
    Dec 2003
    Posts
    44
    Originally posted by blindman
    Access doesn't store its metadata in database tables like SQL Server does. Instead, the data is stored in VB objects. You can navigate and enumerate these objects and their components using VB. It's been years since I've done it, but you should be able to find instructions and sample code in MS Access help. Try doing a search on the keywork "enumerate" and see what turns up.
    Can these VB Objects be called in VBscript?

  12. #12
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I'm not a VB expert. I called them through Access modules, but I imagine they could be referenced through VB script. If nobody on this forum can give you an answer, you will have to do some research on your own.

    You might get a response from posting your question on the MS Access forum.

    Good luck!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  13. #13
    Join Date
    Sep 2003
    Posts
    522
    you can get anything from vbscript if you can get it through vb. database object has tables collection, just like it has queries and (i believe) reports.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •