Database Toolkit - Get Database Information

Hi All,
I'm struggling a bit with this toolkit, and thought I'd bring it up on here for some input.
Using the included functions with that toolkit, I'm able to connect to my database, but i'm having trouble writing to it (Error -2147217913).  I'm a bit concerned that maybe my data types don't match, so in order to confirm, I noticed in the examples given with this toolkit there was a VI that gets your database information (Column names, tables, most relevant - data types per column name.).  Something odd happened that I'm not sure if its supposed to:
I changed the UDL address of the example database, to my database's UDL...nothing else, just to get a list of datatypes.  Now using their UDL it finishes cleanly, w/no error.  With my UDL - I receive Error -2147217900 occurred at Conn Execute.vi->DB Tools List Columns.vi->Get Database Information.vi.  Interesting eh?  But it does show every column name/and data type, wonder why it fails though?
Anyone have some recommendations of how to troubleshoot next? Or how to interpret this?  I'm betting if I can figure out why its failing in the example program, both failures are maybe tied together?
LV7.1, LV8.5

Hi Aashish!
Good news, figured out the problem...I WAS writing a null to the database (by accident), and while access doesn't mind them - the toolkit is based on SQL standard which i believe does.  The program had a cluster that was being initialized, and fed into a loop where it waited for user action. (So we didn't have left over garbage in each field whenever the app ran.)  Once the user input all their data, that same wire was fed into the input to populate the array. I thought it would update the cluster as the controls were changed, but I guess the only way to change elements is to unbundle, change and rebundle. (At least thats how it behaves)
Appreciate the help, but while on the topic maybe you can give me a pointer, the only way I could work it so a fresh copy of the data was sent into the cluster, was to make a local variable of the cluster and wire that to the input (See picture).  Rather than get yelled at later if I need more help, any idea how to reduce that local so we don't require a duplicate copy of the data?  (avoid race conditions, etc.)  Or would you even?  Guess it boils down to, is there another way to update the cluster in there?  I can unbundle, and rebundle, but I'm not sure what I'd do between the two to update all those to feed into the database...its a bit confusing to describe but I think it gets the idea across lol.
I was thinking about a way to do it...and thought maybe I need an indicator for each control, then when the indicator changes, feed that into the control cluster to update from intial and go from there...but thats a copy of data the same size as the local would make, I'd think.
LV7.1, LV8.5
Attachments:
Working method.JPG ‏147 KB

