Smartview VBA - Using HypCreateConnection to connect to different Providers

Hello,
I am currently working with Smartview 11.1.1.3.500. I am trying to build some code that will allow me to switch between our production and test environments that are on different APS URLs, rather than having to go into the options and typing in the server information everytime I need to switch. It looks like the HypCreateConnection function would be the one that would allow me to do this, but I'm not sure if I'm using it correctly. I am trying to send the Prod or Test APS URL and database info into the vtProviderURL and vtServerName parameters.
HypCreateConnection(Empty, [userName], [userPass], HYP_ESSBASE, [Prod/Test APS URL], [Prod/Test Server Info], [AppName],[DB Name], [Prod/Test Name] , "Analytic Provider Services")
However it seems that despite passing the URL to the function, the connection is using the information that is saved in the "Default URL" box in the "Hyperion Provider Service URL" section, in the "Ad Hoc" tab of the Hyperion Options window, which is where I've been manually typing in the Prod or Test URL everytime I need to retrieve their respective data.
The result is that after running my code, the "Smart View Data Source Manager" indicates that the APS URL being connected to is what was saved in my options, rather than my code.
Any help would be appreciated
Edited by: 1002778 on Apr 26, 2013 9:11 AM
I just realized that this is should be in the Smart View forum. Admins, feel free to move this thread.
Edited by: 1002778 on Apr 26, 2013 1:21 PM

I tried creating a connection and connecting and it is working for me. This is the macro that i used.
Sub create_connect()
sts = HypCreateConnection("Sheet2", "username", "password", HYP_ESSBASE, "http://testservername:19000/aps/APS", "testessbase", "app", "db", "App:DB", "Test Cube1")
sts = HypConnect(Empty, "username", "password", "App:DB")
End SubRegards
Celvin

