Mapping: Fitting managers into rooms ?

Hello All, The below map is disinclined to acquiesce to my request; translation: itz knot verkin.
I'm trying to fit the 'managers' in the source into 'room's in the target. Assuming a max of 4 rooms, I want them filled up with 4 managers per room (with some rooms remaining empty and not showing up in the target).
I'm learning how to map currently. Thanks for your help.
SOURCE:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:s2 xmlns:ns0="urn://maptest">
  <managers>
    <personalID>PID001</personalID>
    <personalID>PID002</personalID>
    <personalID>PID003</personalID>
    <personalID>PID004</personalID>
    <personalID>PID005</personalID>
    <personalID>PID006</personalID>
    <personalID>PID007</personalID>
  </managers>
</ns0:s2>
MAPPING:
After the map runs, the target produced SHOULD look as follows:
TARGET:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:t2 xmlns:ns0="urn://maptest">
  <room>
    <personalID>PID001</personalID>
    <personalID>PID002</personalID>
    <personalID>PID003</personalID>
    <personalID>PID004</personalID>
  </room>
  <room>
    <personalID>PID005</personalID>
    <personalID>PID006</personalID>
    <personalID>PID007</personalID>
  </room>
</ns0:t2>
In the source, managers is 1..1, while personalID is 0..unbounded.
In the target, room is 0..4, while personalID is 1..4.
Thanks, Bhishma

Dude,
I'm in the final phase of the project where I don't get much  to do, so I spend the whole day studying new stuff. =D
Your example sure was a hell of an exercise on XSLT.
Try this mapping on your scenario.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="urn://maptest">
     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
     <xsl:param name="managers"/>
     <xsl:template match="/">
          <xsl:param name="managers" select="//personalID"/>
          <ns0:t2>
               <xsl:call-template name="rooms">
                    <xsl:with-param name="managers" select="$managers"/>
               </xsl:call-template>
          </ns0:t2>
     </xsl:template>
     <xsl:template name="rooms">
          <xsl:param name="managers"/>
          <xsl:call-template name="add_room">
               <xsl:with-param name="managers" select="subsequence($managers, 1, 4)"/>
          </xsl:call-template>
          <xsl:if test="not(empty(subsequence($managers, 5)))">
               <xsl:call-template name="rooms">
                    <xsl:with-param name="managers" select="subsequence($managers, 5)"/>
               </xsl:call-template>
          </xsl:if>
     </xsl:template>
     <xsl:template name="add_room">
          <xsl:param name="managers"/>
          <room>
               <xsl:for-each select="$managers">
                    <xsl:copy-of select="."/>
               </xsl:for-each>
          </room>
     </xsl:template>
</xsl:stylesheet>

