<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accessing SQL Server form SAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156967#M455817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If your sap application server is unix/aix&lt;/P&gt;&lt;P&gt;(and not a microsoft OS),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. then this kind of secondary databse connection,&lt;/P&gt;&lt;P&gt;to MS SQL (which is microsoft system),&lt;/P&gt;&lt;P&gt;is at present not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(BCOS the required system files, for such&lt;/P&gt;&lt;P&gt;cross - platform connection is not delivery by sap)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Apr 2007 07:37:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-03T07:37:58Z</dc:date>
    <item>
      <title>Accessing SQL Server form SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156964#M455814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get data on SQL Server from SAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the procedure to do the above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 07:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156964#M455814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T07:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing SQL Server form SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156965#M455815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; in the SAP HELP Content,followthe instructions for Tutorial 2: Accessing SQL Server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;also take  alook at this presentation&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2e81685c-0701-0010-0eb3-918c6d56783a" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2e81685c-0701-0010-0eb3-918c6d56783a&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below: is the Tutorial 2 instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this tutorial you will create a portal component that retrieves and displays information from an MS SQL Server database. Your portal component will display information from the Northwind Categories table in a SAP NetWeaver .NET Table control. You will create a dataset to fill with the data and bind the Table control to this dataset to display data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: using a dataset is one of the data access options, which is not always recommended. You will use a dataset in this tutorial for the simplicity. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To complete this tutorial, you need: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Access to a MS SQL Server with valid permissions for the Northwind sample database &lt;/P&gt;&lt;P&gt;Access to a running portal &lt;/P&gt;&lt;P&gt;A portal user account with administrator's permissions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tutorial is split into a number of smaller pieces: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section 1. Creating the SAP Portal Application project &lt;/P&gt;&lt;P&gt;Section 2. Creating and configuring the dataset &lt;/P&gt;&lt;P&gt;Section 3. Adding the SAP NetWeaver Table control and binding it to the data &lt;/P&gt;&lt;P&gt;Section 4. Adding code to fill the dataset and display the data &lt;/P&gt;&lt;P&gt;Section 5. Viewing the component in the portal &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section 1.&lt;/P&gt;&lt;P&gt;=========================================================&lt;/P&gt;&lt;P&gt;Creating the SAP Portal Application Project&lt;/P&gt;&lt;P&gt;On the File menu, point to New, and then click Project. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In the New Project dialog box, do the following: &lt;/P&gt;&lt;P&gt;(a)In the Project Types pane, choose Visual C# Projects or Visual Basic Projects. &lt;/P&gt;&lt;P&gt;(b)In the Templates pane, choose SAP Portal Application. &lt;/P&gt;&lt;P&gt;(c)Specify a different name and location, or accept defaults. &lt;/P&gt;&lt;P&gt;(d)Click OK. &lt;/P&gt;&lt;P&gt;A new SAP Portal Application project is created at the specified location. A new portal component named PortalComponent1.ascx is added to your project automatically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section 2.&lt;/P&gt;&lt;P&gt;=========================================================&lt;/P&gt;&lt;P&gt;Creating and Configuring the Dataset&lt;/P&gt;&lt;P&gt;Prior to creating a dataset, you need to create and configure the data connection and data adapter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create the data connection and data adapter&lt;/P&gt;&lt;P&gt;1. From the Data tab of the Toolbox, drag an SqlDataAdapter object onto your portal component form. Data Adapter Configuration Wizard will help you create both the connection and the adapter. &lt;/P&gt;&lt;P&gt;2. In the wizard, do the following: &lt;/P&gt;&lt;P&gt;2(a)In the Choose Your Data Connection pane, create or select an existing connection to the SQL Server Northwind database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important: when you configure the database connection, select the option Use a specific user name and password for server logon information. If your password is not blank, select the Allow to save password checkbox, and then select to Include the password in the connection string, when prompted. Although this is not a recommended practice, we use it in this tutorial for simplicity. &lt;/P&gt;&lt;P&gt;2(b) In the Choose a Query Type pane, select the Use SQL statements option. &lt;/P&gt;&lt;P&gt;2(c) In the Generate the SQL Statements pane, create the following SQL statement: &lt;/P&gt;&lt;P&gt;SELECT CategoryID, CategoryName, Description FROM Categories&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to build a different SQL statement, click Query Builder to open the Query Builder dialog box. &lt;/P&gt;&lt;P&gt;2(d) Click Finish. &lt;/P&gt;&lt;P&gt;The wizard adds two objects to your portal component: the SqlConnection1 object containing the database connection information and the SqlDataAdapter1 object containing the data definition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To generate the dataset&lt;/P&gt;&lt;P&gt;1. From the Data menu, choose Generate DataSet. The Generate Dataset dialog box opens.&lt;/P&gt;&lt;P&gt;Tip: If you do not see the Data menu, click the form; the form must have focus for the menu to appear. &lt;/P&gt;&lt;P&gt;2. Select the New option and name the dataset dsCategories. &lt;/P&gt;&lt;P&gt;3. Select the Categories table in the Choose which table(s) to add to the dataset listbox. &lt;/P&gt;&lt;P&gt;4. Select the Add this dataset to the designer checkbox and click OK. &lt;/P&gt;&lt;P&gt;Visual Studio generates the new dsCategories dataset class and the dsCategories.xsd schema that is added to Solution Explorer. An instance of the new dataset class (dsCategories1) is then added to the form. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section 3.&lt;/P&gt;&lt;P&gt;=========================================================&lt;/P&gt;&lt;P&gt;Adding the SAP NetWeaver .NET Table and Binding It to The Data&lt;/P&gt;&lt;P&gt;1. From the SAP NetWeaver tab of the Toolbox, drag a Table control onto the portal component. &lt;/P&gt;&lt;P&gt;2. Right-click it to open the Properties box. &lt;/P&gt;&lt;P&gt;3. Set the DataSource property to dsCategories1. &lt;/P&gt;&lt;P&gt;4. Set the DataMember property to Categories. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section 4.&lt;/P&gt;&lt;P&gt;=========================================================&lt;/P&gt;&lt;P&gt;Adding Code to Fill the Dataset and Display the Data&lt;/P&gt;&lt;P&gt;Although the table is bound to the dataset, the data is not displayed automatically. You must explicitly fill the dataset and bind the table to its data source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fill the dataset and display data in the Table control&lt;/P&gt;&lt;P&gt;1. Double-click the form to switch to Code Editor. &lt;/P&gt;&lt;P&gt;2. In the Page_Load event handler, call the data adapter's Fill method, passing it the dataset you want to fill:&lt;/P&gt;&lt;P&gt;[C#]&lt;/P&gt;&lt;P&gt;sqlDataAdapter1.Fill(dsCategories1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Visual Basic]&lt;/P&gt;&lt;P&gt;sqlDataAdapter1.Fill(dsCategories1) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Call the DataBind method of the Table control to bind it to the dataset:&lt;/P&gt;&lt;P&gt;[C#]&lt;/P&gt;&lt;P&gt;Table1.DataBind();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Visual Basic]&lt;/P&gt;&lt;P&gt;Table1.DataBind()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Save your project. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section 5.&lt;/P&gt;&lt;P&gt;=========================================================&lt;/P&gt;&lt;P&gt;Viewing the Component in the Portal&lt;/P&gt;&lt;P&gt;Deploy the PAR to the current portal. &lt;/P&gt;&lt;P&gt;In Solution Explorer, right-click the portal component and choose View in Portal. &lt;/P&gt;&lt;P&gt;The table with the list of categories is displayed in the browser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;navjot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        navjot sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 07:18:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156965#M455815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T07:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing SQL Server form SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156966#M455816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i am not on netweaver, I need accessing SQL server database using abap program, through some connector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 07:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156966#M455816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T07:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing SQL Server form SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156967#M455817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If your sap application server is unix/aix&lt;/P&gt;&lt;P&gt;(and not a microsoft OS),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. then this kind of secondary databse connection,&lt;/P&gt;&lt;P&gt;to MS SQL (which is microsoft system),&lt;/P&gt;&lt;P&gt;is at present not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(BCOS the required system files, for such&lt;/P&gt;&lt;P&gt;cross - platform connection is not delivery by sap)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 07:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-sql-server-form-sap/m-p/2156967#M455817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T07:37:58Z</dc:date>
    </item>
  </channel>
</rss>

