MAS90 Database and Scripting

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default MAS90 Database and Scripting

    I'd like to write scripts that access Best Software's MAS90 application
    database (v3.71).

    Can anyone point me to some examples or background material?

    Thank you.


    McKirahan Guest

  2. Similar Questions and Discussions

    1. PHP Scripting for Mac
      I am trying to code a form in Dreamweaver. I have created the form but I need to have it so that the details entered can go to a 'database' or...
    2. php scripting
      Hi i am interesting in making a shopping cart that doesnt actually collect payment of any kind. It would instead only take the order and give the...
    3. scripting in CS
      Hi, does anyone know if it's possible to obtain a script to process a single image into a variety of sizes, resolution and formats automatically. I...
    4. scripting
      Can anyone link me to were i can learn SCRIPTING on windows or and tell me about scripting.
    5. LRP scripting
      El Mon, Jul 14, 2003 at 11:13:38PM +0100, Shango Oluwa escribió: Maybe because LRP is not Debian related .. ;) That's because you create a...
  3. #2

    Default Re: MAS90 Database and Scripting

    Do you know what kind of database this product uses?

    Ray at home

    "McKirahan" <News@McKirahan.com> wrote in message
    news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > I'd like to write scripts that access Best Software's MAS90 application
    > database (v3.71).
    >
    > Can anyone point me to some examples or background material?
    >
    > Thank you.
    >
    >

    Ray at Guest

  4. #3

    Default Re: MAS90 Database and Scripting

    "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > Do you know what kind of database this product uses?
    >
    > Ray at home
    >
    > "McKirahan" <News@McKirahan.com> wrote in message
    > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > I'd like to write scripts that access Best Software's MAS90 application
    > > database (v3.71).
    > >
    > > Can anyone point me to some examples or background material?
    > >
    > > Thank you
    It's proprietary but is available via ODBC.

    The product comes with a sample script (VBS and JS) that is invoked via a
    button added to an existing form via the Customizer facility. It only dumps
    a few application server variables to show that it works.

    However, I'd like to be able to script against it externally. I'm looking
    to develop ad hoc reports (read only) preferably in VBScript though I would
    consider VB6 or VB.Net. The product does include facilities to view the
    database tables and their layouts via PDF files.

    I found one article that discusses this ("MAS 90 Windows Scripting Part I"
    [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    but the author (whom I've e-mailed without a reply so far) hasn't followed
    up with Part II that he says will have the specifics.


    McKirahan Guest

  5. #4

    Default Re: MAS90 Database and Scripting

    If you have an ODBC connection, you should be able to use it just like it's
    any other database, pretty much. Have you done such things with other
    databases before, like Access or SQL?

    Ray at home

    "McKirahan" <News@McKirahan.com> wrote in message
    news:wCZtb.171426$275.544890@attbi_s53...
    > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > Do you know what kind of database this product uses?
    > >
    > > Ray at home
    > >
    > > "McKirahan" <News@McKirahan.com> wrote in message
    > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > I'd like to write scripts that access Best Software's MAS90
    application
    > > > database (v3.71).
    > > >
    > > > Can anyone point me to some examples or background material?
    > > >
    > > > Thank you
    >
    > It's proprietary but is available via ODBC.
    >
    > The product comes with a sample script (VBS and JS) that is invoked via a
    > button added to an existing form via the Customizer facility. It only
    dumps
    > a few application server variables to show that it works.
    >
    > However, I'd like to be able to script against it externally. I'm looking
    > to develop ad hoc reports (read only) preferably in VBScript though I
    would
    > consider VB6 or VB.Net. The product does include facilities to view the
    > database tables and their layouts via PDF files.
    >
    > I found one article that discusses this ("MAS 90 Windows Scripting Part I"
    > [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > but the author (whom I've e-mailed without a reply so far) hasn't followed
    > up with Part II that he says will have the specifics.
    >
    >

    Ray at Guest

  6. #5

    Default Re: MAS90 Database and Scripting

    All I've been using lately are DSN-less connections.

    I guess I just need a kick-start to revise this code:

    Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    Const cMDB = "Database.mdb"
    Dim objADO
    Set objADO = CreateObject("ADODB.Connection")
    objADO.Open cDSN & Server.MapPath(cMDB)

    I could find anything at [url]http://www.aspfaq.com/database.asp[/url].

    Thanks for your replies.


    "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
    > If you have an ODBC connection, you should be able to use it just like
    it's
    > any other database, pretty much. Have you done such things with other
    > databases before, like Access or SQL?
    >
    > Ray at home
    >
    > "McKirahan" <News@McKirahan.com> wrote in message
    > news:wCZtb.171426$275.544890@attbi_s53...
    > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    > > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > > Do you know what kind of database this product uses?
    > > >
    > > > Ray at home
    > > >
    > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > > I'd like to write scripts that access Best Software's MAS90
    > application
    > > > > database (v3.71).
    > > > >
    > > > > Can anyone point me to some examples or background material?
    > > > >
    > > > > Thank you
    > >
    > > It's proprietary but is available via ODBC.
    > >
    > > The product comes with a sample script (VBS and JS) that is invoked via
    a
    > > button added to an existing form via the Customizer facility. It only
    > dumps
    > > a few application server variables to show that it works.
    > >
    > > However, I'd like to be able to script against it externally. I'm
    looking
    > > to develop ad hoc reports (read only) preferably in VBScript though I
    > would
    > > consider VB6 or VB.Net. The product does include facilities to view the
    > > database tables and their layouts via PDF files.
    > >
    > > I found one article that discusses this ("MAS 90 Windows Scripting Part
    I"
    > >
    [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > > but the author (whom I've e-mailed without a reply so far) hasn't
    followed
    > > up with Part II that he says will have the specifics.

    McKirahan Guest

  7. #6

    Default Re: MAS90 Database and Scripting

    I guess it would be:

    Const cDSN = "mySystemDSN"
    Dim objADO
    Set objADO = CreateObject("ADODB.Connection")
    objADO.Open "DSN=" & cDSN

    Or,

    objADO.Open "DSN=mySystemDSN;Uid=myUsername;Pwd=myPassword "

    I guess I'd use ADOX to walk throught the datbase structure.

    Would you have any other thoughts? Thanks.



    "McKirahan" <News@McKirahan.com> wrote in message
    news:SZZtb.22211$Dw6.121630@attbi_s02...
    > All I've been using lately are DSN-less connections.
    >
    > I guess I just need a kick-start to revise this code:
    >
    > Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    > Const cMDB = "Database.mdb"
    > Dim objADO
    > Set objADO = CreateObject("ADODB.Connection")
    > objADO.Open cDSN & Server.MapPath(cMDB)
    >
    > I could find anything at [url]http://www.aspfaq.com/database.asp[/url].
    >
    > Thanks for your replies.
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
    > > If you have an ODBC connection, you should be able to use it just like
    > it's
    > > any other database, pretty much. Have you done such things with other
    > > databases before, like Access or SQL?
    > >
    > > Ray at home
    > >
    > > "McKirahan" <News@McKirahan.com> wrote in message
    > > news:wCZtb.171426$275.544890@attbi_s53...
    > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    message
    > > > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > > > Do you know what kind of database this product uses?
    > > > >
    > > > > Ray at home
    > > > >
    > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > > > I'd like to write scripts that access Best Software's MAS90
    > > application
    > > > > > database (v3.71).
    > > > > >
    > > > > > Can anyone point me to some examples or background material?
    > > > > >
    > > > > > Thank you
    > > >
    > > > It's proprietary but is available via ODBC.
    > > >
    > > > The product comes with a sample script (VBS and JS) that is invoked
    via
    > a
    > > > button added to an existing form via the Customizer facility. It only
    > > dumps
    > > > a few application server variables to show that it works.
    > > >
    > > > However, I'd like to be able to script against it externally. I'm
    > looking
    > > > to develop ad hoc reports (read only) preferably in VBScript though I
    > > would
    > > > consider VB6 or VB.Net. The product does include facilities to view
    the
    > > > database tables and their layouts via PDF files.
    > > >
    > > > I found one article that discusses this ("MAS 90 Windows Scripting
    Part
    > I"
    > > >
    > [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > > > but the author (whom I've e-mailed without a reply so far) hasn't
    > followed
    > > > up with Part II that he says will have the specifics.
    >
    >

    McKirahan Guest

  8. #7

    Default Re: MAS90 Database and Scripting

    Do you have a system DSN setup? If so:

    Const cDSN = "dsn=NameOfDSN"
    Dim objADO
    Set objADO = CreateObject("ADODB.Connection")
    objADO.Open cDSN

    Ideally, you wouldn't use a DSN, but you can always change that later for
    the sake of getting started.

    Ray at home


    "McKirahan" <News@McKirahan.com> wrote in message
    news:SZZtb.22211$Dw6.121630@attbi_s02...
    > All I've been using lately are DSN-less connections.
    >
    > I guess I just need a kick-start to revise this code:
    >
    > Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    > Const cMDB = "Database.mdb"
    > Dim objADO
    > Set objADO = CreateObject("ADODB.Connection")
    > objADO.Open cDSN & Server.MapPath(cMDB)
    >
    > I could find anything at [url]http://www.aspfaq.com/database.asp[/url].
    >
    > Thanks for your replies.
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
    > > If you have an ODBC connection, you should be able to use it just like
    > it's
    > > any other database, pretty much. Have you done such things with other
    > > databases before, like Access or SQL?
    > >
    > > Ray at home
    > >
    > > "McKirahan" <News@McKirahan.com> wrote in message
    > > news:wCZtb.171426$275.544890@attbi_s53...
    > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    message
    > > > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > > > Do you know what kind of database this product uses?
    > > > >
    > > > > Ray at home
    > > > >
    > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > > > I'd like to write scripts that access Best Software's MAS90
    > > application
    > > > > > database (v3.71).
    > > > > >
    > > > > > Can anyone point me to some examples or background material?
    > > > > >
    > > > > > Thank you
    > > >
    > > > It's proprietary but is available via ODBC.
    > > >
    > > > The product comes with a sample script (VBS and JS) that is invoked
    via
    > a
    > > > button added to an existing form via the Customizer facility. It only
    > > dumps
    > > > a few application server variables to show that it works.
    > > >
    > > > However, I'd like to be able to script against it externally. I'm
    > looking
    > > > to develop ad hoc reports (read only) preferably in VBScript though I
    > > would
    > > > consider VB6 or VB.Net. The product does include facilities to view
    the
    > > > database tables and their layouts via PDF files.
    > > >
    > > > I found one article that discusses this ("MAS 90 Windows Scripting
    Part
    > I"
    > > >
    > [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > > > but the author (whom I've e-mailed without a reply so far) hasn't
    > followed
    > > > up with Part II that he says will have the specifics.
    >
    >

    Ray at Guest

  9. #8

    Default Re: MAS90 Database and Scripting

    Yes, ADOX should let you go through the tables. It sounds like you're on
    the right track. I looked at the site for this product, and I see they have
    a SQL Server version. I guess that is not what you have, eh?

    Try this code:

    Dim oADO, oADOX
    Set oADO = Server.CreateObject("ADODB.Connection")
    oADO.Open "dsn=YourSystemDSN"
    Set oADOX = Server.CreateObject("ADOX.Catalog")
    oADOX.ActiveConnection = oADO

    For Each Table in oADOX.Tables
    Response.Write Table.Name & "<br>"
    For Each Column in Table.Columns
    Response.Write " ---" & Column.Name & "<br>"
    For Each Prop in Column.Properties
    Response.Write " ------" & Prop.Name & ": " & Prop & "<br>"
    Next
    Next
    Response.Write "<hr>"
    Next

    Set oADOX = Nothing
    oADO.Close : Set oADOX = Nothing

    Ray at home



    "McKirahan" <News@McKirahan.com> wrote in message
    news:h8_tb.217724$HS4.1915016@attbi_s01...
    > I guess it would be:
    >
    > Const cDSN = "mySystemDSN"
    > Dim objADO
    > Set objADO = CreateObject("ADODB.Connection")
    > objADO.Open "DSN=" & cDSN
    >
    > Or,
    >
    > objADO.Open "DSN=mySystemDSN;Uid=myUsername;Pwd=myPassword "
    >
    > I guess I'd use ADOX to walk throught the datbase structure.
    >
    > Would you have any other thoughts? Thanks.
    >
    >
    >
    > "McKirahan" <News@McKirahan.com> wrote in message
    > news:SZZtb.22211$Dw6.121630@attbi_s02...
    > > All I've been using lately are DSN-less connections.
    > >
    > > I guess I just need a kick-start to revise this code:
    > >
    > > Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    > > Const cMDB = "Database.mdb"
    > > Dim objADO
    > > Set objADO = CreateObject("ADODB.Connection")
    > > objADO.Open cDSN & Server.MapPath(cMDB)
    > >
    > > I could find anything at [url]http://www.aspfaq.com/database.asp[/url].
    > >
    > > Thanks for your replies.
    > >
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    > > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
    > > > If you have an ODBC connection, you should be able to use it just like
    > > it's
    > > > any other database, pretty much. Have you done such things with other
    > > > databases before, like Access or SQL?
    > > >
    > > > Ray at home
    > > >
    > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > news:wCZtb.171426$275.544890@attbi_s53...
    > > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    > message
    > > > > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > > > > Do you know what kind of database this product uses?
    > > > > >
    > > > > > Ray at home
    > > > > >
    > > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > > > > I'd like to write scripts that access Best Software's MAS90
    > > > application
    > > > > > > database (v3.71).
    > > > > > >
    > > > > > > Can anyone point me to some examples or background material?
    > > > > > >
    > > > > > > Thank you
    > > > >
    > > > > It's proprietary but is available via ODBC.
    > > > >
    > > > > The product comes with a sample script (VBS and JS) that is invoked
    > via
    > > a
    > > > > button added to an existing form via the Customizer facility. It
    only
    > > > dumps
    > > > > a few application server variables to show that it works.
    > > > >
    > > > > However, I'd like to be able to script against it externally. I'm
    > > looking
    > > > > to develop ad hoc reports (read only) preferably in VBScript though
    I
    > > > would
    > > > > consider VB6 or VB.Net. The product does include facilities to view
    > the
    > > > > database tables and their layouts via PDF files.
    > > > >
    > > > > I found one article that discusses this ("MAS 90 Windows Scripting
    > Part
    > > I"
    > > > >
    > >
    [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > > > > but the author (whom I've e-mailed without a reply so far) hasn't
    > > followed
    > > > > up with Part II that he says will have the specifics.
    > >
    > >
    >
    >

    Ray at Guest

  10. #9

    Default Re: MAS90 Database and Scripting

    I tried the following code which I thought I had used successfully before
    but it failed with "Object or provider is not capable of performing
    requested operation." when it tried to perform
    "objADO.OpenSchema(adSchemaTables)".

    Option Explicit
    '*
    '* This VBS (Visual Basic Script) Program does the following:
    '* 1) Use ADOX to identify the database tables in the MAS90 database.
    '*
    '* Declare Constants
    '*
    Const cVBS = "MAS90ADO.vbs"
    Const cDSN = "SOTAMAS90"
    '*
    '* Declare ADO Constants
    '*
    Const adSchemaTables = 10
    '*
    '* Declare Variables
    '*
    Dim strTBL
    strTBL = cDSN & " Tables:" & vbCrLf
    '*
    '* Declare Objects
    '*
    Dim objADO
    Set objADO = CreateObject("ADODB.Connection")
    objADO.Open "DSN=" & cDSN
    Dim objRST
    Set objRST = objADO.OpenSchema(adSchemaTables)
    '*
    '* Identify Tables
    '*
    Do Until objRST.EOF
    strTBL = strTBL & objRST("TABLE_NAME") & vbCrLf
    objRST.MoveNext
    Loop
    '*
    '* Destroy Objects
    '*
    objRST.Close
    Set objRST = Nothing
    objADO.Close
    Set objADO = Nothing
    '*
    '* Display Tables
    '*
    WScript.Echo strTBL

    "McKirahan" <News@McKirahan.com> wrote in message
    news:h8_tb.217724$HS4.1915016@attbi_s01...
    > I guess it would be:
    >
    > Const cDSN = "mySystemDSN"
    > Dim objADO
    > Set objADO = CreateObject("ADODB.Connection")
    > objADO.Open "DSN=" & cDSN
    >
    > Or,
    >
    > objADO.Open "DSN=mySystemDSN;Uid=myUsername;Pwd=myPassword "
    >
    > I guess I'd use ADOX to walk throught the datbase structure.
    >
    > Would you have any other thoughts? Thanks.
    >
    >
    >
    > "McKirahan" <News@McKirahan.com> wrote in message
    > news:SZZtb.22211$Dw6.121630@attbi_s02...
    > > All I've been using lately are DSN-less connections.
    > >
    > > I guess I just need a kick-start to revise this code:
    > >
    > > Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    > > Const cMDB = "Database.mdb"
    > > Dim objADO
    > > Set objADO = CreateObject("ADODB.Connection")
    > > objADO.Open cDSN & Server.MapPath(cMDB)
    > >
    > > I could find anything at [url]http://www.aspfaq.com/database.asp[/url].
    > >
    > > Thanks for your replies.
    > >
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    > > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
    > > > If you have an ODBC connection, you should be able to use it just like
    > > it's
    > > > any other database, pretty much. Have you done such things with other
    > > > databases before, like Access or SQL?
    > > >
    > > > Ray at home
    > > >
    > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > news:wCZtb.171426$275.544890@attbi_s53...
    > > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    > message
    > > > > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > > > > Do you know what kind of database this product uses?
    > > > > >
    > > > > > Ray at home
    > > > > >
    > > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > > > > I'd like to write scripts that access Best Software's MAS90
    > > > application
    > > > > > > database (v3.71).
    > > > > > >
    > > > > > > Can anyone point me to some examples or background material?
    > > > > > >
    > > > > > > Thank you
    > > > >
    > > > > It's proprietary but is available via ODBC.
    > > > >
    > > > > The product comes with a sample script (VBS and JS) that is invoked
    > via
    > > a
    > > > > button added to an existing form via the Customizer facility. It
    only
    > > > dumps
    > > > > a few application server variables to show that it works.
    > > > >
    > > > > However, I'd like to be able to script against it externally. I'm
    > > looking
    > > > > to develop ad hoc reports (read only) preferably in VBScript though
    I
    > > > would
    > > > > consider VB6 or VB.Net. The product does include facilities to view
    > the
    > > > > database tables and their layouts via PDF files.
    > > > >
    > > > > I found one article that discusses this ("MAS 90 Windows Scripting
    > Part
    > > I"
    > > > >
    > >
    [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > > > > but the author (whom I've e-mailed without a reply so far) hasn't
    > > followed
    > > > > up with Part II that he says will have the specifics.
    > >
    > >
    >
    >

    McKirahan Guest

  11. #10

    Default Re: MAS90 Database and Scripting

    Excellent! Thank you very much!
    I should be able to do what I want to do now.

    There are 276 Tables in the database so I ran it with the Table.Columns
    commented out.
    Also, I couldn't get the Table.Properties to work (when I specified a single
    table).

    I tried the following modification of your code (VBS instead of ASP):

    Option Explicit
    '*
    '* This VBS (Visual Basic Script) Program does the following:
    '* 1) Use ADOX to identify the database tables in the MAS90 database.
    '*
    '* Declare Constants
    '*
    Const cVBS = "MAS90ADOX.vbs"
    Const cDSN = "SOTAMAS90"
    '*
    '* Declare Variables
    '*
    Dim intTBL
    intTBL = 0
    Dim strTBL
    strTBL = " '" & cDSN & "' Tables:" & vbCrLf
    '*
    Dim Table
    Dim Column
    '*
    '* Declare Objects
    '*
    Dim objADO
    Set objADO = CreateObject("ADODB.Connection")
    objADO.Open "DSN=" & cDSN
    Dim objADX
    Set objADX = CreateObject("ADOX.Catalog")
    objADX.ActiveConnection = objADO
    '*
    '* Identify Tables
    '*
    For Each Table in objADX.Tables
    intTBL = intTBL + 1
    strTBL = strTBL & Table.Name & vbCrLf
    ' For Each Column in Table.Columns
    ' strTBL = strTBL & vbTab & Column.Name & vbCrLf
    ' Next
    Next
    '*
    '* Destroy Objects
    '*
    objADO.Close
    Set objADO = Nothing
    Set objADX = Nothing
    '*
    '* Display Tables
    '*
    WScript.Echo intTBL & strTBL


    "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    news:#IUmKhNrDHA.372@TK2MSFTNGP11.phx.gbl...
    > Yes, ADOX should let you go through the tables. It sounds like you're on
    > the right track. I looked at the site for this product, and I see they
    have
    > a SQL Server version. I guess that is not what you have, eh?
    >
    > Try this code:
    >
    > Dim oADO, oADOX
    > Set oADO = Server.CreateObject("ADODB.Connection")
    > oADO.Open "dsn=YourSystemDSN"
    > Set oADOX = Server.CreateObject("ADOX.Catalog")
    > oADOX.ActiveConnection = oADO
    >
    > For Each Table in oADOX.Tables
    > Response.Write Table.Name & "<br>"
    > For Each Column in Table.Columns
    > Response.Write " ---" & Column.Name & "<br>"
    > For Each Prop in Column.Properties
    > Response.Write " ------" & Prop.Name & ": " & Prop & "<br>"
    > Next
    > Next
    > Response.Write "<hr>"
    > Next
    >
    > Set oADOX = Nothing
    > oADO.Close : Set oADOX = Nothing
    >
    > Ray at home
    >
    >
    >
    > "McKirahan" <News@McKirahan.com> wrote in message
    > news:h8_tb.217724$HS4.1915016@attbi_s01...
    > > I guess it would be:
    > >
    > > Const cDSN = "mySystemDSN"
    > > Dim objADO
    > > Set objADO = CreateObject("ADODB.Connection")
    > > objADO.Open "DSN=" & cDSN
    > >
    > > Or,
    > >
    > > objADO.Open "DSN=mySystemDSN;Uid=myUsername;Pwd=myPassword "
    > >
    > > I guess I'd use ADOX to walk throught the datbase structure.
    > >
    > > Would you have any other thoughts? Thanks.
    > >
    > >
    > >
    > > "McKirahan" <News@McKirahan.com> wrote in message
    > > news:SZZtb.22211$Dw6.121630@attbi_s02...
    > > > All I've been using lately are DSN-less connections.
    > > >
    > > > I guess I just need a kick-start to revise this code:
    > > >
    > > > Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    > > > Const cMDB = "Database.mdb"
    > > > Dim objADO
    > > > Set objADO = CreateObject("ADODB.Connection")
    > > > objADO.Open cDSN & Server.MapPath(cMDB)
    > > >
    > > > I could find anything at [url]http://www.aspfaq.com/database.asp[/url].
    > > >
    > > > Thanks for your replies.
    > > >
    > > >
    > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    message
    > > > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
    > > > > If you have an ODBC connection, you should be able to use it just
    like
    > > > it's
    > > > > any other database, pretty much. Have you done such things with
    other
    > > > > databases before, like Access or SQL?
    > > > >
    > > > > Ray at home
    > > > >
    > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > news:wCZtb.171426$275.544890@attbi_s53...
    > > > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    > > message
    > > > > > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > > > > > Do you know what kind of database this product uses?
    > > > > > >
    > > > > > > Ray at home
    > > > > > >
    > > > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > > > > > I'd like to write scripts that access Best Software's MAS90
    > > > > application
    > > > > > > > database (v3.71).
    > > > > > > >
    > > > > > > > Can anyone point me to some examples or background material?
    > > > > > > >
    > > > > > > > Thank you
    > > > > >
    > > > > > It's proprietary but is available via ODBC.
    > > > > >
    > > > > > The product comes with a sample script (VBS and JS) that is
    invoked
    > > via
    > > > a
    > > > > > button added to an existing form via the Customizer facility. It
    > only
    > > > > dumps
    > > > > > a few application server variables to show that it works.
    > > > > >
    > > > > > However, I'd like to be able to script against it externally. I'm
    > > > looking
    > > > > > to develop ad hoc reports (read only) preferably in VBScript
    though
    > I
    > > > > would
    > > > > > consider VB6 or VB.Net. The product does include facilities to
    view
    > > the
    > > > > > database tables and their layouts via PDF files.
    > > > > >
    > > > > > I found one article that discusses this ("MAS 90 Windows Scripting
    > > Part
    > > > I"
    > > > > >
    > > >
    > [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > > > > > but the author (whom I've e-mailed without a reply so far) hasn't
    > > > followed
    > > > > > up with Part II that he says will have the specifics.
    > > >

    McKirahan Guest

  12. #11

    Default Re: MAS90 Database and Scripting

    Have you tried connecting to it with Access and "linking to the tables"

    You should then be able to view tables and structures fairly easily.

    Tom
    "McKirahan" <News@McKirahan.com> wrote in message
    news:Ki%tb.171734$275.547590@attbi_s53...
    > Excellent! Thank you very much!
    > I should be able to do what I want to do now.
    >
    > There are 276 Tables in the database so I ran it with the Table.Columns
    > commented out.
    > Also, I couldn't get the Table.Properties to work (when I specified a
    single
    > table).
    >
    > I tried the following modification of your code (VBS instead of ASP):
    >
    > Option Explicit
    > '*
    > '* This VBS (Visual Basic Script) Program does the following:
    > '* 1) Use ADOX to identify the database tables in the MAS90 database.
    > '*
    > '* Declare Constants
    > '*
    > Const cVBS = "MAS90ADOX.vbs"
    > Const cDSN = "SOTAMAS90"
    > '*
    > '* Declare Variables
    > '*
    > Dim intTBL
    > intTBL = 0
    > Dim strTBL
    > strTBL = " '" & cDSN & "' Tables:" & vbCrLf
    > '*
    > Dim Table
    > Dim Column
    > '*
    > '* Declare Objects
    > '*
    > Dim objADO
    > Set objADO = CreateObject("ADODB.Connection")
    > objADO.Open "DSN=" & cDSN
    > Dim objADX
    > Set objADX = CreateObject("ADOX.Catalog")
    > objADX.ActiveConnection = objADO
    > '*
    > '* Identify Tables
    > '*
    > For Each Table in objADX.Tables
    > intTBL = intTBL + 1
    > strTBL = strTBL & Table.Name & vbCrLf
    > ' For Each Column in Table.Columns
    > ' strTBL = strTBL & vbTab & Column.Name & vbCrLf
    > ' Next
    > Next
    > '*
    > '* Destroy Objects
    > '*
    > objADO.Close
    > Set objADO = Nothing
    > Set objADX = Nothing
    > '*
    > '* Display Tables
    > '*
    > WScript.Echo intTBL & strTBL
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
    > news:#IUmKhNrDHA.372@TK2MSFTNGP11.phx.gbl...
    > > Yes, ADOX should let you go through the tables. It sounds like you're
    on
    > > the right track. I looked at the site for this product, and I see they
    > have
    > > a SQL Server version. I guess that is not what you have, eh?
    > >
    > > Try this code:
    > >
    > > Dim oADO, oADOX
    > > Set oADO = Server.CreateObject("ADODB.Connection")
    > > oADO.Open "dsn=YourSystemDSN"
    > > Set oADOX = Server.CreateObject("ADOX.Catalog")
    > > oADOX.ActiveConnection = oADO
    > >
    > > For Each Table in oADOX.Tables
    > > Response.Write Table.Name & "<br>"
    > > For Each Column in Table.Columns
    > > Response.Write " ---" & Column.Name & "<br>"
    > > For Each Prop in Column.Properties
    > > Response.Write " ------" & Prop.Name & ": " & Prop & "<br>"
    > > Next
    > > Next
    > > Response.Write "<hr>"
    > > Next
    > >
    > > Set oADOX = Nothing
    > > oADO.Close : Set oADOX = Nothing
    > >
    > > Ray at home
    > >
    > >
    > >
    > > "McKirahan" <News@McKirahan.com> wrote in message
    > > news:h8_tb.217724$HS4.1915016@attbi_s01...
    > > > I guess it would be:
    > > >
    > > > Const cDSN = "mySystemDSN"
    > > > Dim objADO
    > > > Set objADO = CreateObject("ADODB.Connection")
    > > > objADO.Open "DSN=" & cDSN
    > > >
    > > > Or,
    > > >
    > > > objADO.Open "DSN=mySystemDSN;Uid=myUsername;Pwd=myPassword "
    > > >
    > > > I guess I'd use ADOX to walk throught the datbase structure.
    > > >
    > > > Would you have any other thoughts? Thanks.
    > > >
    > > >
    > > >
    > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > news:SZZtb.22211$Dw6.121630@attbi_s02...
    > > > > All I've been using lately are DSN-less connections.
    > > > >
    > > > > I guess I just need a kick-start to revise this code:
    > > > >
    > > > > Const cDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    > > > > Const cMDB = "Database.mdb"
    > > > > Dim objADO
    > > > > Set objADO = CreateObject("ADODB.Connection")
    > > > > objADO.Open cDSN & Server.MapPath(cMDB)
    > > > >
    > > > > I could find anything at [url]http://www.aspfaq.com/database.asp[/url].
    > > > >
    > > > > Thanks for your replies.
    > > > >
    > > > >
    > > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    > message
    > > > > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
    > > > > > If you have an ODBC connection, you should be able to use it just
    > like
    > > > > it's
    > > > > > any other database, pretty much. Have you done such things with
    > other
    > > > > > databases before, like Access or SQL?
    > > > > >
    > > > > > Ray at home
    > > > > >
    > > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > > news:wCZtb.171426$275.544890@attbi_s53...
    > > > > > > "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
    > > > message
    > > > > > > news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...
    > > > > > > > Do you know what kind of database this product uses?
    > > > > > > >
    > > > > > > > Ray at home
    > > > > > > >
    > > > > > > > "McKirahan" <News@McKirahan.com> wrote in message
    > > > > > > > news:2KUtb.166242$mZ5.1143687@attbi_s54...
    > > > > > > > > I'd like to write scripts that access Best Software's MAS90
    > > > > > application
    > > > > > > > > database (v3.71).
    > > > > > > > >
    > > > > > > > > Can anyone point me to some examples or background material?
    > > > > > > > >
    > > > > > > > > Thank you
    > > > > > >
    > > > > > > It's proprietary but is available via ODBC.
    > > > > > >
    > > > > > > The product comes with a sample script (VBS and JS) that is
    > invoked
    > > > via
    > > > > a
    > > > > > > button added to an existing form via the Customizer facility.
    It
    > > only
    > > > > > dumps
    > > > > > > a few application server variables to show that it works.
    > > > > > >
    > > > > > > However, I'd like to be able to script against it externally.
    I'm
    > > > > looking
    > > > > > > to develop ad hoc reports (read only) preferably in VBScript
    > though
    > > I
    > > > > > would
    > > > > > > consider VB6 or VB.Net. The product does include facilities to
    > view
    > > > the
    > > > > > > database tables and their layouts via PDF files.
    > > > > > >
    > > > > > > I found one article that discusses this ("MAS 90 Windows
    Scripting
    > > > Part
    > > > > I"
    > > > > > >
    > > > >
    > >
    [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])
    > > > > > > but the author (whom I've e-mailed without a reply so far)
    hasn't
    > > > > followed
    > > > > > > up with Part II that he says will have the specifics.
    > > > >
    >
    >

    TomB Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139