Similar Messages

  • Problems mapping 2 messages into 1

    Hi.
    I'm facing a problem mapping 2 messages into 1.
    I have a BPM that has 2 abstract messages. In a transformation step, i transform this two messages into one but when i check the IDOC that finally has arrived to R3 backend, the fields that belogns to one of the source messages doesn't appear.
    In message mapping i select the two source messages and the target message and the same in interface mapping.
    Because is a transformation step inside the BPM, i can't see in SXI_MONITOR what's happening.
    any idea of what's happening?
    Regards.
    Inigo.

    Inigo,
    Though its in BPM u can where well test the transformation mapping
    wht are the messages going in what is coming out
    Check How to monitorcc BPM
    https://websmp206.sap-ag.de/~sapdownload/011000358700003141152005E/HowToMonitorccBPM.pdf
    This PDF is very handy
    Regards
    Kavitha

  • My lightening charger is not fitting snug into the charging port

    Hello. I am having trouble with the lightening charger for my iPhone 5. When I plug it in, the phone makes the sound that it always does, indicating that it is charging. Then, it starts making the noise over and over. The lightening charger is not fitting snug into the charging port. I tried cleaning it out and got a big ball of lint out, but the issue remains. It is hard to get a charge, I have to place my phone down and finagle the lightening cord so that it will charge. I have a Genius Bar appointment, but it isn't until the end of the week. Does anyone have any suggestions? I'm also having this issue with my car charger, so I know its not the lightening cord that came with the phone that is causing the problems.

    Make a Genius Bar appointment before you make the drive.

  • How to fit SSD into my laptop?

    I have an SSD.  I want to get it into my laptop.  I have a Pavillion DV6 3216-us, and I also have an SSD, can't find it on google, but it has a internal half-mini PCI-e connection.  I don't really know how I am supposed to get this into my laptop, as I can't seem to find a adapter to make it SATA to replace my current hard drive.  If you guys could help me out, I would appreciate it.  Also, I'm not too good with these things, like the adapters and compatibility between things.  Thanks.

    hayd3nd wrote:
    I have an SSD.  I want to get it into my laptop.  I have a Pavillion DV6 3216-us, and I also have an SSD, can't find it on google, but it has a internal half-mini PCI-e connection.  I don't really know how I am supposed to get this into my laptop, as I can't seem to find a adapter to make it SATA to replace my current hard drive.  If you guys could help me out, I would appreciate it.  Also, I'm not too good with these things, like the adapters and compatibility between things.  Thanks.
    This kind of solid state drive is not compatible with the laptop. Even if you can fit it into an adapter (haven't found any), the BIOS may not to detect it. Sell the ssd and buy a typical SATA II one..
    Dv6-7000 /Full HD/Core i5-3360M/GF 650M/Corsair 8GB/Intel 7260AC/Samsung Pro 256GB
    Testing - HP 15-p000
    HP Touchpad provided by HP
    Currently on Debian Wheeze
    *Please, help other users with the same issue by marking your solved topics as "Accept as Solution"*

  • Fitting image into a custom outline?

    Hey, I recently started using Illustrator and Photoshop, and I need some help.
    So I have an image that just uploaded. I would like to make that image fit perfectly into a shape.
    For example, lets say I have a picture of a patch of grass, and an outline of a small hill. I want that patch of grass to be inside the outline of small hill and then I can stretch and edit and fit it perfectly.
    Is there any way I can do that? If not on Illustrator on photoshop.
    Also, I have an image that I uploaded of a an oversized jacked that I want to make slimmer, is there anyway way to do that? I used liquify but it turned out really weird.
    Thanks in advance.

    You should first make clear if you are doing stuff in Photoshop or in Illustrator. This forum is about Illustrator, so people assume you are using it. And while there are concepts that work in both, you still need to do it differently.
    Second: please read the documentation or you won't understand a word of what people are trying to tell you. There is ne easy recipe in complex software.
    Illustrator CC tutorials | Learn how to use Illustrator CC
    Photoshop CC tutorials | Learn how to use Photoshop CC
    Photoshop for Beginners

  • Will the Arctic Cooling Accelero S2 fit well into the G5 case?

    Before I buy Accelero S2 I would like to know if anyone has had success installing one of these in a G5. When I went to a forum to read about them everyone was putting them into PCs so it would be comforting to know if G5 users had success as well.
    Also if the product is listed under VGA does that mean it won't work on a DVI graphics card? I heard that DVI is a more advanced version of VGA does that mean that both VGA and DVI would be compatible with the Accelero S2? I am pretty sure that they usually have DVI and VGA both available on most graphics cards so it seems like it would be a non issue.

    Do you have room to allow it to fit? It works in Mac Pro which uses PCI Express, and VGA is just any video graphics card.
    http://www.arctic-cooling.com/vga2.php?idx=147
    See the pdf "Please check your card with the height restriction drawing to assure compatibility."
    Photos of installation on Mac Pro with Nvidia 8800GT or 3870:
    http://www.xlr8yourmac.com/Graphics/8800GTAcceleroS1/8800GTAcceleroS1R2.html
    Or this:
    http://www.xlr8yourmac.com/Graphics/8800GTThermalrightHR-03.html

  • Script error message when printing google maps driving direction into PDF

    My system; Win 7/ 64bits/IE 9 both 32 and 64 bits/Adobe Acrobats 10.1.1. Pro
    Intial problems in printing web sites into PDF files has been resolved when I upgraded into 10.0.1 after having installed IE9.
    However, with 10.1.1. version, I noticed that when I tried to convert google maps results for a driving direction (From A to B), script error message showed up and I could not convert it into PDF. I tried both IE 9 32bits and 64 bits version, but both failed to do it. Please fix the problem for the next updates.
    Thanks

    You might try running CHKDSK on the disk to where you try to save the file. You might have a corrupted file directory or a damaged track on that disk. I urge you to backup what you can before trying this.
    Ken F.

  • Unable to upload/download large html files(71 MB) into  rooms

    Hi,
        I am unable to upload download HTML file(71 MB)into folders of collabration rooms.if it is uploaded also its getting Scripted/corrupted.
    other files are working properly.
    Is it because of large size or any other configuration settings.there is no error msg buts its getting scripted.
    Waiting for your response
    Thanks
    Amit kumar Koyal

    Hi Kerstin,
    the note also says: "This restriction is no longer valid".
    With SP19 I do run tests continously that test content up to 2GB.
    Amit: What portal version are you running? What repository implementation is the file stored in? If the file is stored in a file system, what is it's file size limitation?
    Regards,
    Michael

  • Mapping 2 messages into 1 using BPM

    hello
    I have a BPM tha recieve 2 messages, and combine them into 1 message. I would like to know how can I map the 2 messages into 1.
    more over, is there a way to decide the value of the attribute for the mapping? (for example, if in one of the messages I have attribute value=4, and when mapping it I want 4 to be translated to write Mr. if the value was 3, I would like the value to be Miss, etc.
    Thanks
    Kfir

    Hi Kfir.
    As I understand your requirement, you want to combine two messages into one.
    If both of the messages have the same structure, then, in BPM, you can use a while loop which contains the receive step followed by the container step into which the messages will be collected. You can use "APPEND" option in the container step. After the while loop, use a transformation step and then followed by the send step.
    Now for the loops, you can go with a Time-Dependent, Message-Dependent or Payload-Dependent Loops. Now, that depends on your business requirement.
    For this scenario to work, you need to create a correlation, for which the two incoming messages should have one field in common and also should contain the same value. Else, it would fail.
    If that is not the case, then in the correlation, define a constant and set it's value to 1 for both of the messages. This will make it work.
    Check out the Integration Processes BPMPatternCollectTime, BPMPatternCollectPayload, BPMPatternCollectMessage under the http://sap.com/xi/XI/System/Pattern of the SAP BASIS Software component.
    I think this would give you an idea.
    Regards,
    Hari.

  • How to fit 5110 into car cradle in '01 Mercedes Be...

    I've just bought a secondhand '01 MB E320 which the owners manual tells me is set-up to take a Nokia 5110 so that hands free calls can be made via the in built Sat Nav system. I purchased a Nokia 5110 on eBay, it perfectly
    matches the pictures in the MB owners manual, the ID in the back of the phone (under the battery) verifies that it is indeed a model 5110.
    Problem: The phone won't fit the cradle:
    The connector pins match, the shape of the cradle recess is the same as the phone, but the stubby ariel prevents the top end of the phone from sitting down into the cradle recess. I've confirmed the car hasn't been modified, it's the original phone cradle that was put into the car at build !
    Any suggestions on a remedy?

    Hi naida
    I wonder whether as factory fitted cradle utilizes inbuilt antemma on the car instead of the phone's stub aerial.
    At the back of the 5110 below the antenna there is a connector for an external antenna. The connector may be protected by a rubber cap. If it is, first remove the cap before inserting phone in car cradle.
    Please see page 31 of the user manual.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Macbook topcase doesn't fit well into macbook.

    I just recently installed a new topcase on my MacBook 2.0ghz and I noticed around the edges that there are small openings. like little cracks were I can almost peer into the computer. Why is that? is there something I need to do?

    You probably bent the case when replacing the top case, and so now it doesn't fit as seamlessly as it should.
    Good news is that it's purely cosmetic and shouldn't affect the running of your system. So just do your best to ignore it.

  • Mapping of AMR into SAP????

    Hi all..
    could any one tell, how to map automatic meter reading device into SAP????? what are the specifications have to be taken into consideration???

    Hi Vipin,
    Though your query is very old but I accidentally stumbled upon it & thought to share my understanding from AMI integration perspective.
    The reads from a smart meter e.g. centron meters from itron are passed at regular intervals to head end ( e.g. TMS - Transaction Management System  from GE or OWCE - Open Way Collection Engine from itron). Head End pass these reads to IEE MDUS ( Itron Enterprise Edition -  meter data management system . On the meter reading due date for a particular portion/ MRU , a read request is sent to IEE MDUS who in turn sends the same to SAP through a batch job.
    From a technical perspective, ESB is the middleware from HE to MDUS and from MDUS to SAP /PI. There are SAP standard webservices e.g. SmartMeterMeterReadingDocumentERPBulkCreateRequest_Out as the interfaces.
    Thanks,
    Ajay

  • Fit video into an image in iMovie

    Hi,
    I have a recorded video of an iOS app that I would like to insert into a static image representing the iPhone border. How can I do this in iMovie? I've added the video to a project, then added the photo as an overlay but the video is bigger that the frame where I want the video to be displayed.
    On this screenshot, I want the video to me resized to fit into the pink rectangle
    cheers,
    Tex

    You can do a close up with the crop tool. You can adjust the color on entire frames, but you cannot adjust the color on just the eyes.

  • Map Excel worksheet into Oracle tables repository

    I am new to VB2005. I am working on VB code that can map(read) any table from excel worksheet and load it into Oracle table. Oracle table that I have are: 1)META_OBJECTTYPES(OBJECTTYPEID pk,OBJECTTYPENAME,OBJECTTYPEDESC, OBJECTMETATYPE,OBJECTDOMAIN).
    2) META_OBJECTS(OBJECTKEY PK,OBJECTTYPEID FK,OBJECTNAME,OBJECTDESC).
    3)META_OBJECTDEPENDENCIES(SRCOBJECTKEY FK, TGTOBJECTKEY FK,DEPENDENCYTYPE PK)
    4)META_OBJECTATTRIBUTES((OBJECTKEY FK, OBJECTATTRNAME PK,OBJECTATTRVALUE). NOTICE META_OBJECTTYPES IS PARENT TO META_OBJECTS AND META_OBJECTS IS PARENT TO (META_OBJECTDEPENDENCIES AND META_OBJECTATTRIBUTES) AND ALL PARENT HAS 1 TO MANY REALTIONSHIP TO CHILD TABLES. For example I have employee table in Excel worksheet that has two columns employee_id number, employee_name varchar2(50) I need my vb code map table name employee with its 2 columns into my 4 tables that I have in Oracle repository,
    My code so far just insert values into oracle tables in repository, but what is require is mapping table with contents into oracle tables.
    Imports System
    Imports System.Data ' VB.NET
    Imports Oracle.DataAccess.Client ' ODP.NET Oracle data provider
    Imports Excel = Microsoft.Office.Interop.Excel
    Public Class Form1
    'System.Data.OracleClient lets you access Oracle databases.
    Public con As System.Data.OracleClient.OracleConnection = New System.Data.OracleClient.OracleConnection() 'Oracle.DataAccess.Client.OracleConnection()
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim xlApp As Excel.Application
    Dim xlWorkBook As Excel.Workbook
    Dim xlWorkSheet As Excel.Worksheet
    Dim range As Excel.Range
    Dim rCnt As Integer
    Dim cCnt As Integer
    Dim Obj As Object
    xlApp = New Excel.ApplicationClass
    xlApp.Visible = True
    xlWorkBook = xlApp.Workbooks.Open("c:\employee.xls")
    xlWorkSheet = xlWorkBook.Worksheets("sheet1")
    range = xlWorkSheet.UsedRange
    For rCnt = 2 To range.Rows.Count
    For cCnt = 1 To range.Columns.Count
    Obj = CType(range.Cells(rCnt, cCnt), Excel.Range)
    MsgBox(Obj.value)
    Next
    Next
    xlWorkBook.Close()
    xlApp.Quit()
    releaseObject(xlApp)
    releaseObject(xlWorkBook)
    releaseObject(xlWorkSheet)
    End Sub
    Private Sub releaseObject(ByVal obj As Object)
    Try
    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
    obj = Nothing
    Catch ex As Exception
    obj = Nothing
    Finally
    GC.Collect()
    End Try
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    '2.Specify connection string
    con.ConnectionString = ("Data Source=dprod;User Id=smughrabi; Password=Sul9966")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "insert into meta_objecttypes values (4,'TABLE', 'TABLES','ERstudio','Demo')"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    cmd.CommandText = "commit"
    cmd.ExecuteNonQuery()
    'Catch ex As Exception
    '4.display if any error occurs
    'MsgBox(ex.Message, Microsoft.VisualBasic.MsgBoxStyle.Exclamation, "OraScan")
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    If TableName.Text = "" Then
    MsgBox("Please enter the tablename", MsgBoxStyle.Exclamation, "OraScan")
    Exit Sub
    End If
    MsgBox(TableName.Text, MsgBoxStyle.Exclamation, "OraScan")
    '2.Specify connection string
    con.ConnectionString = ("Data Source=gema;User Id=dare; Password=rtae")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "select * from user_objects where object_name='" + UCase(TableName.Text) + "' and object_type='TABLE'"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    'cmd.CommandText = "commit"
    'cmd.ExecuteNonQuery()
    MsgBox("Command executed successfully", MsgBoxStyle.Exclamation, "OraScan")
    'Catch ex As Exception
    '4.display if any error occurs
    'MsgBox(ex.Message, Microsoft.VisualBasic.MsgBoxStyle.Exclamation, "OraScan")
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TableName.TextChanged
    End Sub
    End Class

    Thanks Lyndon, what I need is map any table someone create in Excel worksheet to Oracle repository.For example to map Excel worksheet(employee)table with its 2 columns to oracle table META_OBJECTTYPES(OBJECTTYPEID pk,OBJECTTYPENAME,OBJECTTYPEDESC, OBJECTMETATYPE,OBJECTDOMAIN). In my case I have 2 objecttypes 1)table(employee) and 2nd columns:employee_id,employee_name
    --for inserting table info manually into DB:
    INSERT INTO META_OBJECTS
    (OBJECTKEY, OBJECTTYPEID,OBJECTNAME,OBJECTDESC)
    VALUES
    (META_OBJECTS_SEQ.NEXTVAL,
    4, --TABLE  
    'employee',--notice this is table name from Excel worksheet
    'Table to store employee info')
    --for inserting columns info:
    INSERT INTO META_OBJECTS
    (OBJECTKEY, OBJECTTYPEID,OBJECTNAME,OBJECTDESC)
    VALUES
    (META_OBJECTS_SEQ.NEXTVAL,5,'employee_id or name','employee column')
    notice above I insert manually Excel worksheet employee table with its two cols into oracle meta_objecttypes. What I want is VB to do this I mean if I go to Toad and erase what I insert in meta_objecttypes when I run vb, the program should map table employee with its 2 cols to Toad(DB). I hope it is clear now. Please refer to 1 st post for 3 other tables in DB

  • Map Excel worksheet into Oracle tables in repository

    I am new to VB2005. I am working on VB code that can map(read) any table from excel worksheet and load it into Oracle tables. Oracle tables that I have are: 1)META_OBJECTTYPES
    (OBJECTTYPEID pk,OBJECTTYPENAME,OBJECTTYPEDESC, OBJECTMETATYPE,OBJECTDOMAIN).
    2) META_OBJECTS(OBJECTKEY PK,OBJECTTYPEID FK,OBJECTNAME,OBJECTDESC).
    3)META_OBJECTDEPENDENCIES(SRCOBJECTKEY FK, TGTOBJECTKEY FK,DEPENDENCYTYPE PK)
    4)META_OBJECTATTRIBUTES
    (OBJECTKEY FK, OBJECTATTRNAME PK,OBJECTATTRVALUE).
    NOTICE META_OBJECTTYPES IS PARENT TO META_OBJECTS AND META_OBJECTS IS PARENT TO (META_OBJECTDEPENDENCIES AND META_OBJECTATTRIBUTES) AND ALL PARENT HAS 1 TO MANY REALTIONSHIP TO CHILD TABLES. For example, I have employee table in Excel worksheet that has two columns employee_id number, employee_name varchar2(50) I need my vb code map table name employee with its 2 columns into my 4 tables that I have in Oracle table repository,
    My code so far just insert values into oracle tables in repository, but what is require is mapping table with contents into oracle tables. If my expanation isn't clear plz let me know.
    Imports System
    Imports System.Data
    Imports Oracle.DataAccess.Client '
    Imports Excel = Microsoft.Office.Interop.Excel
    Public Class Form1
    'System.Data.OracleClient lets you access Oracle databases.
    Public con As System.Data.OracleClient.OracleConnection = NewSystem.Data.OracleClient.OracleConnection()
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim xlApp As Excel.Application
    Dim xlWorkBook As Excel.Workbook
    Dim xlWorkSheet As Excel.Worksheet
    Dim range As Excel.Range
    Dim rCnt As Integer
    Dim cCnt As Integer
    Dim Obj As Object
    xlApp = New Excel.ApplicationClass
    xlApp.Visible = True
    xlWorkBook = xlApp.Workbooks.Open("c:\employee.xls")
    xlWorkSheet = xlWorkBook.Worksheets("sheet1")
    range = xlWorkSheet.UsedRange
    For rCnt = 2 To range.Rows.Count 'rows in Excel start from row2
    For cCnt = 1 To range.Columns.Count 'column in Excel start from col1
    Obj = CType(range.Cells(rCnt, cCnt), Excel.Range)
    MsgBox(Obj.value)
    Next
    Next
    xlWorkBook.Close()
    xlApp.Quit()
    releaseObject(xlApp)
    releaseObject(xlWorkBook)
    releaseObject(xlWorkSheet)
    End Sub
    Private Sub releaseObject(ByVal obj As Object)
    Try
    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
    obj = Nothing
    Catch ex As Exception
    obj = Nothing
    Finally
    GC.Collect()
    End Try
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    '2.Specify connection string
    con.ConnectionString = ("Data Source=gema;User Id=dare; Password=rtae")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "insert into meta_objecttypes values (4,'TABLE', 'TABLES','ERstudio','Demo')"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    cmd.CommandText = "commit"
    cmd.ExecuteNonQuery()
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    If TableName.Text = "" Then
    MsgBox("Please enter the tablename", MsgBoxStyle.Exclamation, "OraScan")
    Exit Sub
    End If
    MsgBox(TableName.Text, MsgBoxStyle.Exclamation, "OraScan")
    '2.Specify connection string
    con.ConnectionString = ("Data Source=gema;User Id=dare; Password=rtae")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "select * from user_objects where object_name='" + UCase(TableName.Text) + "' and object_type='TABLE'"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    'cmd.CommandText = "commit"
    'cmd.ExecuteNonQuery()
    MsgBox("Command executed successfully", MsgBoxStyle.Exclamation, "OraScan")
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TableName.TextChanged
    End Sub
    End Class

    Don't know if this will help you or not, but I have some code that will read from and Excel spreadsheet and put the data into a DataSet (i'm sure something else could be used).
    string connectionString =
    @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\\testRead.xls;Excel 12.0;HDR=YES;IMEX=1";
    DbProviderFactory factory =
    DbProviderFactories.GetFactory("System.Data.OleDb");
    DbDataAdapter adapter = factory.CreateDataAdapter();
    DbCommand selectCommand = factory.CreateCommand();
    selectCommand.CommandText = "SELECT * FROM [dogs$]";
    DbConnection connection = factory.CreateConnection();
    connection.ConnectionString = connectionString;
    selectCommand.Connection = connection;
    adapter.SelectCommand = selectCommand;
    DataSet cities = new DataSet();
    adapter.Fill(cities);
    GridView1.DataSource = cities;
    GridView1.DataBind();
    Your provider might be different; the one above is for Office 2007. The [dogs$] in the selectCommand.commandText is the name of the worksheet in Excel.
    Hope this helps

