LABVIEW NI-XNET CAN WRITE DELAY

Hi,
I am really happy that I can read this article because it seems like it is the similar problem that I am facing right now. I also has a really bad CAN update delay when I want to write Data on CAN bus.  I was trying to following your solusion here, use frame in single point, frame out single point. But I am not so sure that I can continue. In our labview, we use frame in/out stream(sorry the screenshot cut is wrong). But if I want to change it to frame in/out single point, it will show an error saying: mising wiring on NI-XNET block.
In our labview, we use a big sequence loop. So what in saw in the 1st pic I attached is the first sequence, then in the 2nd sequence we had a Frame Can write frame. Then in the 3rd one, which is in the 2nd pic, it shows the CAN write frame that contain a lot of message that I would like to write on CAN bus.
The problem here is sometimes the CAN loop takes 0.3s(I use a shift register in the 3rd sequence showing CAN loop time) to update which is too low for me to use Vector Canalyzer to record data. For example, I did a 10 sec test of recording using Canalyzer, it only has 59 values from Labview. 
In your article it said I need to 'Frame in single point' for my reads, and 'Frame out single point' for my writes. I do know i can use database editor to build a session and define every frame and signal it it. However, I do not know where to put it then? is that connect to NI-XNET write frame? It is the only thing I can think of to do now? But is that meanning all the blocks in the second pic would be deleted.
Because our grogram is really very very big and it including so many info, I do not think I can post VI. I thought there might be possibility that because of the ''BIG'' thing has something inside that culprit for CAN transmission delay. But I have tried to move  everything except CAN in this loop to another newly built loop. The problem is still there. 
Thank you so much. 

You actually always have an XNET database. It's just a matter of whether you use an external database or whether you create objects on the fly.
From your screenshot, it looks like you are creating objects on the fly using the in memory database.
Looking at your frame configuration, I was surprised to see Remote frames being configured. Most devices that I've encountered don't use them.
So what sort of session are you trying to create? Frame Out Stream does not allow for cyclic transmission. You can repeat transmissions using a software loop. If you really have cyclic frames, Frame Out Single Point or Frame Out Queued would work. The post you referred to earlier was using the Frame Out Single Point.
The XNET help is actually pretty good about breaking down the session modes. From that help, "...  this mode does not repeat its transmit. Unlike the Frame Output Queued mode, the Frame Output
Stream mode does not use CAN frame properties from the database."
So if you're using this mode and getting unexpected delays, it's likely due to your sequencing.

