BSP Application connection to SQL Express DB to execute SQL Queries

Hi There everyone,
I am not sure if I am posting this discussion in the correct section, but please try and help me out.
I have been tasked to write a BSP Application in the ABAP Workbench.  The purpose of this application is to enable our Weighbridge operators to execute pre-defined SQL Queries by selecting certain criteria from the Application.  The application is based on an HTML frontend which includes the Web Form (Input Fields, Submit buttons).  We have 6 Weighbridges, each has its own HTML page in this application.
What I need to achieve is the following;
I need to know how I must setup the connection between the BSP Application and the SQL Express DB.  Each Weighbridge has its own dedicated SQL Express instance + DB.  These SQL Instances are not on the same host as where the BSP Application is located, I think the correct term is "External SQL Instances".  Everything is on the same domain though.
What code would I need to add to the "OnInitialize" section in the BSP Application, to be able to establish the connection to the SQL Express database using Windows Authentication?
And what code would I need to attach to my submit buttons in the "OnInputProcessing" in the BSP Application, to execute a SQL Query to that DB and display the results in .CSV format back to the user?
I have attached 2 screenshots of what the BSP Application interface looks like.  (This is what the user sees)
I am very new to creating BSP's, and I have never had to link to SQL from HTML / PHP before, so I basically have no knowledge of this.
Any help will be greatly appreciated.

Sorry for the late reply.
Yes, database is always available and online, not involved in Log Shipping or other things.
At the time of the connection failure I can find the following in the log of the application:
ProcessID:2452 ,ThreadID:4768 : NI-I - 24/08/2012-15:12:20 - \PCV/src/ni/src/pcvnireceive.cpp - 4741 - Thread 4768 - Receive Thread Started for Remote Node 043SBTMS10DRSP: In Thread index 1:
ProcessID:2452 ,ThreadID:4768 : NI-I - 24/08/2012-15:12:40 - \PCV/src/ni/src/pcvnireceive.cpp - 4968 - Thread 4768 - Receive Thread Ended for Remote Node 043SBTMS10DRSP: In Thread index 1:
ProcessID:2452 ,ThreadID:4768 : NI-I - 24/08/2012-15:12:40 - \PCV/src/ni/src/pcvnireceive.cpp - 115 - Thread 4768 - Merge Memory Usage: KB Allocated = 2186, KB in use = 889
ProcessID:2452 ,ThreadID:1408 : NiJ - E - 25/08/2012-19:35:29 - \PCV/src/ni/src/pcvnijournal.cpp - 2842 - PcvNiJournal::isRetrievePending() - DB Exception.Error: TCP Provider: The specified network name is no longer available.
Communication link failureQuery timeout expired - State:08S01,Native:64,Origin:[Microsoft][SQL Server Native Client 10.0] State:08S01,Native:64,Origin:Microsoft][SQL Server Native Client 10.0]
State:S1T00,Native:0,Origin:[Microsoft][SQL Server Native Client 10.0]