Maybe you are looking for

  • Computer library shows up... but just loads forever

    I've seen multiple people saying that their home sharing no longer works, since the last updates. I can still access my itunes library and see all the content, but when I try and play anything... it gets stuck loading. Any ideas? I've restarted both

  • I need help making this shape.

    I made this shield in PS. The edges are very rough. Can you help teach me how to make the edges smoother? Here is what i did: I made the left half of the shield with the pen tool. I then used paths and click on load path as selection. I filled the se

  • PIX authorization issue with TACACS+

    I have setup on a network PIX firewall(ver 6.3(5). aaa-server TACACS+ (inside) host 172.20.67.153 cisco123 aaa accounting telnet console TACACS+ LOCAL aaa authentication telnet console TACACS+ LOCAL aaa authorization commands TACACS+ I could able to

  • After Effects error : layer does not have a source.

    Hi All,           I add a Text layer and then add my custom fill  effect to it. Then I call AdvItemSuite1()->PF_ForceRerender(in_data, &(params[0]->u.ld)) from AEGP for all the layers. But only for Text layer, AE pops up a dialog displaying the follo

  • How to kill feedback loop?

    I'm working on a project - no files are selected for recording, but there is feedback always on that's driving me nuts. Sorry, novice user here and I can't find a clue in the manual. Any idea?