Thursday, December 7, 2006

vbscript to access oracle database

Thursday, December 07, 2006 Posted by Andre Broers 7 comments
'The connection string
sConnectionString = "Provider=MSDAORA;Data

Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=<hostname>)(Port=1521)))(CONNECT_DATA=(SID=<sid>)));UserID=<username>;Password=<password>"

'The connection (vbscript):
Set connection = WScript.CreateObject("ADODB.Connection")
connection.ConnectionString = sConnectionString
connection.Open
if Err.Number <> 0 Then
WScript.Echo Err.Number
WScript.Echo Err.Description
WScript.Quit
Else
WScript.Echo "Connected to the database "+ connection.provider
End If

Set rs = CreateObject("ADODB.recordset")
strSQL = "SELECT tablename FROM all_tables"
rs.open strSQL, connection, 3,3

rs.MoveFirst
WHILE NOT rs.EOF
wscript.echo (rs("tablename") & "<br/>")
rs.MoveNext
WEND

7 comments:

  1. This house flag is Officially Licensed by the NFL and is a high quality item for hanging from your porch or as an interior wall banner.Hang your Minnesota Vikings Double Sided House Flag with our banner pole or fly it with our 5' or 6' flagpoles and adjustable flag brackets.house divided flags,
    nfl american flags,New England Patriots stars and stripes flags
    cheap New Orleans Saints american banners

    ReplyDelete
  2. maglie basket 2016 USA Stephen Curry ←_← Clicca per acquistare ^_^
    Informazioni di base:
    Formato: S, M, L, XL, XXL.
    La marca: Nike
    Tessuto: Revolution 30
    Style: canotte basket
    Oggetti applicabili: Uomo
    Appartiene alla squadra: 2016 USA
    Corrispondenti ai giocatori: Stephen Currymaglia AC milan 2017
    Maglia AS Roma a poco prezzomaglie calcio poco prezzo,
    maglie da calcio a poco prezzo,

    ReplyDelete
  3. by: toko alat sex
    Hello sir, after I read the article you get to the bottom, It is very interesting to look at, it can provide benefits, and also the lessons, I really like it.
    so that I can remember with this master page and be back here, I leave a trail so that I could track my trail I have ever visit
    alat bantu sex pria
    alat bantu sex wanita
    I apologize if I trace unfavorable.

    ReplyDelete