Similar Messages

  • SmartView VBA Commands - HypCreateConnection and HypConnect

    I am in the process of converting some spreadsheets with Essbase Excel add-in VBA macros to use the SmartView VBA functions. I am having trouble just doing the connect to the V11 database. Prior to the conversion I used the following command to connect to the database to access an Essbase version 6.5 database:
    sts = EssVConnect("MS Essbase Actual", EssUsername, EssPassword, "Ws-bco-ess1", "Crsfo09", "Crsfo09")
    I have migrated the database to Essbase version 11.1.1 (on another server) and am attempting to connect to it with the following command (Oracle Hyperion SmartView for Office, Fusion Edition):
    sts = HypCreateConnection("MS Essbase Actual", EssUsername, EssPassword, HYP_ESSBASE, "http://ws-tst-esswl:13080/aps/SmartView", "Ws-tst-ess3d", "Crsfo09", "Crsfo09", "CrsConnection", "Analytic Services Provider")
    This is failing with a status of -47. The User Guide for Oracle Hyperion SmartView for Office, Fusion Edition lists status codes up to -40. It appears to connect to Provider Services and bring up my Essbase servers, but not actually connect to a specific application/database.
    I am using Excel 2007.
    I am also confused about the difference between HypCreateConnection and HypConnect. Do you need to use both, and if so, in which order? I found an article about Customizing Smart View Worksheets by using the VBA Toolkit, but it makes no mention of HypCreateConnection (and instructions seem to be for Excel 2003), so it wasn't very helpful.
    Thanks!

    OK... I'm still struggling with this. I keep getting a -47 error on the HypCreateConnection line, which according to the docs says that the connection already exists. So I added commands to try to remove the connection prior to creating it if one already exists. Here is my code:
    X = HypIsConnectedToAPS()
    If X = True Then
    X = HypDisconnectFromAPS()
    End If
    X = HypConnectionExists("SampBasicConn")
    If X = True Then
    X = HypRemoveConnection("SampBasicConn")
    End If
    X = HypCreateConnection(Empty, "admin", "password", HYP_ESSBASE, "http://apsserver:13080/smartview/SmartView", "essserver", "Sample", "Basic", "SampBasicConn", "Analytic Provider Services")
    X = HypConnectionExists("SampBasicConn")
    If X = True Then
    X = HypConnect(Empty, "admin", "password", "SampBasicConn")
    End If
    Return codes are all expected (sometimes I have to disconnect from APS and sometimes not) until I hit the HypCreateConnection line. The HypConnectionExists always returns false, but HypCreateConnection returns -47. After that, I test for the connection again, and it returns false. So why am I getting a -47? Also, there is no connection. It is truly acting as though the HypCreateConnection is failing. But the error code is not helpful. Is there any way to tell what is causing the failure? It seems I have tried all permutations of "/aps/SmartView", "/smartview/SmartView", fully qualified server names, etc. Is there a way to tell what is causing the failure (bad username/password, bad APS URL, bad Essbase server, bad application/database, etc.)?

  • SmartView VBA code to connect to Essbase

    Hi,
    I am trying to connect to Essbase v 11.1.13 via Smartview v 11 using Macro (VBA code). Thing is that I am able to make connection, but not able to autneticate after connecting to Appname and Dbname in that server. In right hand side after this macro is run, I need to manually click on the server and then go ahead to that appname and Dbname and then do adhoc analysis.
    Any inputs how to proceed with this step using SmartView VBA code?
    The code I am using is -
    bIsConnection = HypIsConnectedToAPS()
    If bIsConnection = True Then
    bIsConnection = HypDisconnectFromAPS()
    End If
    bIsConnection = HypConnectionExists("Sampleconn")
    If bIsConnection = True Then
    bIsConnection = HypRemoveConnection("Sampleconn")
    End If
    X = HypCreateConnection(Sheet1, User, pwd, "HYP_ESSBASE", url, sServer, app, db, connectionname, "Analytic Provider Services")
    X = HypConnect(Empty, User, pwd, connectionname)
    Please let me know even after this code, why it is not selecting appname.dbname in Smart view Data source manager?

    In the code below there is no existing connection called “My DMDemo Basic”. So using HypCreateConnection, this connection is created which connects automatically to the application database using username and password as per the sample code.
    If the connection string already exists, then you can call HypConnect to connect.
    The HypCreateConnection does not really need a valid username and password. But when we are using HypConnect, it validates the username and password and recognizes with the friendly name per the connection name - for example "My DMDemo Basic".
    If you want the user to be prompted for login details instead o f hardcoding the values, then you can assign null values to them - username and password as null values which is - "" (note this is open and close double quotes without any space). This will bring up the window where you can give the username and password values.
    Run the following code by opening a brand new Excel file and then copying the code below into the Visual Basic Editor Module. Make sure you modify all the parameters according to your setup including username, password, server name, application name, etc.
    Private Declare Function HypConnect Lib "HsAddin.dll" (ByVal vtSheetName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtFriendlyName As Variant) As Long
    Private Declare Function HypCreateConnection Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtProvider As Variant, ByVal vtProviderURL As Variant, ByVal vtServerName As Variant, ByVal vtApplicationName As Variant, ByVal vtDatabase As Variant, ByVal vtFriendlyName As Variant, ByVal vtDescription As Variant) As Long
    Sub Conn()
    Dim username As Variant
    Dim password As Variant
    Dim x As Variant
    Dim HYP_ESSBASE As Variant
    HYP_ESSBASE = "ESSBASE"
    username = "admin"
    password = "password"
    x = HypCreateConnection(Empty, username, password, HYP_ESSBASE, "http://localhost:13080/aps/SmartView", "localhost", "DMDemo", "Basic", "My DMDemo Basic", "Analytic Provider Services")
    MsgBox x
    x = HypConnect(Empty, username, password, "My DMDemo Basic")
    MsgBox x
    End Sub
    HTH-
    Jasmine

  • How do I use my ethernet connection for printing on my LAN and use my Wifi on a different router and ISP to connect to the internet?

    I'm in a small office, and I have to use my ethernet connection to connect to the networked copier to be able to print, but connection to which I hooked my Time Capsule is literally 20x faster when connecting to the internet.
    How can I tell the computer to use the ethernet connection to print, while everything else should go through wifi?
    I have been manually going back and forth changing the order in Network Preferences between ethernet and Wifi, but I'm know there must be an easier way.  Thanks for your help!

    A packet going to Apple is not local. It is going to 17.149.160.49  -- So it is sent to the topmost working connection to be Routed and sent to the Internet.
    A packet going to a local computer or other device that is on the same subnet (has an IP address very close to the topmost IP Address of your computer) gets sent out that port as well, but is sent directly to that computer on the local subnet, since no Routing [changing of Addresses} is needed.
    A packet going to a local computer or Printer or Network Attached Storage device that is not on the topmost subnet, but is on a secondary subnet such as the second network connection would be sent directly to that computer, since no Routing is needed.
    I do not understand why two Routers have the same IP Address if they are not cross-connected. That makes everything very difficult when it should be simple.

  • Time Machine: Backup folder changing size when connected to different computers

    Can someone please help me wrap my head around why the size of my Time Machine backup folder changes when connected to different computers? I tried to be as thorough as possible.  Thanks in advance for taking the time to read this.
    I made a backup of my one laptop (MacBook Pro running 10.6.8) before installing Mavericks.  The backup folder size is 258.56 GB and it is on a 1TB WD external.  There are no other computers backed up in this folder.
    Last night, I tried to copy the backup folder to another 1TB WD external and ran into the “you can’t do that” message.  After some researching, I came across articles explaining how Time Machine handles HDs and, in order for me to copy my backup folder, the drive I want to copy the folder to needs to have the “Ignore ownership on this volume” deselected.
    Okay, so here is my situation: I have the “Ignore ownership on this volume” deselected and journaling is correct on the drive I want to copy the backup folder to.  So I can continue working on my laptop, I want to use a different computer to copy the backup folder from one HD to the other.  The problem I’m having is each computer I own is showing me a different backup folder size O.o.
    (1) The computer I want to use – a Power Mac G5 Quad running 10.4.11 (non intel) – is showing a backup folder size of 592.7 MB, but the HD shows there is 258 GB being used.  When I drag copy, I only get a 592.7 MB backup folder.  For some reason, the backup folder is the only folder acting this way. I compared other folders from the same and different externals and all the sizes match up perfectly no matter the computer they were connected to. How is this possible?
    (2) My second option - Mac Pro (early 2009) running 10.9.4 – is showing a 256.15 GB backup folder size.  Very close, but not 258.56 GB.
    (3) My last option is to use the computer I’m trying to stay away from, the MacBook Pro running 10.6.8.  This is the computer I backed up and is showing me the correct folder size = 258.56GB.  As I mentioned, I'd like to work on my laptop while copying the backup folder using one of my other computers.
    I am able to drag and drop from each computer, but the folder size depends on the computer I’m using.  I don’t understand why I can't do a simple drag and drop of a 258 GB folder.
    Many thanks!!

    The directory files that you are seeing are not real. They are links to the actual backup files that are stored in a hidden directory on the drive. If you were to look at the same drive on a pc, you would see the folders and you would a list files that are in the folders but the files would all be 0 byte files and Windows will tell you the file is empty because there is nothing there but a link which Windows does not understand.
    So the point is you can't just copy the backupd files. The best solution that I know of (and maybe someone else will chime in) for copying them is to mirror the drive with something like Carbon Copy or some other program.
    See this site for more information about time machine and how it works: http://pondini.org/OSX/Home.html

  • Can I use 1 computer with 2 different iTunes accounts and devices? We're afraid we're going to wipeout one library or the other if we do??

    My son got an iPhone and wanted his own iTunes account. Now his computer died, and he wants to connect to his iTunes account on my computer. When it asks to sync the computer, a message comes up and we're afraid either his or my library are going to be wiped out by trying to do this. Is it possible to use 1 computer with 2 different iTunes accounts and devices without wiping out one of the libraries? Thanks for any info.

    If the content was not originally purchased/synced to the device from your computer it will erase and replace the content from the device with that of the computer. If you have content that you want to backup you can transfer purchases http://support.apple.com/kb/ht1848 check this link out

  • HT201250 Can I use Time Machine on two different Macs to back up to one external drive?

    Can I use Time Machine on two different Macs to back up to one external drive?
    I have one 1T Western Digital backup drive that works well with Time Machine and my MacBook Pro.  I now want to back up my wife's MacBook Air using Time Machine on her Mac and want to know if I can use the same WD external drive or if I need to get a 2nd back up drive?  If I can use one external drive for the two Macs do I need to do something special on the drive or will Time Machine do it automatically?

    Yes. You will need to configure Time Machine preferences on each computer to backup to the same drive. Note that you cannot connect the backup drive to both machines at the same time.

  • Use thinkvantage access connections to map a network drive

    Is it possible to use thinkvantage access connections to map a network drive. I have three different basic sites (home, work1, work2) with network drives that I would like to access depending on the site.
    1) I wonder if it is possible to configure thinkvantage access connections to automatically map the network resources through a connection profile?
    2) I wonder if it is possible to configure thinkvantage access connections to automatically map the network resources through a connection profile that is based on vpn connection?
    thanks in advance
    sincerely, anders

    Hi,
    directly it's not possible for Access Connection to reconfigure your network drives.
    However, there is one really cool part of Access Connection, that might be realy suitable for your situation. This part is the script/application, that can be executed when a profile gets applied.
    So for your situation I can imagine, that you create a .bat file, that contains something like this:
    net use * /DELETE /YES
    net use Z: \\computer name\share name
    The first part will delete all maped drives. The second part will establish connection that you want to use. Of course you can multiply the last part, so that you can configure multiple connections.
    Please let me know, if this helps.
    Cheers

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • I use my camera for video and photos.  When I download my videos to my ipad1 using the camera connection kit, they will not play on my ipad. Is there a way I can get them to play?

    I use my camera for video and photos.  When I download my videos to my ipad1 using the camera connection kit, they will not play.
    Does anyone know how I can make this work?

    Yvonne-
    I haven't tried videos on my camera yet.  Do you use the Videos App to play them?  I don't think they will play in the Photos App.
    If yours are in a format that is not in Vazandrew's list, you may need to sync them to your computer and convert them to M4V or MP4 format.  You can use a program like HandBrake to do the conversion.  <HandBrake>  Once converted, you can sync them back to the iPad and they should play.
    This may not meet your needs, but the alternative appears to be getting a different camera.  I don't know of another Video App that might work.
    Fred

  • ITunes Automatically Change EQ Setting Based On Which Airport Express Streaming?  I have two Airport Expresses running at my house. Both are connected to different types of speakers. Neither speaker set has its own equalizer, and both require a different

    I have two Airport Expresses running at my house. Both are connected to different types of speakers. Neither speaker set has its own equalizer, and both require a different EQ setting to sound just right. Does anyone know of a way to have iTunes automatically change its EQ setting based on which Airport Express it is streaming to?

    I'm in the same boat. I have a 6 zone amplifier running with 6 airport expresses to different rooms inside and outside the house. Each has it's own acoustic characteristics. I'd really love to be able to set each airport to equalize based on my SPL frequency sweep I did for each room.
    Setting the eq in itunes won't do it as that is global plus I have many more sources for auiod other than itunes that use the AEs directly.

  • Using same program-id in different RFC adapters

    Hi,
    I have the following question:
    Is it possible to use the same program-id in different RFC adapters for the same SAP backend?
    In gerneral, what are the naming-conventions or best practices for using program-ids for RFC adapters?
    Thanks for your answer!
    best regards,
    Hannes

    No,
    You should not use same program ID for different RFC adapters. It is recommended by SAP (check FAQ's on RFC).
    Although technically you can use but it gives you unpredictable behaviour based on connection pool.
    Regards,
    Satish

  • How to connect to different data sources in  XI 3.1 UNIVERSE?

    hi experts,
    We are going to migrate from BO 6.5 to  BO XI3.1.
    and we have different data sources to extract and generate the reports using various tools like Webi,Crystal Reports, Deski etc.
    1         How to connect to different data sources like SAP BI query, DB2, Oracle etc,, provide me the step by step solution.
    2     We need to migrate the universes and reports from BO 6.5 to BO XI 3.1 using the Report Conversion Tool.
    can we directly convert from the deski reports to Webi or do we need to migrate first through Import Wizard?
    3    Scheduling the Reports through Infoview
    4    Various issues and how to resolve those issues, we generally face while scheduling, and while creating the queries like for example time out errors etc..
    5    BO Security
    6    Universe creation with best practices and the loops,contexts,aliases etc..
    please provide me the step by step solution documents and links.
    thans in advance
    venuscm

    I would recommend to take a look at the official documentation. YOu can find this here
    http://help.sap.com
    NAvugate to SAP BusinessObjects->All products and the select the product you want eg. BusinessObjects ENterprise or Universe designer and the appropriate version XI 3.1. Take a look at the admin and the user guides.
    Currently the Data FEderator will allow you to buid a universe that access data from various data sources. Another option is to merge queries from different universes at report level.
    Regards,
    Stratos

  • How to connect two different tables from different server?

    Dear all expert,
    I need to develop a report where i need to connect 2 different tables from 2 different servers. For examples:
    BUT000 tables from CRM and KNKK from R3.
    Is it possible to do so? Because i try to link these 2 tables together and when i preview the report, it run very slow and sometime it hang. I did not get any result.
    Thank You.

    Moved to SAP Integration kit forum
    Appears you are using SAP data sources.
    And yes you can but the linked field types must match and be able to be converted into the WHERE portion of the SQL. Click on Database, Show SQL... and see if there is one. If not CR can't figure out how to so it brings all data client side and filters on the second pass.
    Thank you
    Don

  • How to use java+access connectivity without using ODBC

    Hello Sir/Madam,
    I just want to take a small help from u for using ms-access as backend to java without using the usiual jdbc:odbc bridge.
    i'll tell u the scenario which i'm facing now.
    i'm in need of sending my software(frame appl.) which uses access as backend to different agencies whom i dont even had contact. so i just dont know what is their status regarding computer knowledge, they might be data-entry-operators or of that type. so i just cant ask them to create an odbc or anything.
    so in this case is their any possibility to connect java with ms-access with out creating odbc in windows.
    please be kind to solve my problem.
    Thanking You,
    Ranjith.M

    You will need some kind of JDBC driver. And there are
    JDBC drivers available for Access that do not use
    ODBC, so you could use one of them.There are?

Maybe you are looking for

  • Trying to connect my MacBook Pro to my TV

    Hey! Hoping someone might be able to tell me how to connect my MacBook Pro to my TV. Do I need to fork out for the appletv pack are is there a simply scart or HDMI connecting lead that I can use? Will I have sound problems if I try to use a simple co

  • Stock transfer of Imported Material

    Dear Experts , I wanted to do stock transfer of import material from one plant to another under the same company code. I want to transfer the cenvat credit on taken on CVD & other cess to the receiving plant . How should I go about it. Kindly guide .

  • Cannot reinstall CS5 Master with my serial

    Hey, I bought a new MacBook Pro (yay!), and wanted to reinstall my Adobe CS5 Master installation with my current serial. But because I have a CS5 serial, I cannot find a working CS5 Master installation file, only CS5.5. How can I retrieve the correct

  • Logic 7.2.3 and Protools 7.3.1 installation questions

    I've tried to install Protools 7.3.1 but I always get different DAE-errors in Logic 7.2.3 Who is already working with Logic 7.2.3 and Protools 7.3.1 on PPC (not intel?) Is it working fine? How have you installed it? Only Protools 7.3.1 above an older

  • Got a banner on Firefox that says Cookies are turned off, turn cookies on. How do I do that?

    For the first time today a got a banner pop up when I was logging into Firefox that says Cookies is turned off, and that I should turn cookies on. Is that a valid request? How do I turn Cookies on? Old Geezer