Similar Messages

  • Conditions: SQL Expression vs. PL/SQL expression

    In a Condition, what is the difference between a SQL Expression and a PL/SQL expression? The examples shown when creating, say a validation show similar things
    example of pl/sql expression: to_char(sysdate,'d')=1
    example of sql expression: instr(...) > 0
    Arent the 2 expressions above similar? What makes one a sql expression and other a plsql expression?
    Thanks

    Thanks, but I think its more than a matter of documentation.
    I had a SQL expression like
    :REQUEST IN ('button1','button2') AND NOT pkg.fn
    where pkg.fn is, of course, a packaged function returning BOOLEAN.
    The process that this condition was attached to was just not firing. No errors, nothing. I was ready to tear my hair out! I changed the expression type from SQL to PL/SQL and everything was fine.
    I think there should be a check in the App Builder for this kind of thing so that such invalid conditions are not allowed to be created.
    Thanks

  • SQL Error 58004. Executed SQL Statement

    Hi experts, we working with SAP-MAM 3.0 database DB2E Version 9.1.2 ,  when I try install the MAM30 show me this message.
    Please, Can i reinstall the DB2E application for fix this error, or there are other solution?
      u2022 Excepción al tratar el métodoSMARTSYNC : com.sap.ip.me.spi.persist.IPersistenceException: char processor: SQL Error 58004. Executed SQL statement: [INSERT INTO M8_PROPERTIES("KEY","VALUE") values ('KEY_INCONSISTENT_DATA','X')] : char processor: SQL Error 58004. Executed SQL statement: [INSERT INTO M8_PROPERTIES("KEY","VALUE") values ('KEY_INCONSISTENT_DATA','X')]
    u2022 java.lang.RuntimeException: SQLState:58004, error code:-1 : SQLState:58004, error code:-1
    u2022

    Moved thread to DB6 forum.

  • Why is my Package just stopping when going from one Execute SQL Task to another Execute SQL Task

    I have one flow constraint going for my one Execute SQL Task to another Execute SQL Task. It's executing #1 and successfully and just stops there rather than continuing on to Execute SQL Task #2. Why would it just stop? My constraint is NOT conditional...just
    a straight ole flow constraint.
    Any help is greatly appreciated and Thanks in Advance for your help.
    PSULionRP

    Hi PSULionRP,
    First make sure the color of the Precedence Constraint is green (Success) or blue (Completion) other than red (Failure). Then, make sure the Execute SQL Task is not disabled (right click the executable, and “Disable” option is available in the right-click
    menu). 
    Regards,
    Mike Yin
    TechNet Community Support

  • SQL Express 2008 R2 and SQL 2005 Server SP1 in single Windows 2003 server

    Hi,
    I am using a Windows Server 2003 R2 Enterprise Ed SP2 OS with SQL 2005 SP1 intallled on it for our Nav 5 database.
    As my backup software requires SQL Express 2008 R2 as default daabase, is it possible to install this in the same server with the SQL 2005 currently running on it? Would there be any impact on the existing SQL 2005 and the application and the Navision database
    on it?
    Appreciate your help.
    Sharon Lo

    Hi,
    I am using a Windows Server 2003 R2 Enterprise Ed SP2 OS with SQL 2005 SP1 intallled on it for our Nav 5 database.
    As my backup software requires SQL Express 2008 R2 as default daabase, is it possible to install this in the same server with the SQL 2005 currently running on it? Would there be any impact on the existing SQL 2005 and the application and the Navision database
    on it?
    There is no issue with installing multiple versions of SQL Server on a machine.I have SS 2005 ,2008 R2 and 2012 all on same machine and they work just fine. You can install all version instances side by side and all will work independently from
    each other.
    Now issue which might cause problem  your SQL Server 2005 is SP1 which is a Blunder IMO. Please ASAP patch it to SP4 because you are running very old version of 2005 which is unsupported by Microsoft and also SP4 includes MANY fixes for SQLServer
    2005. Applying SP4 will fix many issues and will bring you under Microsoft support.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Can i open an SQL express 2005 database in SQL server express 2012?

    Hi,
    i have a database and it's in SQL express 2005 but because my windows 8 is not compatible with the installer, i have to install the latest 2012 installer. my problem now is that i cannot open it in the 2012 edition..what do i have to do?

    Hi white_roses,
    Could you let us know how do you restore the database to SQL Server 2012 Express edition? Please help to collect the detail error information of this issue, it will benefit for us to do further investigation.
    As Sandesh and ED suggested above, we can directly detach our databases from SQL Server 2005 and then attach them to SQL Server 2012. For detail steps, please refer to the following article:
    http://msdn.microsoft.com/en-us/library/ms187858.aspx
    After we move a database from the instance of SQL Server on server A to the instance of SQL Server on server B, users may be unable to log in to the database on server B. If need the logins information on Server B, please refer to the following article:
    http://support.microsoft.com/kb/918992
    If you have any question, please feel free to let me know.
    Thanks,
    Jerry Li

  • Upgrade english sql express 2005 to spanish sql standar 2008

    Hello.
    I've bought a license of sql standar 2008.
    When I added the license at Microsoft Volume Licensing Service center I chosed the spanish version because the SO was in Spanish.
    But I didn't know that there was an old slq 2005 express in Englis installed in the same server where i want to install the new one.
    Now, when I try to upgrade, the assistant says that it's impossible because the previous version is in english and the new version is in spanish.
    It's possible to change the language of sql at Microsoft Volume Licensing Service and download the english version?
    Can I change the languaje of the installed sql express to spanish?
    What can I do?
    Thanks

    Hi ,
    According to your description, if the language of  OS is Spanish, and the license of SQL Server 2008 standard version is the Spanish version. I recommend you should reinstall SQL Server 2008 in Spanish as an named instance or
    uninstall SQL Server 2005 express in English and reinstall SQL Server 2005 express in Spanish, then upgrade this version to the SQL Server 2008 standard.
    In addition, for more detailed information regarding to the license issue, please call
    1-800-426-9400,
    Monday through Friday, 6:00 A.M. to 6:00 P.M. (Pacific Time) to speak directly to a Microsoft licensing specialist. For international customers, please use the Guide to Worldwide Microsoft Licensing Sites to find contact information in your locations.
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Parsing giving different SQL ID from actually executing SQL?

    I think this is worth a thread on its own.
    Env: 11.2.0.3 on HP-UX Itanium
    Scenario:
    1. parse a sql statement using the following
      c := dbms_sql.open_cursor;
      dbms_sql.parse(c, v_sql, dbms_sql.NATIVE);
      dbms_sql.close_cursor(c);2. Row appears in v$SQL with expected SQL_ID and plan_hash_value of 0.
    3. In Toad, actually execute the <sql statement>
    3. Second row appears in V$SQL with different SQL_ID and plan_hash_value non 0.
    What's going on? Why do we get two different SQL_IDs for the same sql text executed by the same user?
    Edited by: Dropbear67 on Feb 13, 2013 6:23 PM

    >
    I think SB is right, it's in the translation.
    As for why it's important.. Well I am being given SQL_ID's by the dev team and being asked to go create and fix baseline plans for them. I can get the SQL from V$SQL from the SQL_ID provided, but when I go to run the query myself, I end up with a different SQL ID (and different PLAN_HASH_VALUE because I'm running it in a different optimizer env, but thats irrelevant for here). This causes more work for me to then go search the v$SQL views to try and find the SQL I just ran.
    Why do I need to find my new SQL_ID? Because I then use it to lock in the baseline plan which I just created by running the query. I need to know it's SQL_ID and the PLAN_HASH_VALUE.
    One would have thought you could just run
    select * from table (dbms_xplan.display_cursor()); but that doesn't seem to always play ball - why? maybe a matter for another thread one day
    >
    Well now, after a day and a half, that we know what it is you are really trying to do you might want to look through this 4 part article: SQL Plan Management - Creating SQL Plan baselines.
    It is written by Maria Colgan, a developer on Oracle's Optimizer development team. - can't get a better source of info than that.
    Sounds like you already have significant experience with baselines so you may already be familiar with most of this. But it will certainlly be useful to others.
    https://blogs.oracle.com/optimizer/entry/sql_plan_management_part_1_of_4_creating_sql_plan_baselines
    >
    This first post in our series, describes the concepts of SQL Plan Management and how to create SQL plan baselines. The second part will describe how and when these SQL plan baselines are used. The third part will discuss evolution, the process of adding new and improved plans to SQL plan baselines. Finally, the fourth part will describe user interfaces and interactions with other Oracle objects (like stored outlines).
    You can create a SQL plan baseline in several ways: using a SQL Tuning Set (STS); from the cursor cache; exporting from one database and importing into another; and automatically for every statement. Let's look at each in turn. The examples in this blog entry use the Oracle Database Sample Schemas so you can try them yourself
    >
    And Tanel Poder's article 'SQL_ID is just a fancy representation of hash value might be of interest.
    http://blog.tanelpoder.com/2009/02/22/sql_id-is-just-a-fancy-representation-of-hash-value/

  • DPM Express Full Backups Causing SQL timeouts

    Hi,
    We run a SQL 2008 R2 failover cluster on Server 2008 R2 SP1 connected to an Equallogic SAN. The SQL failover cluster is fully servicepacked and installed the latest cumulative updates. 
    We have all our databases in full recovery mode and protected by DPM 2012 SP1 with latest cumulative updates.
    The protection groups for SQL are configured to synchronise every 60mins and 1 express full backup every night. Every time the SQL express backups run the SQL server experiences timouts and end users report applications timing out. In the SQL server Application
    logs I see Event ID 833 numerous times, these only occur as the express full backups take place. Every time the express full backups run we see the same timeouts and event logged that I/O has taken longer than 15 seconds to complete:
    Log Name:      Application
    Source:        MSSQLSERVER
    Date:          01/04/2014 04:10:10
    Event ID:      833
    Task Category: Server
    Level:         Information
    Keywords:      Classic
    User:          N/A
    Computer:      WDCSQL02.local
    Description:
    SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [D:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4).  The OS file handle is 0x00000000000008F8.  The offset
    of the latest long I/O is: 0x000000042eae00
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="MSSQLSERVER" />
        <EventID Qualifiers="16384">833</EventID>
        <Level>4</Level>
        <Task>2</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-04-01T03:10:10.000000000Z" />
        <EventRecordID>14165629</EventRecordID>
        <Channel>Application</Channel>
        <Computer>WDCSQL02.local</Computer>
        <Security />
      </System>
      <EventData>
        <Data>1</Data>
        <Data>15</Data>
        <Data>D:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf</Data>
        <Data>msdb</Data>
        <Data>4</Data>
        <Data>00000000000008F8</Data>
        <Data>0x000000042eae00</Data>
        <Binary>410300000A0000000600000055004B00530051004C00000000000000</Binary>
      </EventData>
    </Event>
    I was under the impression that DPM SQL backups would remain online during the backup.
    Is this normal? 
    Any way to fix this issue?
    Thanks,
    Microsoft Partner

    Hi
    A copy backup will not truncate the logs but a full backup will and it will also stamp the database once it does a full backup.

  • Sql expression fields - odbc drivers

    We are using Crystal 2008 with SAP ECC 6.0, and the database is sql server 2005. We had Integration kit installed. We have developed few reports with this one from ECC 6.0.
    My problem is, I am not able to see the SQL EXPRESSION FIELDS in the FIELD EXPLORER of CR 2008. From the replies for my
    previous postings in other forums here and from the feed back of Don Williams, I understood there is a problem with odbc drivers.
    I checked trying with new report and tried using ODBC(RDO) but found no drivers. The ODBC data source window showing "dBASE Files, Excel Files & MS Access Database" in the data source Names field.
    Even from my machine, I checked the ODBC drivers and found only the above three were present in the user DSN tab of ODBC data source administrator window. Shall I have to add ODBC drivers for SQL Native client OR SQL server OR both (FROM THE DRIVERS TAB)?
    Will there be any other ODBC is required for SAP INTEGRATION?
    What are the steps to resolve this and to activate and use the drivers? so that I can see SQL Expression fields & also "Show sql query".
    BABASHARI

    Hi,
    So by establishing the connectivity through the proper transports and authorizations done to CRM, can I build
    single report by getting the data from two tables one from ECC and another from CRM?
    >> which then means for SSO you need to configure 2 SAP systems on the BusinessObjects Server
    And one more question, If I could not succeed in getting the connectivity through the proper transport & authorization to
    CRM, (lack of basis resources) then can I use BAPI / RFC'S to pull the data from CRM into ECC and then into CRYSTAL(as, ECC is working fine with crystal through the integration kit)? Is it a good practice? Thanks in advance.
    >> for CR then the ECC system would become the single point of entry. sure - that would work as well - but shoulnd't be necessary
    Ingo

  • SQL Expressions in Crystal XI

    I am developing Crystal reports to be dispursed with our Great Plains products.
    I am finding that in order for the SQL Expressions to successfully execute I have to enter database.tablename.  The problem is we cannot hard code the database name for the product.  I have set the ODBC etc, but when the report is called from the reportviewer via the COM object the expressions fail.  Any thoughts?

    Hi Carolyn,
    You are an OEM Partner so what I suggest is you create a case on line, talk to your other Rep's there on how to get a User account and/or create the case. A rep will work with you on this issue directly to find a solution or work around.
    Also be aware that XI is out of support so no changes can be done to the product. Best effort only trying to resolve the problem.
    I suggest you log the case first with the Report Design Team and then if you still have issues with the application you can create a new case for the RDC app.
    Thank you
    Don

  • Install SQL Express With MDT 2012 now or wait for SCCM and full SQL Server?

    We are planning to get SCCM 2012 R2 in several months and it will come with SQL Server 2012 when it is installed and configured at that time.
    If we would like to start experimenting with using a database in MDT 2012 now, can we go ahead and set up a database in SQL Express and start using it  for deployments now or should we wait for SQL server?  
    Can the database created in standalone MDT 2012 with SQL Express be migrated to SQL Server 2012  and SCCM 2012R2 or would we need to start over with a new database when we get SQL Server and SCCM?

    Using SQL Express should be fine.  You can export the database from there and import it into a full SQL Server install later if you want to preserve the content.
    Thanks,
    -Michael Niehaus
    Senior Product Marketing Manager, Windows Deployment
    http://blogs.technet.com/mniehaus
    [email protected]

  • SQL Expression Validation

    I created a validation and choose 'SQL Expression' as the type. And i put the following in the Validation Expression 1:
    Select 1 from Employee
    where ID = :P20_ID
    what i want to do is to check if the employee id is existed or not. If yes, it will give error message.
    It didn't work and i got these error message:
    ORA-06503: PL/SQL: Function returned without value
    Error ERR-1023 Unable perform validations.
    Could you help me?
    Thanks.
    Jen

    Hi Jen,
    the "Exists" and the "NOT Exists" validation type expects that kind of SQL statement you have defined. It executes your statement and checks if a row is returned or not.
    A "SQL Expression" expects no full SQL statement, instead it has to be an expression as written in my previous posting.
    As an example, create a new validation with the wizard and select "SQL", there you will see all the options and example codes.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/
    Message was edited by:
    patrick_wolf

  • SQL express as Access back end (simple)

    Which bit of SQL 2012 is best for working around the 2GB limit on Access database file sizes?
    I have a very simple database with one very big table which is 1.8GB.
    CarolChi

    LocalDB is created specifically for developers. It is very easy to install and requires no management, 
    http://blogs.msdn.com/b/jerrynixon/archive/2012/02/26/sql-express-v-localdb-v-sql-compact-edition.aspx
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Cannot find SQL Expression Fields

    Hi,
    I am using Crystal Reports 2008 and trying to locate the SQL Expression Fields.  According to the user guide, the SQL Expresion Fields should be under Field Explorer.  But when I go to Field Explorer, I only see the following options:
    - Database Fields
    - Formula Fields
    - Parameter Fields
    - Running Total Fields
    - Group Name Fields
    - Special Fields
    Would you please let me know where I can find SQL Expression Fields?
    Thanks and regards,
    Al

    Al,
    If you are reporting off of a Stored Procedure, View, Command Object, or multiple datasources SQL Expression fields will not be available. The reason is for the first 3 is that the SQL has been hard coded, the reason it would not work when ussing multiple datasources is that it would not know which query to append the SQL expression to.
    Correction: SQL Expressions will be available when reporting off of a View.
    Edited by: Graham Cunningham on Jul 21, 2008 9:38 AM

Maybe you are looking for

  • How do I stop iWeb turning my .jpgs into PNG's ??

    Hi No one on a PC can print out my iWeb pages because when I drag a pic into iWeb it auto makes it a PNG. (unreadable from some PC's) How can I stop this from happening so that people can print ok from my site? Thank you Jim Rhodes http://web.mac.com

  • Adding New fields in Pricing

    Hi, I have to add new fields in price catalog (i.E MaterialGroup1 to Material group5  MVGR1 .. MVGR5 ) .Althought the fields has been hadded in catalog and access sequence , pricing procedure is not picking up data from sales order to determin the pr

  • Pdf - pages A4 into middle of A3

    So this is what I am trying to do: I have a pdf which is the syllabus of one of my subjects. It's about 50-60 pages long. Imagine I have this printed in A4, full size. I want to print the A4 page, in the middle of the A3 page which would leave half a

  • Trigger IDOC using change pointers

    Dear All, We are using change pointers for triggering IDOC's when a cost centere is creaed/changed/deleted. We are using message type COSMAS for the same. I have  maintained all the necessary settings including Distrubution model. When a cost centre

  • Change name on saving rwservlet

    hi, i have oracle 10g reports, when i am trying to call a report with delimited option with mimetype=application/vnd.ms-excel and saving on popup then default report name which is being offer to save is rwservlet, is there any option to change this d