Ask a Question related to ASP Database, Design and Development.
-
McKirahan #1
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
-
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... -
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... -
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... -
scripting
Can anyone link me to were i can learn SCRIPTING on windows or and tell me about scripting. -
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... -
Ray at #2
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
-
McKirahan #3
Re: MAS90 Database and Scripting
"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
news:eXezgMKrDHA.2216@TK2MSFTNGP12.phx.gbl...It's proprietary but is available via ODBC.> 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
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
-
Ray at #4
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...application> "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 MAS90dumps>> > > 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 onlywould> 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> 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
-
McKirahan #5
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...it's> If you have an ODBC connection, you should be able to use it just likea> 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...> application> > "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> >> > > > 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 vialooking> dumps> > button added to an existing form via the Customizer facility. It only> > a few application server variables to show that it works.
> >
> > However, I'd like to be able to script against it externally. I'mI"> would> > to develop ad hoc reports (read only) preferably in VBScript though I> > 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[url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])> >followed> > but the author (whom I've e-mailed without a reply so far) hasn't> > up with Part II that he says will have the specifics.
McKirahan Guest
-
McKirahan #6
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...message> 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...> it's> > If you have an ODBC connection, you should be able to use it just like> > 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 invia> > application> > > 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> > > > > 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 invokedthe> a> looking> > dumps> > > button added to an existing form via the Customizer facility. It only> > > a few application server variables to show that it works.
> > >
> > > However, I'd like to be able to script against it externally. I'm> > would> > > to develop ad hoc reports (read only) preferably in VBScript though I> > > consider VB6 or VB.Net. The product does include facilities to viewPart> > > database tables and their layouts via PDF files.
> > >
> > > I found one article that discusses this ("MAS 90 Windows Scripting> I"> [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])> > >> followed> > > but the author (whom I've e-mailed without a reply so far) hasn't>> > > up with Part II that he says will have the specifics.
>
McKirahan Guest
-
Ray at #7
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...message> 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...> it's> > If you have an ODBC connection, you should be able to use it just like> > 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 invia> > application> > > 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> > > > > 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 invokedthe> a> looking> > dumps> > > button added to an existing form via the Customizer facility. It only> > > a few application server variables to show that it works.
> > >
> > > However, I'd like to be able to script against it externally. I'm> > would> > > to develop ad hoc reports (read only) preferably in VBScript though I> > > consider VB6 or VB.Net. The product does include facilities to viewPart> > > database tables and their layouts via PDF files.
> > >
> > > I found one article that discusses this ("MAS 90 Windows Scripting> I"> [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])> > >> followed> > > but the author (whom I've e-mailed without a reply so far) hasn't>> > > up with Part II that he says will have the specifics.
>
Ray at Guest
-
Ray at #8
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...only> 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...> message> > 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...> > it's> > > If you have an ODBC connection, you should be able to use it just like> > > 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> via> > > > 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> > a> > > > button added to an existing form via the Customizer facility. ItI> > looking> > > 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> > > > to develop ad hoc reports (read only) preferably in VBScript though[url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])> the> > > would
> > > > consider VB6 or VB.Net. The product does include facilities to view> Part> > > > database tables and their layouts via PDF files.
> > > >
> > > > I found one article that discusses this ("MAS 90 Windows Scripting> > I"> >> > > >>> > followed> > > > but the author (whom I've e-mailed without a reply so far) hasn't> >> > > > up with Part II that he says will have the specifics.
> >
>
Ray at Guest
-
McKirahan #9
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...only> 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...> message> > 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...> > it's> > > If you have an ODBC connection, you should be able to use it just like> > > 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> via> > > > 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> > a> > > > button added to an existing form via the Customizer facility. ItI> > looking> > > 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> > > > to develop ad hoc reports (read only) preferably in VBScript though[url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])> the> > > would
> > > > consider VB6 or VB.Net. The product does include facilities to view> Part> > > > database tables and their layouts via PDF files.
> > > >
> > > > I found one article that discusses this ("MAS 90 Windows Scripting> > I"> >> > > >>> > followed> > > > but the author (whom I've e-mailed without a reply so far) hasn't> >> > > > up with Part II that he says will have the specifics.
> >
>
McKirahan Guest
-
McKirahan #10
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...have> 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 theymessage> 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 inlike> > > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
> > > > If you have an ODBC connection, you should be able to use it justother> > > it's
> > > > any other database, pretty much. Have you done such things withinvoked> > message> > > > 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> > > > > 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 isthough> only> > via> > > a
> > > > > button added to an existing form via the Customizer facility. It> > > > 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 VBScriptview> I> > > > would
> > > > > consider VB6 or VB.Net. The product does include facilities to> [url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])> > the> > Part> > > > > database tables and their layouts via PDF files.
> > > > >
> > > > > I found one article that discusses this ("MAS 90 Windows Scripting> > > I"
> > > > >
> > >> > > > > 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
-
TomB #11
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...single> 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 aon> 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'reIt> have> > the right track. I looked at the site for this product, and I see they> message> > 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> like> > > > news:#18dKHNrDHA.1880@TK2MSFTNGP09.phx.gbl...
> > > > > If you have an ODBC connection, you should be able to use it just> other> > > > it's
> > > > > any other database, pretty much. Have you done such things with> invoked> > > > > 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> > > via
> > > > a
> > > > > > button added to an existing form via the Customizer facility.I'm> > only> > > > > dumps
> > > > > > a few application server variables to show that it works.
> > > > > >
> > > > > > However, I'd like to be able to script against it externally.Scripting> though> > > > looking
> > > > > > to develop ad hoc reports (read only) preferably in VBScript> view> > I> > > > > would
> > > > > > consider VB6 or VB.Net. The product does include facilities to> > > the
> > > > > > database tables and their layouts via PDF files.
> > > > > >
> > > > > > I found one article that discusses this ("MAS 90 Windows[url]http://www.aaisinc.com/forum/index.php?board=2;action=display;threadid=10[/url])> >> > > Part
> > > > I"
> > > > > >
> > > >hasn't> > > > > > but the author (whom I've e-mailed without a reply so far)>> > > > followed
> > > > > > up with Part II that he says will have the specifics.
> > > >
>
TomB Guest



Reply With Quote