Similar Messages

  • Trouble with Simple XNET CAN Example...

    I am trying to get a simple XNET CAN write frame going. Here is the VI I created...
    I keep getting this:
    I looks like I have a frame set up, so what else could be the issue?

    Hey,
    I am "trying" to create a session and send data on the fly. I changed my vi back to the simple one I had earlier in the day:
    Attachments:
    XNET_CAN_Write.vi ‏12 KB

  • Operational override for write-delay (system-property)

    Hi all,
    I'm failing to get this xml element to validate within a cache config.
    I'm using Coherence 3.7.1
    <write-delay system-property="myproperty.override.write-delay" >10s</write-delay>.
    the idea is to get the write-delay value atruntime through a system-property (-Dmyproperty.override.write-delay=5s for ex.)
    I'm getting the following failure
    Description
    Location
    Type
    cvc-type.3.1.1: Element 'write-delay' is a simple type, so it cannot have attributes, excepting those whose namespace name is identical to 'http://www.w3.org/2001/XMLSchema-instance' and whose [local name] is one of 'type', 'nil', 'schemaLocation' or 'noNamespaceSchemaLocation'. However, the attribute, 'system-property' was found.
    line 41
    XML Problem
    Do you know if the override is valid at that location? The documentation says YES.
    What am I doing wrongly?
    Thanks,
    Harry

    Hello Leo_TA,
    thanks for the answer.
    Actually I need a default value which can be overriden at runtime as described in the documentation
    http://docs.oracle.com/cd/E18686_01/coh.37/e18677/appendix_cacheconfig.htm#BHCECGCF
    This is very handy to move conifguration items outside the cache-config.
    Do you know why the xml woul dnot validate when system-property is used in the write-delay?
    <?xml version="1.0" encoding="UTF-8"?>
    <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
                  xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
    </cache-config>
    Coherence accepts it (when we force no xml validation (removing the xmlns)).
    But I would like to use the xml validation to avoid miss-configurations.
    Regards
    Harry

  • Transmit payload NI-XNET CAN

    Hi guys, Im using a NI-XNET can PCI device. How to transmit a payload on the bus?
    Solved!
    Go to Solution.

    Hello JoVMo,
    You can use the XNET Write (Frame CAN).vi
    More information concerning the VI you find on the following link: http://www.ni.com/pdf/manuals/372840a.pdf (see page 216/848 or Chapter 4: 173)
    Extra information concerning the  NI-XNET API, you can find here: http://zone.ni.com/devzone/cda/tut/p/id/12375
    Kind regards,
    Nico

  • How do we use if statement in labview?moreover can i use if statement inside for loop?

    how do we use if statement in labview?moreover can i use if statement inside for loop?

    The if statement in LabVIEW is the Case structure. You can find that on the Structures palette right next to the For Loop. If you're still on the same subject about terminating a for loop early, then what you do is enclose your functions inside the loop with a case statment and make one of the case's empty except for one or more constants that you might have to wire. Hopefully, the attached picture will explain what I mean. Also, as I mentioned in one of your other posts, I think this technique is not as good as using a while loop. The array in the attached example is the same size no matter what and you may have to handle stripping extra or invalid elements.
    Attachments:
    For_Loop_with_Case.jpg ‏21 KB

  • How I can write a program with pythagoras?

    I have a problem. I�m a 14-kears old Java-beginner and I�ll write a program for school ( I will get a better mark when i write the program). This programm should multiply 3 letters 30-times. But how I can write the damn thing? I habe no idea, please help me!
    Thnax a lot Devproger
    (Sorry for the bad English but I am a German Student who is still learning this language)

    I will only have a better mark in Maths... and wirte this Programm...Yes, you'll get a better grade by writing that program. Start programming then!
    If you run into problems, post the code that's not working here, and tell us what it is that's not working.
    When posting code, read this: http://forum.java.sun.com/help.jspa?sec=formatting
    Good luck.

  • I would like to read a text file in which the decimal numbers are using dots instead of commas. Is there a way of converting this in labVIEW, or how can I get the program to enterpret the figures in the correct way?

    The program doest enterpret my figures from the text file in the correct way since the numbers contain dots instead of commas. Is there a way to fix this in labVIEW, or do I have to change the files before reading them in the program? Thanks beforehend!

    You must go in the labview option menu, you can select 'use the local
    separator' in the front side submenu (LV6i).
    If you use the "From Exponential/Fract/Eng" vi, you are able to select this
    opton (with a boolean) without changing the labview parameters.
    (sorry for my english)
    Lange Jerome
    FRANCE
    "Nina" a ecrit dans le message news:
    [email protected]..
    > I would like to read a text file in which the decimal numbers are
    > using dots instead of commas. Is there a way of converting this in
    > labVIEW, or how can I get the program to enterpret the figures in the
    > correct way?
    >
    > The program doest enterpret my figures from the text file in the
    > correct way since the numbers contain dots instea
    d of commas. Is there
    > a way to fix this in labVIEW, or do I have to change the files before
    > reading them in the program? Thanks beforehend!

  • In which part of the page i can write java script

    Hi
    I'm new with ADF and web development
    I have a java script function that show a tooltip.
    This is the function:
    *function positionTip(evt) {*
    *     if (!tipFollowMouse) {*
    *          standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body*
    *          mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;*
    *          mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;*
    *     // tooltip width and height*
    *     var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;*
    *     var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;*
    *     // document area in view (subtract scrollbar width for ns)*
    *     var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;*
    *     var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;*
    *     // check mouse position against tip and window dimensions*
    *     // and position the tooltip*
    *     if ((mouseX+offX+tpWd)>winWd)*
    *          tipcss.left = mouseX-(tpWd+offX)+"px";*
    *     else tipcss.left = mouseX+offX+"px";*
    *     if ((mouseY+offY+tpHt)>winHt)*
    *          tipcss.top = winHt-(tpHt+offY)+"px";*
    *     else tipcss.top = mouseY+offY+"px";*
    *     if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);*
    My ADF page source code is
    *<?xml version = '1.0' encoding = 'windows-1252'?>*
    *<page xmlns="http://xmlns.oracle.com/uix/controller"*
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
    xmlns:myTemplate="selfservice">
    *<templates xmlns="http://xmlns.oracle.com/uix/ui">*
    *<templateImport source="mainTemplate.uit"/>*
    *</templates>*
    *<content>*
    *<dataScope xmlns="http://xmlns.oracle.com/uix/ui">*
    *<provider>*
    *<!-- Add DataProviders (<data> elements) here -->*
    *</provider>*
    *<contents>*
    *<document>*
    *<metaContainer>*
    *<!-- Set the page title -->*
    *<head title="General Manager"/>*
    *</metaContainer>*
    *<contents>*
    *<body>*
    *<contents>*
    *<form name="form0">*
    *<contents>*
    *<myTemplate:SelfService title="General Manager">*
    *<contents/>*
    *<tabs/>*
    *<pageButtons/>*
    *<globalButtons/>*
    *<pageHeader/>*
    *<start/>*
    *<end/>*
    *<about/>*
    *<copyright/>*
    *<privacy/>*
    *<corporateBranding/>*
    *<productBranding/>*
    *</myTemplate:SelfService>*
    *<formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>*
    *<table model="${bindings.HrsVEmpPhonesView1}" id="HrsVEmpPhonesView13" partialRenderMode="multiple" partialTargets="_uixState" showAll="yes" width="900">*
    *<contents>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'EmpNameAr')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.EmpNameAr}" columns="10" readOnly="true" onMouseOver="&quot;showTooltip(event,'This is a tooltip with a transparent shadow effect. Can you see the letters underneath the shadow?');return false&quot;"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'JobDescr')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.JobDescr}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'PhoneExt')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.PhoneExt}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntCellPhone')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.CntCellPhone}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'CntHomePhone')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model="${uix.current.CntHomePhone}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *<column>*
    *<columnHeader>*
    *<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.HrsVEmpPhonesView1,'IaigcEmail')}"/>*
    *</columnHeader>*
    *<contents>*
    *<textInput model= "${uix.current.IaigcEmail}" columns="10" readOnly="true"/>*
    *</contents>*
    *</column>*
    *</contents>*
    *<tableSelection/>*
    *</table>*
    *</contents>*
    *</form>*
    *</contents>*
    *</body>*
    *</contents>*
    *</document>*
    *</contents>*
    *</dataScope>*
    *</content>*
    *<handlers>*
    *<!-- Add EventHandlers (<event> elements) here -->*
    *<event name="goto sort" source="HrsVEmpPhonesView13">*
    *<invoke method="handleTableUiEvent" javaType="oracle.cabo.adf.rt.AdfUtils">*
    *<parameters>*
    *<parameter javaType="oracle.adf.model.binding.DCIteratorBinding" value="${bindings.HrsVEmpPhonesView1Iterator}"/>*
    *<parameter javaType="oracle.cabo.servlet.expl.ControllerImplicitObject" value="${uix}"/>*
    *</parameters>*
    *</invoke>*
    *</event>*
    *<event name="select" source="HrsVEmpPhonesView13">*
    *<set target="${bindings.HrsVEmpPhonesView1Iterator}" property="currentRowIndexInRange" value="${ui:tableSelectedIndex(uix, 'HrsVEmpPhonesView13')}"/>*
    *</event>*
    *</handlers>*
    *</page>*
    I want to add this function to my page
    In which part exactly i can write this function
    thanks in advance

    To add to this, if you prefer you can separate your JavaScript from your JSF pages.
    Add a folder (I named mine 'js') to your application's ViewController project's public_html folder.
    Via JDeveloper, create a new JavaScript file inside your newly created folder and place your JavaScript functions inside it.
    You can then 'load' the .js file using the method Shantala described, with the addition of an added 'source' property to the af:reference tag.
    (This can also be a URI reference to a JavaScript file hosted on a web server)
    <f:facet name="metaContainer">
      <af:resource source="/js/myJsFile.js" type="javascript"/>
    </f:facet>The benefits of this 'split' are cleaner JSF page source and also code-highlighting and formatting within the .js file making finding and fixing bugs in your JavaScript much easier.
    It appears however, that when using <af:resource> to load scripts, once the page has been submitted even once, the JavaScript is no longer available to the page. Which isn't very useful.
    A solution is to use <trh:script>.
    Add xmlns:trh="http://myfaces.apache.org/trinidad/html" to your <jsp:root> tag and install the library.
    then in place of the above code use:
    <f:facet name="metaContainer">
      <trh:script id="script1" source="/js/myJsFile.js"/>
    </f:facet>Now after a page submit the JavaScript still functions.
    Edited by: Matthew Carrigy on 12/08/2009 10:39

  • I want to play video on my computer to make some analysis to frames,the problem that I face ,I can't change video frame rate using labview,but I can change frame rate to the video out of labview using some program

    HI All
    I want to play video on my computer to make some analysis to it's frames,the problem that I face ,I can't change video frame rate using labview,but I can change frame rate to the video out of labview using some program .
    I used IMAQ AVI Read Frame VI
    for example I have avi video It's frame rate is 25 fbs ,my image processing code is very fast that can process more 25 fbs,so I want to accelerate video acquisition

    Hi abdelhady,
    I looked into this further, and reading an AVI file into LabVIEW faster than its frames per second won't be possible. LabVIEW could read in frames faster than 25fps, but because it will be pulling the available frame at that point in time this would just give you duplicate frames. If you want to be able to read in frames at faster than 25fps, you would need to speed up your AVI file before reading into LabVIEW.
    There's a good shipping example to show how to read in from an AVI file, "Read AVI File.vi". You'll notice that they add timing to make sure that the while loop runs at the right speed to match up with the frames per second of the file being read. This is to make sure you're not reading duplicate frames.
    Thank you,
    Emily C
    Applications Engineer
    National Instruments

  • Help on locking MySQL tables (many can read, but only one can write) Java

    Hi there,
    I have a question regarding locking of tables so that only one person can write to the file, but many are able to read the files (or tables entities).
    I am not sure if I need to lock the tables in my Java code or do I lock the tables within the MySQL syntax. I'm just a little confused on the matter.
    This java code is a working prototype of inserting a customer data into the database and that works fine. I just don't know how to implement it so that only one person can update the table at a time.
    Here is the Customer.java code that I have written.
    Help would be greatly appreciated, thanks so much.
    package business;
    //~--- non-JDK imports --------------------------------------------------------
    import shared.info.CustomerInfo;
    //~--- JDK imports ------------------------------------------------------------
    import java.sql.*;
    * @author
    public class Customer {
        static Connection    con  = DBConnection.getConnection();
        private CustomerInfo info = new CustomerInfo();
        private String               customerID;
        private String               firstName;
        private String               lastName;
        private String               email;
        private String               addressID;
        private String               homePhone;
        private String               workPhone;
        private String               unitNum;
        private String               streetNum;
        private String               streetName;
        private String               city;
        private String               provinceState;
        private String               country;
        private String               zipPostalCode;
        public Customer(String id) {
            try {
                PreparedStatement pstmt = con.prepareStatement("SELECT * FROM " +
                        "Customer NATURAL JOIN Address WHERE CustomerID = ?");
                pstmt.setString(1, id);
                ResultSet rs = pstmt.executeQuery();
                while (rs.next()) {
                    customerID    = rs.getString("CustomerID");
                    firstName     = rs.getString("FirstName");
                    lastName      = rs.getString("LastName");
                    homePhone     = rs.getString("HomePhone");
                    workPhone     = rs.getString("WorkPhone");
                    email         = rs.getString("Email");
                    city          = rs.getString("City");
                    provinceState = rs.getString("ProvinceState");
                    country       = rs.getString("Country");
                    zipPostalCode = rs.getString("ZipPostalCode");
                    unitNum       = rs.getString("UnitNum");
                    streetNum     = rs.getString("StreetNum");
                    streetName    = rs.getString("StreetName");
                    addressID     = rs.getString("AddressId");
            } catch (SQLException e) {
                e.printStackTrace();
            info.setCustomerID(customerID);
            info.setFirstName(firstName);
            info.setLastName(lastName);
            info.setHomePhone(homePhone);
            info.setWorkPhone(workPhone);
            info.setEmail(email);
            info.setCity(city);
            info.setProvinceState(provinceState);
            info.setCountry(country);
            info.setZipPostalCode(zipPostalCode);
            info.setUnitNum(unitNum);
            info.setStreetNum(streetNum);
            info.setStreetName(streetName);
            info.setAddressID(addressID);
        public static void addCustomer(CustomerInfo cust) {
            try {
                int id = -1;
                PreparedStatement pstmt = con.prepareStatement("INSERT INTO Address" +
                        "(UnitNum, StreetNum, StreetName, City, ProvinceState, Country," +
                        " ZipPostalCode) VALUES(?, ?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getUnitNum());
                pstmt.setString(2, cust.getStreetNum());
                pstmt.setString(3, cust.getStreetName());
                pstmt.setString(4, cust.getCity());
                pstmt.setString(5, cust.getProvinceState());
                pstmt.setString(6, cust.getCountry());
                pstmt.setString(7, cust.getZipPostalCode());
                pstmt.executeUpdate();
                ResultSet rs = pstmt.getGeneratedKeys();
                rs.next();
                id = rs.getInt(1);
                pstmt = con.prepareStatement("INSERT INTO Customer" +
                        "(FirstName, LastName, HomePhone, WorkPhone, Email, AddressID)"
                        + "VALUES(?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getFirstName());
                pstmt.setString(2, cust.getLastName());
                pstmt.setString(3, cust.getHomePhone());
                pstmt.setString(4, cust.getWorkPhone());
                pstmt.setString(5, cust.getEmail());
                pstmt.setInt(6, id);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
        public void setFirstName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET FirstName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            firstName = newName;
        public void setLastName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET LastName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            lastName = newName;
        public String getFirstName() {
            return firstName;
        public String getLastName() {
            return lastName;
        public void setHomePhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET HomePhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            homePhone = number;
        public String getHomePhone() {
            return homePhone;
        public void setWorkPhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET WorkPhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            workPhone = number;
        public String getWorkPhone() {
            return workPhone;
        public void setEmail(String email) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer" + " SET Email = ? WHERE CustomerID = ?");
                pstmt.setString(1, email);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.email = email;
        public String getEmail() {
            return email;
        public void setUnitNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET UnitNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            unitNum = num;
        public String getUnitNum() {
            return unitNum;
        public void setCity(String city) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET City = ? WHERE AddressId = ?");
                pstmt.setString(1, city);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.city = city;
        public String getCity() {
            return city;
        public void setStreetNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET StreetNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetNum = num;
        public String getStreetNum() {
            return streetNum;
        public void setStreetName(String name) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET StreetName = ? WHERE AddressId = ?");
                pstmt.setString(1, name);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetName = name;
        public String getStreetName() {
            return streetName;
        public void setZipPostalCode(String code) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET ZipPostalCode = ? WHERE AddressId = ?");
                pstmt.setString(1, code);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            zipPostalCode = code;
        public String getZipPostalCode() {
            return zipPostalCode;
        public CustomerInfo getInfo(){
            return info;
        static void deleteCustomer(String customerId) {
            try{
                PreparedStatement pstmt = con.prepareStatement("DELETE FROM Customer" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, customerId);
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
        static void updateCustomer(CustomerInfo custInf) {
            try{
                PreparedStatement pstmt = con.prepareStatement("UPDATE customer" +
                        " SET firstName = ?, SET lastName = ?," +
                        " SET homePhone = ?, SET workPhone = ?, SET email = ?" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, custInf.getFirstName());
                pstmt.setString(2, custInf.getLastName());
                pstmt.setString(3, custInf.getHomePhone());
                pstmt.setString(4, custInf.getWorkPhone());
                pstmt.setString(5, custInf.getEmail());
                pstmt.setString(6, custInf.getCustomerID());
                pstmt.executeUpdate();
                pstmt = con.prepareStatement("UPDATE address" +
                        " SET unitNum = ?, SET StreetNum = ?, SET StreetName = ?," +
                        " SET city = ?,SET Province = ?,SET country = ?,SET ZipPostalCode = ?" +
                        " WHERE AddressId = ?");
                pstmt.setString(1, custInf.getUnitNum());
                pstmt.setString(2, custInf.getStreetNum());
                pstmt.setString(3, custInf.getStreetName());
                pstmt.setString(4, custInf.getCity());
                pstmt.setString(5, custInf.getProvinceState());
                pstmt.setString(6, custInf.getCountry());
                pstmt.setString(7, custInf.getZipPostalCode());
                pstmt.setString(8, custInf.getAddressID());
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
    }In addition, here is my customer sql table.
    -- Table structure for table `customer`
    DROP TABLE IF EXISTS `customer`;
    CREATE TABLE `customer` (
    `CustomerID` mediumint(9) NOT NULL auto_increment,
    `FirstName` varchar(20) NOT NULL,
    `LastName` varchar(20) NOT NULL,
    `HomePhone` varchar(11) NOT NULL,
    `WorkPhone` varchar(11) default NULL,
    `Email` varchar(20) NOT NULL,
    `AddressID` mediumint(9) default NULL,
    PRIMARY KEY (`CustomerID`),
    KEY `AddressID` (`AddressID`),
    CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`AddressID`) REFERENCES `address` (`AddressID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    -- Dumping data for table `customer`
    LOCK TABLES `customer` WRITE;
    /*!40000 ALTER TABLE `customer` DISABLE KEYS */;
    /*!40000 ALTER TABLE `customer` ENABLE KEYS */;
    UNLOCK TABLES;

    to the best of my knowledge, this is something related to the database and not the programming. If you'd want to be the only user to read and edit the table, speicify only one user with that privilege and make it password protected. User must enter the password to write to the tables.

  • How do I know if my inbuilt Superdrive can write DVDs or not[MBP]?

    Details about the superdrive:
    MATSHITA DVD-R   UJ-868:
      Firmware Revision:          KB19
      Interconnect:          ATAPI
      Burn Support:          Yes (Apple Shipping Drive)
      Cache:          2048 KB
      Reads DVD:          Yes
      CD-Write:          -R, -RW
      DVD-Write:          -R, -R DL, -RW, +R, +R DL, +RW
      Write Strategies:          CD-TAO, CD-SAO, DVD-DAO
    Problems I am having with my superdrive(not so super):
    1) It just ejects 8 out of 10 discs I insert aftew few seconds of trying when my other Macbook Black or my wife's old Dell laptop can do it in few secs. Discs arenot so scratched either.
    2) I am confused if it can write DVDs or not because when I check the info about my superdrive on it says I can as you can see above but idk I also have Windows 7 installed on my MBP using Parallels and inside My Computer my superdrive is tagged as "DVD-ROM drive". What is it?
    3) When I insert a already burned DVDs or CDs containing data,  my Superdrive thinks its a blank disc and asks me what do I want to do with it for eg: burn.
    What do you think about this? What is happening? Is my superdrive being dead? Is there any thing I can do as a last resort before thinking I have a MBP without an optical drive?
    Oh btw I was also searching on Google for the solution of this problem and I saw few people talking about their region locked superdrive or something like that? Do you think my superdrive is refusing to read discs because it is region locked or something?
    Thank you so much for your time

    brobama2 wrote:
    It just ejects 8 out of 10 discs I insert aftew few seconds of trying
    The lens may be dusty. Try using a lens cleaning disc.
    inside My Computer my superdrive is tagged as "DVD-ROM drive"
    Ignore it.
    Do you think my superdrive is refusing to read discs because it is region locked or something?
    No. That concerns only commercial entertainment DVDs (movies).

  • LabVIEW 64-bit - Can I build a 32-bit exe

    LabVIEW 64-bit - Can I build a 32-bit exe

    Hi Gary
    Not at the moment - see here
    You'll need to open your VI up in the 32 bit version and compile from there.
    Kind Regards
    Chris | Applications Engineer NIUK

  • Regarding database tables in which i can write directly

    hi experts,
                      i have to create a database table in which i can write directly in to the table with out using update statement,what sud i do for this plz help me......

    Hi Ravi,
    If you mean you need to directly update values on the screen, SE11 has a menu for the table maintenance generator. In there you can generate screens and everything needed for your table to allow entry with or without transports. You then capture the data through transaction SM30 or SM31.
    Cheers
    Wayne

  • Why do we use BADI (CRM_BWA_MFLOW) when we can write code in CMOD?

    Hello Gurus,
        I'm working on CRM, BW extraction. I made enhacement for Service Order Header DataSource and written code in MFLOW BADi. Its working good.
    Now my question is we can write code in CMOD user exit too for this enhcenement (am I right?).
    Then what is the difference? Which one should we have to do??? Any idea or documents? please respond....
    Thanks
    RKR
    Message was edited by:
            RKR M

    Hi,
    Go thru this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/a-c/customer%20enhancements%20and%20userexits%20in%20bw%20-%20sap%20netweaver%20%20know-how%20network%20webinar.pdf
    Hope this helps you.
    PB

  • Is it possible we can write a perform statement in BADI?

    Hi ,
    Is it possible we can write a perform statement in BADI? Can any one please let me know .
    Thanks.

    Sure it is possible,  you just have to reference the program inwhich  the FORM exists.  Since the call is in a method, where do you put the actual FORM, well you need to put it in a separate program or subroutine pool, then you can call it from within the method.
    perform some_form in program zsubroutine_pool.
    Regards,
    RIch Heilman

Maybe you are looking for

  • Error message during replacement of the account symbol - Bank statements

    Hello all, Even though I have completed the customizing and tested some bank statements, there are some bank transactions that aren't being posted. The error message is: ++Account symbol TRANSFER.RECIB. cannot be replaced (modif. + )+ +Message no. F8

  • End of file

    Hi! I just want to read a text file line by line (without knowing how many lines of text the file contains). I don't know much about file reading/writing in Java, but I found these lines of code that work: FileInputStream file = new FileInputStream("

  • Form server failing with networ error

    Hi I have a forms 10g application deployed over a HPUX server. the problem is FRM-92102 error (a network error has occured) whenever the server is restarted i.e. I access it for the first time I am able tologin to the forms and open few forms, after

  • Airport is acting strange, slowing my internet

    About a week ago I started experiencing a rather strange issue with my MacBook Pro. While connected to my network, my internet still works but when I try to connect to website it takes a good 10-15 seconds to load a web page during that time my brows

  • Re:  Book on java ivew development,jspdynpages.

    Hi all, I'm presently working in portal development. I went through the book in this link, it is not complete.Can any body help me by giving the full version of this book or the java ivew development part of this book. Otherwise any documents related