How does one add tables to an existing universe using COM designer SDK.

Morning All
How does one add tables to an existing universe using COM designer SDK. I have tried:
objUniverse.Tables.Add (strTable_Name)
but get "Cannot create Table" error.
Any ideas?
Thanks in advance.
Anita

Hi Anita,
-Use the Add method to add classes and objects to an existing universe using a VB 6 application.
Adding a Class
Definition: Function Add(Name As String) As Class
Syntax: NameOfClassesVariable.Add
Adding an Object Instance
Definition:  Function Add(Name As String, [ClassName As String]) As Object
Syntax: NameOfObjectsVariable.Add(name, [class])
- name is the name of the object.
- class is the name of the class containing the object. This parameter should be used in cases where more than one objects exist with the same name.
Sample Visual Basic 6 Code
Dim DesApp As Designer.Application
'MODIFY AND EXPORT CLASSES AND OBJECTS OF AN EXISTING UNIVERSE
Sub modify_and_export_universe()
Dim DesUnv As Designer.Universe
Dim DesCls As Designer.Class
Dim DesObj As Designer.Object
Dim DesDBCol As Designer.DBColumn
Dim DBColName As String
Set DesApp = New Designer.Application
'Login to designer
Call DesApp.LogonDialog
'Make sure to log on with your administrator profile
'e.g : "hostname","username", "password","Enterprise"
'Make Designer application visible
DesApp.Visible = True
'This line disable warning messages from Designer
DesApp.Interactive = False
'to Open  locally  the universe you want to modify
'Set DesUnv = DesApp.Universes.Open("club_uni")
'Use OpenFromEnterprise method (Universes Class) to import a universe from the repository and opens it
Set DesUnv = DesApp.Universes.OpenFromEnterprise("Universes", "club_uni", False)
'Add a valid connection which already exists
DesUnv.Connection = "club"
'open the universe
'Call DesApp.Universes.Open("club_universe")
'Add the table Account and refresh the view in the main window
Set DesTab = DesUnv.DBTables.Item("Customer").Insert
DesUnv.ArrangeTables
'Add a class
Set DesCls = DesUnv.Classes.Add("Class MyCustomer")
'Looping through all the fields of the DB Table Account
For Each DesDBCol In DesUnv.DBTables.Item("Customer").DBColumns
'Store name of the column
    DBColName = DesDBCol.Name 
     'Add an object to the class
    Set DesObj = DesCls.Objects.Add("Obj " & DBColName)
     'Affect a field to the object
    DesObj.Select = "Customer" & "." & DBColName
Next
'Save the existing universe with the same name club_uni or you can change
DesUnv.SaveAs "club_uni"
MsgBox "Universe created and saved Class MyCustomer has been added!!"
'Close the universe
UnvFullName = DesUnv.FullName
MsgBox "The UniverseFilePath is " & UnvFullName
'Close the universe
DesUnv.Close
'This line disable warning messages from Designer
DesApp.Interactive = False
'Export the universe to the CMS DB (to the last universe folder)
'Make sure you save the universe before exporting it
Call DesApp.Universes.Export("Universes", UnvFullName)
MsgBox "This document has been exported successfully !!"
'Close designer
DesApp.Quit
Set DesApp = Nothing
End Sub
Hope this helps.
Regards,
Deepti Bajpai