Similar Messages

  • Using get properties VI from database toolkit

    Hello I'm using database toolkit to read and import data from a MySql database.
    I want to read the last row that has been written in a table. I don't know how to do this but i think i can know the number of the last row written using the get properties block.
    But using this VI i have to use execute query block.....and i get an error, i think that the sql query is not defined correctly.
    I have posted a part of my VI where i use this blocks.
    I have two questions: is this the way to read the last row that has been written in  a table of a database??
    The other question is why doesn't run this subVi and what is the correct way to define a SQL query (you have to put the table name, o some other thing)
    Thank you very much
    Larson
    Attachments:
    example.PNG ‏12 KB

    I hate when this happens... if I press TAB + SPACE the message is sent to forum... :-s
    Hi, Larson:
    You can't read "the last row written" in a DataBase, as records are not sorted, by definition. You could have a field in a record that grows every time you insert in a table, like AutoNumeric, or DateTime and then you could know exactly wich record is the last one.
    Once you know how to get "the last row written" you have to translate it to SQL. Provided you have an AutoNumeric field named "IdRow" in your table "TestTable", you could write:
    SELECT * FROM TestTable WHERE IdRow = (MAX(t.IdRow) from TestTable t)
    Now you should build a call to the DataBase.
    First you need ExecuteQuery, as you did use, and SQL Query input should be the like "SELECT * FROM..."
    Second you have to retrieve the data with, for example, "DB Tools Fetch Recordset Data", in DB Palette, next to Execute Query. The output will be a Variant 2D Array that you can convert to anything you want, like String 2D Array, for example using Variant palette functions
    And third you have to close the recordset Reference with "DB Tools Free Object", the rightmost function in the same row as Execute Query.
    And once you have done all, you can close de DataBase.
    Hope it helps,
    Aitortxo.

  • Reentrant Execution gets slower.... (DATABASE TOOLKIT)

    Hi All
    I am LabVIEW 2009. Application is typically running on Windows XP.
    I have a sub VI which is inserting data in MS SQL server. This vi is using database toolkit for inserting data into database.
    I made this VI reentrant, and my toplevel is dynamically calling its clone.
    Now suppose if my top level vi opens 20 clones of sub vi, everything seems to be ok. As per logic all 20 clones are inserting data into database parallely/second. (20 records/second)
    Now, if my top level vi opens 100 or 1000 clones of sub vi, sub vi's are not inserting 100 or 1000 records/second into database. It means their executions speed decreased. (approx. 35 records/second).
    Are my database VI's are creating this overhead or jitter. My SUB vi is reentrant, but when I diagnosed database toolkit, I found that almost all VI's are not reentrant.
    After that, I edited all DATABASE toolkits VI's, I made all VI's reentrant, but still problem is unsolved.

    Matthew Williams wrote:
    As I understand it, the DB Toolkit .vis work through ActiveX, which itself is not re-entrant and may be a bottleneck.
    We are battling the same problem, haven't found a good solution.  It looks like we will have to go with two queues, one high
    priority, one lower that only accesses the DB on a best effort basis.  Not ideal.
    From conversations with NI, I believe the LV 2010 DSC add-on is multi-threaded regarding DB access.  Don't know whether
    the improvements are available through the DB Toolkit, though, and we are stuck on 8.5.1 for this particular project.
    Matt
    Mike Porter has figured out how to get at DB using ADO and aviods the toolkits completely. He is way beyond me in this area but maybe that is an avenue that could help you.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to get Database information properly to JTable...

    Hi!
    Sorry to bother with this kind of stupid question but I thought I'd ask someone for help in here...
    The case is that I'm trying to learn the use of Swing components at the moment, and I had this strange idea of trying to add my databases to this study. So, I started testing with the sample codes included in java.sun.com's pages...
    I got the data from the database to Jtable. The problem is that at the moment this attempt creates the table in the same loop as it gets the data from the database so I get every row of data to a separate table... :)
    So, if someone could help me in my studies and tell how can I get my data to a single table? :)
    Here's what I've been messing with...
    try
    yhteys=DriverManager.getConnection(url, tunnus, salasana);
    stmt=yhteys.createStatement();
    sql = "SELECT A.Asiakasnumero, A.Yritys, A.L?hiosoite, A.Postinumero, A.Postitoimipaikka, T.Tilnro, T.Toipvm, T.Tuotenumero, T.Tuote, T.Kappaletta FROM ASIAKAS AS A, TILAUS AS T, TUOTE AS TU WHERE Toipvm=(SELECT MAX(Toipvm) FROM TILAUS AS TI WHERE TI.Asnro=T.Asnro) AND A.Asiakasnumero=T.Asnro AND T.Tuotenumero=TU.Tuotenro AND A.Asiakasnumero=1";
    ResultSet rs=stmt.executeQuery(sql);
    while(rs.next())
    Object an=rs.getString("Asiakasnumero");
    Object yr=rs.getString("Yritys");
    Object lo=rs.getString("L?hiosoite");
    Object pn=rs.getString("Postinumero");
    Object pt=rs.getString("Postitoimipaikka");
    Object tn=rs.getString("Tilnro");
    Object tp=rs.getDate("Toipvm");
    Object tu=rs.getString("Tuotenumero");
    Object tt=rs.getString("Tuote");
    Object ka=rs.getString("Kappaletta");
    String[] columnNames = {"Asiakasnumero",
              "Yritys",
              "L?hiosoite",
              "Postinumero",
              "Postitoimipaikka",
              "Tilnro",
              "Toipvm",
              "Tuotenumero",
              "Tuote",
              "Kappaletta"};
    Object[][] data = {
    {an, yr, lo, pn, pt, tn, tp, tu, tt, ka},
    final JTable table = new JTable(data, columnNames);
    table.setPreferredScrollableViewportSize(new Dimension(1000, 70));
    if (DEBUG) {
    table.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    printDebugData(table);
    JScrollPane scrollPane = new JScrollPane(table);
    add(scrollPane);
    stmt.close();
    yhteys.close();
    catch(SQLException ex)
    System.err.println("SQLException: "+ex.getMessage());
    As you can see, this is EXTREMELY raw version (all data is retrieved as Strings instead of what they really are, and... Well... The JTable part is quite a straight copy from "Simple Table Demo"...).
    This is because I wanted to have the table running first before trying anything else and I'm learning from these examples. So, if anyone of you could give me hints I would really appreciate them...
    What I need to do first is get the JTable-part away from the while loop but how does that happen? :D
    /Sampsa

    You need to have layers. A layer is one or more classes that exist to provide a specific functionality. Typically a layer is "between" to other things and each thing can send input and get output from the layer.
    The gui layer does the gui part. (The two sides are the 'user' and the 'database layer')
    The database part does the database part. (The two sides are the 'gui layer' and the 'database')
    The gui layer calls the database layer to do the work.
    So for example you would have the following method in the database layer.
    Customer.getByName(String firstName, String lastName)
    This method would get a customer using the customer name to build the query string.
    Now if you want the Customer object could just have a bunch of get methods to get the data after you call the above method....
    getFirstName()
    getLastName()
    getAddress()
    getTelephone()
    The problem with the above becomes apparent when you start adding stuff, more types of objects and more fields to the objects.
    So typically a DTO is used.....
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html
    Try reading through the above link and you might also look at this one....
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
    Keep in mind that you don't necessarily need the details in the above but just focus on the conceptual ideas.
    And once you read the above ask for more information.

  • Database toolkit & Oracle 11g, problem with timestamps

    I tested my application, based on the Database toolkit, with Access and Oracle XE (10g) databases and all was ok. After moving my database to a Oracle 11g server, i get this error for any query involving a TIMESTAMP WITH TIME ZONE or TIMESTAMP WITH LOCAL TIME ZONE column:
    ADO Error: 0x80040E21
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: ODBC driver does not support the requested properties.
    The error is raised by the "Execute" invoke node in "DB Tools execute query.vi".
    Using Labview 2009 and up to date Oracle ODBC drivers on Windows XP

    Hi SnamProgetti,
    I don't have any useful information about this error. You can try to read this and this document.
    Have a nice day,
    Simone S.
    Academic Field Engineer - Med Region

  • Database toolkit

    Hello!
    I want to import to Labview two colums of a MySql database.
    One of this columns is a column of double. I use database variant data to data, and I specify that is double with a constant....but it appears an error message that cannot convert the input data in this data type.
    Someone knows the better way to read in Labview the information of a database....if is a colum of double.....and if is a column of data/time.
    P.Derhaps this block only allows you import one element??In this case how i can import it? An Vi's example would help me a lot.
    Thanks!!

    Hi Bob,
    What specific errors are you getting? Does the problem come when the program is run or right when you open it after saving for the previous version? If you already have the Database Connectivity Toolkit 2009 installed (it sounds like you do) we should check to make sure it is activated. To do this use NI License Manager (Programs>>National Instruments>>NI License Manager). If you have not activated products with NI License Manager in the past, it is discussed here.
    If you do have the Database Connectivity Toolkit 2009 installed and activated, try to repair the install. Follow the steps in the How can I Repair my LabVIEW Installation? Knowledge Base, but repair the install of the Database Toolkit not LabVIEW.
    The next option would be to completely uninstall and reinstall the toolkit. If installing from the disc doesn't seem to be working, try the online Database Connectivity Toolkit download
    I hope that info is helpful!
    Matt
    Product Owner - NI Community
    National Instruments

  • Getting database error while updating data to mysql table.

    user registration.jsp < jsp user view to get input >
    <?xml version="1.0" encoding ="UTF-8"?>
    <%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="x"   uri="http://java.sun.com/jsp/jstl/xml" %>
    <%@ taglib prefix="fn"  uri="http://java.sun.com/jsp/jstl/functions" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>Registeres USers Login Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <body>
    <%--debugging code--%>
    <%@ include file="debug.jsp" %>
    <table width="1049" cellpadding="5" align="center">
      <tr>
        <td width="2378"><div align="center">
          <h2 align="center"> User Registration</h2>
           <p>
         <c:url var="HmePgeURL"  value="/cw/router/home"  scope="page"/>
         <a href="${HmePgeURL}">Home</a>  <c:url var='BSPgeURL'  value='/cw/router/login'  scope='page'/>
         <a href="${BSPgeURL}">Buy or Sell</a>
         </p>
        </div></td>
      </tr>
    </table>
    <p align="center"> </p>
    <p>This website is only open to members of the De MontFort University.
    You will need a current @learner.dmu.ac.uk e-mail address in order to register.</p>
    <p> If you've already registered for one site you do not need to register again </p>
    <c:url value="/cw/router/userregistration" var="UregPgeURL" scope="page"/>
    <form name="frmregister" method="post" action="${UregPgeURL}">
      <div>
      <table width="726" height="285" border="0" align="left" cellpadding="2" cellspacing="0">
        <tr>
          <td width="157" align="right" >Name:</td>
          <td width="561" > <input name="txtname" type="text" value="${param.txtname}"/> </td>
        </tr>
          <c:if test="${!empty requestScope.reqInvalidUserName}">
          <c:out value="${requestScope.reqInvalidUserName}"/>
          </c:if>
        <tr>
          <td width="157" align="right" >Department</td>
          <td align="left" >
              <select name="txtdepartment" value="${param.txtdepartment}" >
                <option></option>
                <option value="Faculty of Art and Design">Faculty of Art and Design</option>
                <option value="Faculty of Business and Law">Faculty of Business and Law</option>
                <option value="Faculty of Computing Sciences and Engineering">Faculty of Computing Sciences and Engineering</option>
                <option value="Faculty of Health and Life Sciences">Faculty of Health and Life Sciences</option>
                <option value="Faculty of Humanities">Faculty of Humanities</option>
              </select>
          </td>
        </tr>
          <tr>
            <td align="right" >Programme</td>
            <td ><input type="text" name="txtprogramme"  value="${param.txtprogramme}" />
              (eg: BIS,SE) </td>
          </tr>
          <tr>
          <td align="right" >Telephone Number: </td>
          <td ><input name="txtphonenum" type="text" value="${param.txtphonenum}" /></td>
        </tr>
        <tr>
          <td align="right" >Date Of Birth: </td>
          <td ><input name="txtday" type="text" size="15" value="${param.txtdob}" />(of format YYYY-MM-DD)</td>
          </tr>
        <tr>
          <td align="right" >Username</td>
          <td align="left" >
              <input name="txtuserid" type="text"  size="15"  value="${param.txtuserid}" />
            (eg. p07269027 from [email protected])</td>
            <c:if test="${!empty requestScope.reqInvalidUserId}">
            <c:out value="${requestScope.reqInvalidUserId}"/>
            </c:if>
        </tr>
        <tr>
          <td align="right" >Password</td>
          <td align="left" >
              <input name="txtpassword" type="password"  size="15" value="${param.txtpassword}" />
          </td></tr>
         <c:if test="${!empty requestScope.reqInvalidPassword}">
          <c:out value="${requestScope.reqInvalidPassword}"/>
          </c:if>
        <tr>
          <td align="right" >Confirm Password </td>
          <td align="left" >
              <input name="txtpasswordconf" type="password" size="15"  />
          </td>
        </tr>
        <tr>
          <td colspan="2" align="center">
            <input name="frmsubmit" type="submit" value="Register User" />
            <input type="reset" name="Reset" value="Reset" />
          </td>
        </tr>
      </table>
         <c:if test="${!empty requestScope.reqQueryErrorMessage}">
          <c:out value="${requestScope.reqQueryErrorMessage}"/>
          </c:if>
         <c:if test="${!empty requestScope.reqInvalidUpdate}">
          <c:out value="${requestScope.reqInvalidUpdate}"/>
          </c:if>
    </div>     
    </form>
    </body>
    </html>
    proregistration.jsp ( registration process jsp)
    <?xml version="1.0" encoding ="UTF-8"?>
    <%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="x"   uri="http://java.sun.com/jsp/jstl/xml" %>
    <%@ taglib prefix="fn"  uri="http://java.sun.com/jsp/jstl/functions" %>
    <%-- \WEB-INF\jsp\cwjsps\probooksforsale.jsp --%>
    <%-- Probookforsale --%>
    <%-- skip field validation and provide blankpage if first time in --%>
    <c:if test="${empty param.frmsubmit}">
    <c:set var="reqOutcome" scope="request" value=" "/>
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/> <%-- initial request --%>
    </c:if>
    <%-- validate txtname --%>
    <c:if test="${empty param.txtname}">
    <c:set var="reqInvalidUserName" scope="request" value= "User Name Cannot Be Empty"/>
    </c:if>
    <%-- validate txtuserid --%>
    <c:if test="${empty param.txtuserid}">
    <c:set var="reqInvalidUserId" scope="request" value= "User ID Cannot Be Empty"/>
    </c:if>
    <%-- validate txtpassword--%>
    <c:if test="${empty param.txtpassword}">
    <c:set var="reqInvalidPassword" scope="request" value= "Password Cannot Be Empty"/>
    </c:if>
    <%-- if userid invalid or username invalid  --%>
    <%-- redisplay form with originl typed-in data and with errors marked --%>
    <c:if test="${empty param.txtname or empty param.txtuserid}">
    <c:set var="reqOutcome" scope="request" value= "failure" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/> <%-- failure --%>
    </c:if>
    <c:catch var="pgeQueryError">
    <sql:update var="pgeRowCount" scope="page" >
    <%-- insert details to trader table --%>
    INSERT INTO trader(dbTraderName,dbTraderDepartment,dbTraderProgramme,dbTraderPhoneNum ,dbTraderDOB,dbTraderPNumber,dbTraderPwd)
    VALUES(?,?,?,?,?,?,?)
    <sql:param value="${param.txtname}"/>
    <sql:param value="${param.txtdepartment}"/>
    <sql:param value="${param.txtprogramme}"/>
    <sql:param value="${param.txtphonenum}"/>
    <sql:param value="${param.txtdob}"/>
    <sql:param value="${param.txtuserid}"/>
    <sql:param value="${param.txtpassword}"/>
    </sql:update>
    </c:catch>
    <%-- check For query Error --%>
    <c:if test="${not empty pgeQueryError}">
    <c:choose>
    <%-- check duplicate record --%>
    <c:when test="${pgeQueryError.rootCause.errorCode =='1062'}">
    <c:set var="reqQueryErrorMessage" scope="request" value="User already Registered - Duplicate Record" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/login.jsp"/>
    </c:when>
    <c:otherwise>
    <%-- database error --%>
    <c:set var="reqQueryErrorMessage" scope="request" value="Database Error" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/>
    </c:otherwise>
    </c:choose>
    <c:set var="reqOutcome" scope="request" value="failure" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/>
    </c:if>
    <%-- check For no rows returned --%>
    <c:if test="${pgeRowCount !=1}">
    <c:set var="reqInvalidUpdate" scope="request" value="*** rowCount not = 1"/>
    <c:set var="reqOutcome" scope="request" value="failure"/>
    <jsp:forward page="/WEB-INF/jsp/cwjsps/userregistration.jsp"/> <%-- failure --%>
    </c:if>
    <%-- Otherwise --%>
    <%-- Outcome is success --%>
    <c:if test="${pgeRowCount ==1}">
    <c:set var="reqOutcome" scope="request" value="success" />
    <jsp:forward page="/WEB-INF/jsp/cwjsps/login.jsp"/> <%-- success --%>
    </c:if>
    router.jsp  ( maps the jsp page based on success and failure)
    <?xml version="1.0" encoding ="iso-8859-1"?>
    <%-- /WEB-INF/jsp/cwjsps/router.jsp --%>
    <%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="x"   uri="http://java.sun.com/jsp/jstl/xml" %>
    <%@ taglib prefix="fn"  uri="http://java.sun.com/jsp/jstl/functions" %>
    <%--  setup session if one does not exist --%>
    <%@ page session="true" %>
    <%-- set up debug variable --%>
    <c:set var="sessDebug" scope="session" value="true"/>
    <%-- get pathinfo information  from the request --%>
    <%-- this defines which use case has been requested --%>
    <c:set var="pgePathInfo" scope="page" value="${pageContext.request.pathInfo}" />
    <%-- uc02 : Login --%>
    <c:if test="${pageScope.pgePathInfo =='/home'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/home.jsp"/>
    </c:if>
    <c:if test="${pageScope.pgePathInfo =='/login'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/prologin.jsp"/>
    </c:if>
    <%-- uc01 : View Details Of Books For Sale --%>
    <c:if test="${pageScope.pgePathInfo =='/viewbooksforsale'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/probooksforsale.jsp"/>
    </c:if>
    <%-- uc01 : process User registration--%>
    <c:if test="${pageScope.pgePathInfo =='/userregistration'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/proregistration.jsp"/>
    </c:if>
    <%-- uc01 : debug --%>
    <c:if test="${pageScope.pgePathInfo =='/debug'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/debug.jsp"/>
    </c:if>
    <%-- uc01 : view Traders Own View  --%>
    <c:if test="${pageScope.pgePathInfo =='/Traderhomepage'}" >
    <jsp:forward page="/WEB-INF/jsp/cwjsps/Traderhomepage.jsp"/>
    </c:if>
    <%-- otherwise --%>
    <jsp:forward page="/WEB-INF/jsp/cwjsps/home.jsp"/>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &nb

    Hi..
    Correcting the record from PSA is temporary solution depends on u r criticality....
    Only Solution is to correct the record at source system level... Generally Material master data record is imp so just try to fix temporarily so that it vl not affect u r loads until it is corrected at Source System level..
    Note: inform the problem to u r co-ordinator and try to correct it ASAP... and explain the temp solution(PSA correction)...
    cheers..

  • How can I delete a row in access using the database toolkit?

    I want to delete just one row of a access table using the database toolkit. Can it be done and if so How?

    Take a look at page A-1 of the database connetivity manual. It has information on making a sql query that will delete. You will need to use this command with the dbtools execute query function. Look in the shipping examples for an example with this function.

  • SQL Query Works in MS SQL Server 2008 but not when using Database Toolkit

    I have this SQL query:
    DECLARE @DataTypeTable TABLE (
    Name varchar(128),
    TypeID INT)
    --Add comma delimeted data type names to temp table
    INSERT INTO @DataTypeTable (Name)
    SELECT * FROM WhatWeShouldDoRead.func_Split(@DataTypeTrimmed,',')
    SELECT Name FROM @DataTypeTable
    Which takes a comma delimited string and returns the string as a table.  It works correctly in Microsoft SQL Server Management Studio.  When I run this as a stored procedure  I get back nothing.  There are no errors, SQL or otherwise.  I've verified that I am connected to the correct database and that the stored procedure is loaded by changing the no error string that is reported from this stored procedure (that code is not shown in the above example).  Has anyone seen this problem before, or have any experiance with SQL/Labview interfaces to tell me what I'm doing wrong?
    Thanks in advance. 
    Solved!
    Go to Solution.

    After doing some more research it appears that the database toolkit cannot interface with any table results from any type of temp table.  It may have to do with the fact that MS SQL 2008 stores temp tables in a seperate database (tempdb) and not the database you are currently connected to.  See this link for a good artical on temp tables:
    http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html
    If possible,  I'd like a someone to prove me wrong, but for now will have to settle for exporting the contents of a temp table through a string.

  • How to create a database in SQL Server Express 2014 to be used with LV Database Toolkit

    I use LV Database Toolkit, which by default uses Jet database. Now I want to use SQL database with LV Database Toolkit. I have downloaded and installed "SQL Server 2014 Express with Tools" in my Labview Laptop. Now I want to create a database in SQL Server, because I think it is a requirement for creating a "udl connection file" (*.udl file). Please help me!
    Solved!
    Go to Solution.

    I made a database whose path is: C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\depot1
    I tried to make .udl connection file, but when I click on "test connection" with the provider: "OLEDB Provider for Microsoft SQL Server" I get the Error "UDL Connection File Failure" (attached below)
    When I tried to make the .udl connection file with the provider "Microsoft SQL native Client 11.0" and when I click on "Test Connection" I get the Error" UDL Native Client_1"& " UDL Native Client_2".
    Please help!
    Thanks!
    Attachments:
    UDL Connection File Failure.png ‏78 KB
    UDL with Native Client_1.png ‏702 KB
    UDL with Native Client_2.png ‏714 KB

  • Using SQLplus command in LabView Database toolkit

    Hi ,
    I would like to ask something but before that this is my set up background
    OS          : Win 7,
    LabVIEW : 2012
    I have successfully connected with Oracle database using Labview Database toolkit.
    The problem now is since I need to query the data from the database,
    it will takes time for the labview to process it (since there is so much data in a specific table),
    let say that the table in database is "Serial Number", and the data that I want from that table is "SN123"
    if I query the data from that table, the labview will process it in a long time since it will not only give me "SN123" but also other data inside the "Serial Number" table.
    (Refer to attachment)
    but if in SQLplus, there is a command that can be execute to specifically call the "SN123" data,
    For the SQLplus, the steps to retrieve the data is like this:
    1. Key in the command to get the ID of the "SN123"
    2. Key in the command "SN123" ID to retrieve the data.
    I wonder if there is a way to put this command on labview database so it will be faster to retrieve the data.
    Attachments:
    Database.png ‏84 KB

    An  instrument driver written in Labview, is not the same as a instrument driver used by say Windows. A Labview instrument driver uses standard Labview functions to send SCPI commands to the instrument. You can learn a lot about the instrument by looking into the Labview instrument driver, and how it sends the commands to the instrument. But having the instrument programming manual at hands is also important.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • How to get Database creation history in sql server

    I have delete one database on my server, I want to know what was the MDF path for that Deleted  database do we have any way to get that .?
    Regards Vikas Pathak

    Hello,
    Once you delete the database SQL Server keeps information temporarily on the default trace about who deleted a database,
    the name of the database (or object), at what time and the transaction number among the information provided. However, the default trace does not provide information about the location of the database files deleted.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Getting Database Logon Prompt when trying to run report from Infoview

    I have a user who has 2 Crystal reports loaded in InfoView.  The reports are similar except for the parameters.  When scheduling one of the reports, she is being prompted with the database logon information everytime she tries to enter the parameters.  But on the other, she isn't.  All she is prompted with is the parameters of the report.  Which setting in InfoView or CMC controls the database logon prompt? We are on BOE 11.5.
    Thanks,
    Maureen

    Dynamic Parameters. You'll want to get all your report designers up on this topic.
    When you create a dynamic parameter in a Crystal Report, and then publish it to the Enterprise, you are creating a Business View, with all it's underlying necessary layers. Dynamic Parameters exist to be able to use the same LOV (a list of current customers) from a database for more than one report. These dynamic parameter LOVs act like a mini report that runs against the database and gets the current values for selection, then the selection(s) are used to run the overall report.
    So I create a report, and in it I create a dynamic Customer LOV. When I save it, the Enterprise creates a Data Connection (DC), Data Foundation (DF), Business Element (BE), Business View (BV), and the list of values is built on the Prompt Group. So, my Business View Manager, Repository Explorer will show (in the default Dynamic Cascading Prompts folder):
    Customer_DC
    Customer_DF
    Customer_BE
    Customer_BV
    Customer - Prompt Group
    Customer (the LOV)
    The idea is that next time I create a report and need a customer parameter, I select the existing dynamic group. If the report designer is unaware of this, and next time they create a new report that needs a customer LOV, they creates a new dynamic LOV "Customer", when saved to the Enterprise, it repeats the above. Since repository objects must have unique names, you will now have additional items something like:
    Customer 2_DC
    Customer 2_DF
    Customer 2_BE
    Customer 2_BV
    Customer 2 - Prompt Group
    Customer 2 (the LOV)
    So you can see how that folder will get filled with duplicates pretty quickly. Which ones were created and used in which reports? Have to open the report in Crystal Reports, open the parameter for Edit and verify the LOV name (_2, _3, _4, etc). If you do in fact discover there are dupes, you can change it to a single one for all reports using a dynamic LOV, re-save them to the Enterprise, then delete the dupes in the BVM.
    You've already discovered how to use the BVM to update the data connection to include/save the database credentials. The only other common issue is sometimes the LOV rights need to be changed in order to allow users to "Edit" the LOV (select different values in the LOV). You'd have to run the report as an end user, not the admin account or the report designer account to verify that works.
    Another item of note is that these dynamic LOVs are run by the Report Application Server (RAS), regardless of which viewer you are using.
    The Business View Manager administration guide has more information on the subject.

  • Reg:-10901: Database error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.. Contact your Business Objects administrator or database supplier for more information. (Error: WIS 10901)

    Hi Friends,
    When i schedule the report in infoview ,i am getting this error, could you please let me know how to solve this error.
    10901: Database error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.. Contact your Business Objects administrator or database supplier for more information. (Error: WIS 10901)
    Thanks
    sreedhar

    Hi,
    I am able to refresh the report in Infoview and data is dispalying , but when i schedule the report in infoview i am getting that error.
    I am not clear on below one could you please elaborate on this
    You need to create ODBC for SQL server.Check your BO server is able to connect SQL Server.
    Thanks
    sreedhar

  • SQL Anywhere 11 databases are getting corrupt

    Hi
    We are having problems with databases that are getting corrupted.
    We have a server that runs a SQL Anywhere 11 database. (the consolidated database)
    Beside that, we have about 15 remote databases that run on the laptops of our mobile workforces.
    To keep all databases in sync, we have setup a two-way server-to-laptop replication.
    For the replication process we use “SQL Remote”.
    Each laptop should replicate his data once in about 1 or 2 weeks.
    For exchanging the messages we use the message type “file”.
    This year we already experienced 6 times that a remote database got corrupt after replication. (after running dbremote.exe).
    The log file of the dbremote utility does NOT show any errors, the replication seems to be finished without any problems.
    But after this, it’s not possible anymore to connect to the database, because of the following assertion error:
    [Sybase][ODBC Driver][SQL Anywhere]Internal database error *** ERROR *** Assertion failed: 201501 (11.0.1.2376)
    Page 0x0:0x7182d1 for requested record not a table page -- transaction rolled back
    Error code=-301
    SQL state=HY000
    Can someone tell me more about this error?
    What goes wrong and why?
    Or does someone has some tips on how to prevent this or tips on how I can do some analyzing myself to see what exactly got broken in the database?
    Any help is appreciated.
    Thanks.

    Hi Krenton,
    Page 0x0:0x7182d1 for requested record not a table page -- transaction rolled back
    Error code=-301
    SQL state=HY000
    Can someone tell me more about this error?
    Specifically, the page at offset 0x7182d1 in database (So if you have a 4KB page size, this would be byte offset 7439057 x 4096 = 30470377472 into the database) in 0x0 (the main database running) has a page header that indicates that the data on the page is not table data. We don't know what it is, but the signature for table information connected to the table you're scanning is 'not as it should be'.
    What goes wrong and why?
    In the real world, lots of things can go wrong. I list some of the possible things on this question here on the SQL Anywhere forum. This list can include software bugs, but can also include instances where the media is not respecting write-through or write-ordering - see http://scn.sap.com/docs/DOC-34090 (SQL Anywhere I/O Requirements for Linux and Windows) for more details.
    There are also known instances where Intel drivers are not set with the correct write-through settings. The details of this are in the documentation: DocCommentXchange (Improving Robustness on Intel storage drivers).
    Technical Support should still provide assistance. If the problem is a newly-discovered bug in SQL Anywhere 11, their advice will be to apply a more recent EBF or upgrade to a new version. However, that is unlikely in this case.
    Breck is correct - it would probably be best to take a look at the database file in technical support for more clues as to what's happening here. With the current information, it's hard to say more than "something was not correct at the time the page was looked at by the database server."
    Regards,
    Jeff Albion
    SAP Active Global Support

Maybe you are looking for

  • Changing where the sent messages are stored

    Hi, I was wondering is there any way you can change where the sent messages are stored. I have switched from a few programs.. and there is a 'sent' folder and ' sent messages' folder on my folder list in addition to that of what mail is putting them

  • Apache Returns 403 Status When Accessing ~/Sites Web Content

    Under Mac OS X 10.4.x, I don't recall having any problems accessing web content in ~/Sites. After upgrading to Mac OS X 10.5.1, Apache returns a 403 status when using a URL in the following form: http://spielzeit.hasental.com/~mcc/weather. Using the

  • Logic - substring cut off disapears in list

    I have one class that saves the guys Name and Social Security Number to a data file. Then another class that reads the datafile pulling in the Name and SSN into one string; String Employee=SSN + Name;. After its read I have it go into a list box, but

  • VAT in AP Invoices

    Hi It is my understanding that SAP automatically applies the VAT rate based on the Posting Date of an AP Invoice.  This means that an invoice received today that is dated last week would have to show a Posting Date of last week otherwise it will auto

  • Problem in matrix style report

    i have generate a matrix style report which has 5 X 4 = 20 cells . now in the report all cell values should not be filled according to the data in the tables but every cell in the report is filled . and more is that the filled values in the cell whic