1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Ssrs-2005

Discussion in 'SQL PL/SQL' started by Farshad Javadi, Feb 8, 2013.

  1. Farshad Javadi

    Farshad Javadi Active Member

    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    80
    Hello All,

    I am using Microsoft SSRS-2005 reporting services. Do you know from SSRS-2005 how can I use VB to call an Oracle query and then parse the output lines and display any desired field.

    A small example will help a lot.


    Thanks,
    Farshad
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hello.

    the source of Oracle DB is set up?
    if it is set up
    {
    1) Oracle documentation http://docs.oracle.com/cd/B19306_01/win.102/b14309/clients.htm
    2) links to simple examples to VB
    http://http://www.vb6.us/tutorials/oracle-and-visual-basic-using-ado
    http://http://msdn.microsoft.com/en-us/library/77d8yct7.aspx
    http://http://www.bigresource.com/VB-vb-oracle-query-CtJZXpbaMe.html#QZUHCjLflQ

    3) prototype of execution of sql

    Code (Text):
    strConOracle = "Driver={Microsoft ODBC for Oracle}; " & _
             "CONNECTSTRING=(DESCRIPTION=" & _
             "(ADDRESS=(PROTOCOL=TCP)" & _
             "(HOST=" & strHost & ")(PORT=1521))" & _
             "(CONNECT_DATA=(SERVICE_NAME=" & strDatabase & "))); uid=" & strUser & " ;pwd=" & strPassword & ";"
      Set oConOracle = CreateObject("ADODB.Connection")
      Set oRsOracle = CreateObject("ADODB.Recordset")
      oConOracle.Open strConOracle
      Set oRsOracle = oConOracle.Execute(strSQL)
      Do While Not oRsOracle.EOF
          If StrResult <> "" Then
            StrResult = StrResult & Chr(10) & oRsOracle.Fields(0).Value
          Else
            StrResult = oRsOracle.Fields(0).Value
          End If
        oRsOracle.MoveNext
      Loop
      oConOracle.Close