Similar Messages

  • How does one add a personal recorded M4R file to the ring tones in the UK system for iPhone 3GS

    How does one add a personal recorded M4R file to the ring tones in the UK system for iPhone 3GS.
    I have tried all sorts of ways of adding my personal M4R file but can't find the place (within the UK versions of iTunes} to transfer this file so that I can select it as a ring tone.
    I've tried also changing to the US version of iTunes and still can't find a way of doing it, although I have heard that it can be done.

    You should be able to just drop it into the library within iTunes.
    http://cnettv.cnet.com/create-free-iphone-ringtones-using-itunes-8-0/9742-1_53-5 0003920.html
    Check out the video above for a lot good info. The ringtone must be less than 35 seconds.

  • A simple percentage? How does one add a percentage to a number? If I have 100 and I want to add 15% and get a total, what formula would I use?

    How does one add a percentage to a number? If I have 100 and I want to add 15% and get a total, what formula would I use?

    You can do something like this:
    D2=B2*(1+C2/100)
    this means in the cell D2 type the following "=B2*(1+C2/100)"... leave out the double quotes

  • How does one add folders to the E-mail App?

    How does one add folders to the E-mail App?

    Select your email under Account, tap Edit at the top then New Mailbox at the bottom. This will only work if you have an IMAP email account.

  • How does one add a photo gallery to my web site in Dreamweaver CS5 and have the link recognized as a destination file?

    How does on add a photo gallery to a web site in Dreamweaver CS5 and have the file folder which contains the photos, recognized as the "go to location" for the link up?

    Ok.  So Photos1.htm is the main gallery page.
    And it looks like you have sub-folders with images in them like these from 2011 and 2010
    LLA Picnic 2011/
    photos 2010/
    Have you defined a site in DW yet?   That's a critical first step in getting DW to recognize your site's links and other assets.  See video below:
    GS-01: Defining a new site | Learn Dreamweaver CS5 & CS5.5 | Adobe TV
    Nancy O.

  • How does one install non-English character sets for use with the "find" function in Acrabat Pro 11?

    I have pdf files in European languages and want to be able to enter non-English characters in the "find" function. How does one install other character sets for use with Acrobat Pro XI?

    Have you tried applying the update by going to Help>Updates within Photoshop Lightroom?  The update should be using the same licensing?  Did you perhaps customize the installation location?  Finally which operating system are you using?

  • How can I add table fields with existing structure ?

    I like to add PSTLZ field to stucture KOMGG.Is it possible to add table field with the existind structure.If yes how can I do this?kindly help me on this.

    hi
    go to se11
    in change mode select the button append
    create new append which starts from Zpstlz in this komgg structure and add data element and domain to this field and activate with request number
    then in field catalogue this field should be visible ,here ends your append
    now it is ready to use in condition tables.
    reward if helps !!!!!

  • How does one add hyperlinks to images in Mail signatures?

    Greetings esteemed Mac boffins,
    How do I add hyperlinks to images that I have added to signatures in Mac Mail?
    There seems to be no option for it.
    Regards,
    Ryan

    It's just not working for me.  I can't figure it out.
    As you can see in the screenshot, I have the icon selection and when I go to the "add link" menu item, it's greyed out.
    I have provided 2 screenshots for reference.

  • How does one add compilation CD's already mixed by the same artist.  I want to put them in their OWN spot under the artist and I want to NAME the album.  Is it possible?  Or am I just out of luck.  I've tried everything.

    I want to find out how to add my mixed CD's under the folder of the artist.  I want to save them on my computer in itunes.  I want to NAME the album, but so far I haven't been able to do that.  I named ONE and then ALL the rest of the CD's I am trying to save are put in the same place.  Very frustrating.
    These are mixed Christmas songs done by the same artist, and some are the same songs.  But the albums are separate.  Why can't I give an album I am exporting a name?

    Indeed, generally all you need to do is fill in an appropriate Album Artist. For more details see my article on Grouping Tracks Into Albums, in particular the topic One album, too many covers.
    Don't try to use sort fields to merge different things together as it quickly goes wrong. These should be used consistently to make all things with one value sort as if they had a different one, e.g. Bowie, David to make David Bowie sort under B.
    tt2

  • How does one add a device to ColorSync Utility

    I was wondering how one can add a "device" to ColorSync Utility? It seems all my "other" devices are showing up, such as my printer (which also has scanning capabilities).  However, I'm not seeing my i800 Microtek Scanner, "renamed" as ScanPotter anywhere, yet IS in my "Utilities" folder, and no doubt this could be the reason why everytime I scan a photo from a print, negative or slide I'm getting annoying "pop-ups" to install Xll Quartz, which IS already installed.  Also I plan to install the new PhotoElements 11...am I going to have a problem with that as well

    Maybe it needs to be in Applications?

  • In Garageband, how does one add silence between multiple music sections on 1 single track?

    Currently I have a bunch tracks that need to be exported in order for the mixing engineer to mix in his Protools program.
    Problem: I did a lot of cutting and pasting with in the tracks. So there are spaces in a track that need silence added, so that when I export them into protools, all the tracks start at 0 (Time) and end at 3 minutes and 54 seconds.
    What is the most efficient way to add this silence and ensure that every track is 3 minutes and 54 seconds long?

    The duplication is unnecessary. Exporting creates a duplicate of the file. So now you'll have a duplicate of a duplicate. Exporting is not "working on" a file.
    No it's not merging, it's exporting from one to the Finder and into another. No matter what lose something. If you export the Original you leave behind all the work you've done in iPhoto. If you export anything else, you lose the non-destructive editing and the ability to revert to the original. With merging you preserve that work. Yes, you can trash the old Library when you have completed the manoevre but no it's not the same thing as merging.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue. But in brief:
    Current gets you the iPhoto Preview, used for sharing via media browsers. It's a jpg, medium quality missing metadata. Original gets the file you imported, unchanged and then you can export different version of the current version at different qualities. If you choose to export anything except the Original you do not get a Raw. There's no such thing as an "edited Raw", and you lose the connection between the original and the exported version. That means you've taken a non-destructive workflow and turned it into a destructive one.
    The Tiff will certainly be higher qulaity and less likely to suffer generational loss in future editing but the file sizes are vast, often more than 10 times the size of the jpeg.
    Put it this way, it would be cheaper to buy Library Manager than the disk you'll need to contain all the Tiffs. Unless you plan on a lot of editing, I'd go for a high quality jpeg as a reasonable compromise.
    To be clear:
    So, I guess my new question is, how can I edit the Raw image and keep it in a RAW format that IPhoto recognizes so that I can reprocess without any loss at a future time, or is it that once you edit a RAW image, then it is no longer a RAW image?
    Once you edit a Raw it can no longer be a Raw. End of.

  • How does one add artwork manually?

    In the good old days, you could drag it to the artwork box that seems to no longer exist. I've tried Get Info and then copy & paste to the artwork box - it doesn't take. Also, the artwork tab will be either non-existent or grayed out. Any other ideas?

    First, your profile (last line in your post above) indicates an old version of iTunes, and an old version of OS X.  So I don't know if what I'm about to suggest existed when these versions were current.
    Second, graying out that you observe may indicate an ownership issue.  Perhaps your login ID does not own the files, or your Apple ID does not own rights to the music.
    But if all were well and all were current, you would see an "Add Artwork" button at the bottom once you did a "Get Info" and looked on the artwork tab:

  • How does one add a chart to a Keynote theme

    I have been studying how to create Keynote themes. I have been able to learn how to do a lot but I have not been able to figure out how to add a chart to a master slide.
    I am not sure if this is possible.
    I have found a chart in a deck I have and would like to add it to a slide master. I see some of the commercial themes have charts as part of the theme master slide set.
    I cannot figure out how to add this chart as an "object" on a master so I do not have to go through the steps each time I want to use the formating attributes.
    Related: on the Inspector Menu for Master Slides there is a check box for Object Placeholder. What is that for?
    Rob

    Maybe it needs to be in Applications?

  • How does one add a caption to an image?

    New to iphoto. Can't figure out how to add a caption an image. Any help out there?

    Sorry I forgot to read your mind before answering - hard to answer questions that are not ask
    You can export using the title as the filme or it can be included in the EXIT & IPTC data - check the include title and keywords box
    See the user tip on exporting for all export options
    LN

  • How does one copy tables, views, etc. from one database to another?

    I do not have a strong DBA background but have been placed in charge of updating and migrating a number of tables and views across multiple databases.
    For the future I need a better workflow than exporting and importing tables to/from .csv files and copy and pasting the SQL from each individual view.
    Can somebody point me in the right direction? I'm happy to do some reading but have no idea where to look.

    The Export utility provides a simple way for you to transfer data objects between Oracle databases, even if they reside on platforms with different hardware and software configurations.
    When you run Export against an Oracle database, objects (such as tables) are extracted, followed by their related objects (such as indexes, comments, and grants), if any. The extracted data is written to an Export file.
    To use Export, you must run the script catexp.sql or catalog.sql (which runs catexp.sql) after the database has been created,Ensure there is sufficient disk or tape storage to write the export file,Verify that you have the required access privileges.
    Interactive Export Prompts
    If you prefer to let Export prompt you for the value of each parameter, you can use the following syntax to start Export in interactive mode:
    exp username/passwordExport will display commonly used parameters with a request for you to enter a value. This method exists for backward compatibility.
    let me know if you have any further query!

Maybe you are looking for