Saving portion of data acquired from FPGA and visualize it on HOST RT Waveform Graph

Hi all,
i'm using FPGA to acquire data @1 Mhz from a Custom module in a SCTL an place it in a block memory Target Scoped FIFO1 Block memory of 1023 elements.
What i want to do is acquire a known waveform and and visualize acquired data just to check if data is corrupted or if samples are correctly representing waveform.
I'm reading data from FIFO1 and placing in a MEMORY in another SCTL to not affect 1st SCTL.
My intention in this is to create a one shot reading operation to place 1023 elements from FIFO1 to MEMORY (attached pic).
After this i have another while loop that perform communication with the HOST to read data from MEMORY.
data type is FXP signed 24 bits word with 24 bit integer part. 
I cannot visualize anything on the host waveform graph.. Can you tell me why?
I've attached FPGA vi and HOST vi.
Thanks in advance.
Attachments:
1.png ‏60 KB
TEST acquired waveform.vi ‏170 KB
Host Testing Acquired Data.vi ‏112 KB

Hi Mariano,
I need your complete project in order to review your application. Anywhere, you could try to run this example, that shows you the best practice in order to achieve data integrity ensuring no underflow/overflow events in data transfer.
In RT VI you can try to use Type Cast function in order to obtain DBL values from FXP ones.
Look @ this white paper that allows you to use floating point in FPGA side.
I hope that the above informations will help you in solve your issue.
Best Regards.
CLA_CUP

Similar Messages

  • How to save data acquired from NI-DAQ in text format instead of TDMS using the DAQ-mx ANSI C code?

    Hi,
    I wanted to save data acquired from NI-DAQ (for example, NI 9234) in a file using the DAQ-mx ANSI C Code. The response I got was as follows:-
    One way to do it is with TDMS logging. DAQmx comes with functions designed to log to a TDMS file. This is a special file type that is used for collecting data in a logical format. It can be displayed in a TDMS viewer where data is separated into groups and channels. NI-DAQmx provides examples for how to log to TDMS. Look at the TDMS examples in the C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage directory.
    However, now I want to know is there a way that using that same C code, can we save the data in a .txt file format (Text File) instead of a TDMS file? We actually want to access that file through MATLAB (that's why we want to save it in text format).
    Also on an other note, is there a way we can access & open TDMS files by MATLAB?
    Thanks,
    Sauvik Das Gupta

    There's a way you can access TDMS files in MATLAB:
    http://zone.ni.com/devzone/cda/tut/p/id/7446

  • Configurin​g Channels and Acquiring from SCXI and PXI6070E

    Configuring Channels and Acquiring from SCXI and PXI6070E
    Products used: Two SCXI 1520 modules(let's consider A and B) with one PXI 6070E on PXI1011 chassis.
    Problem: i want to know is that whether it is possible to configure channel 0 of A and Channel 0 of B to Channel 0 of PXI6070E
    [email protected]

    As configured,all of the SCXI channels in the 8 slots are multiplexed through Channel 0 of your DAQ device. The general form of a DAQ channel call to the SCXI is:
    ob0!sc(n)!md(m)!(Channels)
    where: ob0 stands for Onboard channel 0 (DAQ Dev)
    sc(n) - chassis n
    md(m) - module m
    channels - channel string [ 0:7 or 0,2,4 or ... ]
    You can perform the operation you want, however, I would suggest using MAX >>Data Neighborhood>>virtual channel. Use the Virtual channel wizard to configure two channels CH0 and CH1 where:
    CH0 is referenced to Module A channel 0
    CH1 is referenced to Module B channel 0

  • Create a continuous data stream from C++, and read it in LabView

    Hello all.
    I'm working on a project which involves connecting to a motion tracker and reading position and orientation data from it in realtime. The code to get the data is in c++, so I decided that the best way to do this would be to create a c++ DLL file which contains all the necessary functions to first connect to the device and read the data from it, and use the Call Library Function node to feed this data into Labview. 
    I'm having trouble though, since ideally I would like a continuous stream of data from the c++ code into Labview, and I'm not sure how to achieve this. Putting the call library function node in a while loop seems like an obvious solution, but if I do it this way I would have to reconnect to the device every time I get the data, which is quite a bit too slow. 
    So my question is, if I created c++ function which created a data stream, could I read this into Labview without having to continually call a function? I'd prefer to only have to call a function once, and then read the data stream until a stop command is given.
    I'm using Labview 2010, version 10.0.
    Apologies if the question is poorly phrased, many thanks for your help.
    Dave
    Solved!
    Go to Solution.

    dr8086 wrote:
    This method sounds like an excellent suggestion, but I do have a few questions where I dont think I've understood fully.
    From what I understand the basic premise is to use one call library function node to access a DLL which creates an instance of the device object, and passes a pointer too it into labview. Then a seperate call library function node would pass this pointer to another DLL which could access the device object, update it and read the data. This part could be in a while loop and carry on reading the data until a stop command is given.
    That's it. I'm including some skeleton code as an example. I'm also including the code because I don't know how much you have experience with multi threading, so I'm showing how you'd have to use critical sections to guard the interactions between threads so that they don't lead to issues.
    // exported function to access the devices
    extern "C" __declspec(dllexport) int __stdcall init(uintptr_t *ptrOut)
    *ptrOut= (uintptr_t)new CDevice();
    return 0;
    extern "C" __declspec(dllexport) int __stdcall get_data(uintptr_t ptr, double vals[], int size)
    return ((CDevice*)ptr)->get_data(vals, size);
    extern "C" __declspec(dllexport) int __stdcall close(uintptr_t ptr, double last_vals[], int size)
    int r= ((CDevice*)ptr)->close();
    ((CDevice*)ptr)->get_data(last_vals, size);
    delete (CDevice*)ptr;
    return r;
    // h file
    // Represents a device
    class CDevice
    public:
    virtual ~CDevice();
    int init();
    int get_data(double vals[], int size);
    int close();
    // only called by new thread
    int ThreadProc();
    private:
    CRITICAL_SECTION rBufferSafe; // Needed for thread saftey
    vhtTrackerEmulator *tracker;
    HANDLE hThread;
    double buffer[500];
    int buffer_used;
    bool done; // this HAS to be protected by critical section since 2 threads access it. Use a get/set method with critical sections inside
    //cpp file
    DWORD WINAPI DeviceProc(LPVOID lpParam)
    ((CDevice*)lpParam)->ThreadProc(); // Call the function to do the work
    return 0;
    CDevice::~CDevice()
    DeleteCriticalSection(&rBufferSafe);
    int CDevice::init()
    tracker = new vhtTrackerEmulator();
    InitializeCriticalSection(&rBufferSafe);
    buffer_used= 0;
    done= false;
    hThread = CreateThread(NULL, 0, DeviceProc, this, 0, NULL); // this thread will now be saving data to an internal buffer
    return 0;
    int CDevice::get_data(double vals[], int size)
    EnterCriticalSection(&rBufferSafe);
    if (vals) // provides a way to get the current used buffer size
    memcpy(vals, buffer, min(size, buffer_used));
    int len= min(size, buffer_used);
    buffer_used= 0; // Whatever wasn't read is erased
    } else // just return the buffer size
    int len= buffer_used;
    LeaveCriticalSection(&rBufferSafe);
    return len;
    int CDevice::close()
    done= true;
    WaitForSingleObject(hThread, INFINITE); // handle timeouts etc.
    delete tracker;
    tracker= NULL;
    return 0;
    int CDevice::ThreadProc()
    while (!bdone)
    tracker->update();
    EnterCriticalSection(&rBufferSafe);
    if (buffer_used<500)
    buffer[buffer_used++]= tracker->getRawData(0);
    LeaveCriticalSection(&rBufferSafe);
    Sleep(100);
    return 0;
    dr8086 wrote:
    My main concern is that the object may go out of memory or be deallocated, since it wouldnt be held in any namespace or anything.
    Since you create the object with new, the object won't expire until either the dll is unloaded or the process (LabVIEW) closes. So the object will stay valid between dll calls provided LabVIEW didn't unload the dll (which it does if the VIs are closed). When that happens, I'm not exactly sure what happens to live objects (i.e. if you forgot to call close), I imagine the system reclaims the memory but the device might still be open.
    What I do to make sure that everything gets closed when the dll unloads before I could call close and delete the object is to everytime I create a new object in the dll I add it to a list, when the dll unloads, if the object is still on the list I delete it.
    dr8086 wrote:
    I also have a more general programming question about the purpose of the buffer. Would the buffer basically be a big table of position values, which are stored until they can be read into the rest of the VI? 
    Yes, see the example code.
    However, depending on the frequency with which you need to collect data from the device you might not need this buffer at all. I.e. if you collect a sample about every 100ms then you could remove all threading and buffer related functions and instead read the data from the read function itself like this:
    double CDevice::get_data()
    tracker->update();
    return tracker->getRawData(0);
     Because you'd only need a buffer and a seperate thread if you collect data at a high frequency and you cannot lose any data.
    Matt

  • Triggering a 6024E into data acquisition from start and end number of finite pulse generator from a 6602

    My motion control system is driven by a 6602 I wanted to acquire analog current (to a voltage via I/V converter) from a 6024 AI when:
    (1) At the start of the pulse generation
    (2) Stop at the end of the pulse generation
    (3) Read every possible data between and stream it on the harddisk
    (4) Option to skip at regular intervals to reduce amount of data accumulation
    Anyone have some suggestions? What I did try and attempted was to "loop an AI from a triggered intermediate Analog Input VIs" this is rather erratic!My question for the analog input software are:
    (1)Can you trigger an AI to start a continuous acquisition?
    (2) How do you do AI from a "start" p
    ulse train to "end" pulse train?
    (3) How do you manage time for File I/O meanwhile doing (1) and (2) above?
    Bernardino Jerez Buenaobra
    Senior Test and Systems Development Engineer
    Test and Systems Development Group
    Integrated Microelectronics Inc.- Philippines
    Telephone:+632772-4941-43
    Fax/Data: +632772-4944
    URL: http://www.imiphil.com/our_location.html
    email: [email protected]

    "(1)Can you trigger an AI to start a continuous acquisition?
    (2) How do you do AI from a "start" pulse train to "end" pulse train?
    (3) How do you manage time for File I/O meanwhile doing (1) and (2) above?"
    Answer 1 and 2)
    Yes you can, This VI is part of the search examples that ships with LV:
    "Continuous Acquisition & Graph Using Digital Triggering and External Scan Clock
    Demonstrates how to continuously retrieve data from one or more analog input channels using an external scan clock when a digital start trigger occurs."
    Go to Search Examples in the Help/Contents of LV. Then pick I/O Interfaces/Data Acquisition (DAQ)/Analog Input/Triggering an Acquisition/Triggering a Continuous Acquistion.
    This VI is appropriate ifs you want to clock the DAQ with some clock (external scan clock) other than the on board clock.
    The start trigger required by the DAQ card will be a TTL signal attached to the PFI0/TRIG1 pin of you DAQ card (via whatever signal conditioning you have).
    The external clock also needs to be TTL and is attached to the PFI7/STARTSCAN pin.
    You tell it which AI channel to use and wire that up appropriately.
    All of this stuff is in the context help for the VI.
    Answer 3)
    You have a misconception of how the acquisition makes its way into a file on the hard disk. You don't really "stream to disk." The VI above will run a buffered acquisition. The DAQ card sets up a buffer that fills with the data continously. When you use the VI you set up how the buffer is configured, you will see controls for buffer size, number of scans to read at a time, etc. The acquisition runs data into the buffer continously and reads from the buffer are a parallel process where chuncks of the buffer are extracted serially. You can end up with a scan backlog where the reads are falling behind the data. Making the buffer bigger helps. All of this is limited by the sampling capability of the DAQ card. 200kSamples/second is for one channel of AI. Divide by 2 for 2 channels. etc.
    The short answer is that the VI and DAQ card manage the file I/O for you.
    The VI above writes the scan out to the waveform chart on the front panel. You will want to wire that data out from the AI Read Sub VI to a spreadsheet file in tab delimited form or similar.
    Look inside the VI block diagram. There is a While loop containing the AI Read. Every time the loop runs (unless you hit STOP), the AI Read plucks the specified # of scans from the buffer (starting from the last unread datum). If you wire the double orange wire from AI Read out of the loop (and set the tunnel for Auto Indexing) the Vi will build another buffer in memory that is a series of AI Reads appended to each other, a sequencial record of the acquisition. Here you put in a Write to Spreadsheet VI. This is in the Functions Pallete, it is the first VI in the File I/O Pallette (icon looks like a 3 1/2 disckette).
    There is more to it than this. The spreadsheet Write is 1D or 2D only. By running the array out of the while loop with auto indexing enabled, you create a 3D array. (If you turn off auto indexing you will only get the last array performed by the AI Read.) You will need to create a new array withe the pages of the array placed serially into a 2d array. I don't think I want to get into that. It isn't that bad to do, but you should get some time messing with arrays on your own, then you will see how to do it yourself. One solution is to only run the While loop once with a buffer big enough to hold the whole acquisition, or in other words no loop at all. I don't know how many scans you want. The other thing is by wiring that AI Read out of the loop you are creating an array that must be dynamically resized as the loop runs. Kind of a no no. Better to know what you are acquiring size wise and letting the VI set up buffers and array space that does not need to be changed as the program runs.
    Caveat: I am fairly new to this and I could be wrong about the arrays and buffers and system resources stuff. However, I have done essentially what you are trying to do succesfully, but not "continuously." I limited the AI Read to one large read that gets what I need.
    "Continously" is usually reserved for screen writes as in the VI above. The computer is not required to continually allocate space for an ever expanding array to be written as a file later. Each time this VI runs the While Loop the data goes to the waveforn chart. Each new AI read overwrites the previous one. Sort of like if you turn the Auto Indexing off. When the VI stops, the waveform chart on screen would show the same data as was written to the spreadsheet.
    Feel free to email me directly: [email protected]. I will help as I can.
    Mike Ross

  • Data extraction from SD and MM modules

    Hello people,
                        I want to know what are all the ways by which we can extract data from SD and MM modules including LO LiS cockpit, like how easy or difficult it will be using LO, can we extract this data using business content, creating two background users in BW and R/3 systems and using logical and client systems for extraction. what would be the simplest way to extract this data?
    thanks and Regards,
    Ethan

    Hi Ravi,
                thanks for your time. Is LO or LIS cockpit the only way to extract data from SD and MM modules ? are there any other ways and if business content can be used in those ways, please let me know. Also, tell me if  these steps would work in extracting data from SD and MM modules:
    1. creating a logical system for the R/3 client
    2. creating a logical system for the BW client
    3. Naming background users
    4. Creating R/3 source system in BW
    5. transferring R/3 global settings
    6. replicating R/3 data sources.
    7. Installing business content objects and then loading R/3 data.
    Thanks and regards
    Ethan

  • Data needed from emp and dept tables

    Wondering if somebody can querry the emp table and dept table that comes with some versions of oracle already built in.
    I need the data produced from these two querries
    select * from emp
    select * from dept

    If you look in ORACLE_HOME/sqlplus/demo you'll find demobld.sql which contains the script the build all the scott tables.

  • Ho to automate data extraction from KSB1 and GR55 transaction code

    Hi All,
    Can you please let me know if their is a way to automate data extraction from transaction code KSB1 and GR55. I have to extract data from 5 different servers .i.e different server for each region and again i have different controlling area codes in each region. Following are the details which i use to extract the data. It takes too long for me to extract data from all this regions and controlling area codes using my parameters. It's very time consuming so i want to automate this process. I am end user so i don't have any admin rights. Please let me know any workable solution asap.
    Production areas : PNA for Americas, PSI for Asia Pacific and Japan, PGY for Germany, PIT for Italy and PEU for Europe
    Controlling area codes in PNA : CAR for Argentina, CBR for Brazil, CMX for Mexico and CUS for USA. Same way there so may other controlling area codes for all other production areas
    Period From 1 to 12
    Fiscal Year : 2009
    Cost Centre Group : G_6284
    Cost Element Group : 1742000000
    Please let me know in case you need more details.

    Hi,
    Here follows a translation from German:
    SAP GUI (client) for Windows enable
    Start SAP Logon and log on to the SAP server.
    Click the button on the toolbar to adjust for Local Layout.
    Click Options and then click the tab for the scripting.
    Select the Enable checkbox for scripting.
    Disable the checkbox for Notify when a script is assigned to an active GUI and the checkbox for Notify when a script opens a connection.
    Save the settings and restart the SAP GUI again.
    SAP-server enable
    With the following procedure, you can enable scripting by the SAP client temporarily. The specified value in this way is lost when you restart the server.
    Start SAP Logon and log on to the SAP server.
    Start a transaction RZ11.
    Enter sapgui / user_scripting in the window to manage the profile parameters.
    Click on ads.
    Click in the window to display the profile parameter attributes to change value.
    Enter TRUE in the field for a new value.
    Save the settings and log out from the SAP GUI.
    Quit the SAP Logon.
    Note:
    If the server administrator edited the application server profile of the SAP system to sapgui / user_scripting = TRUE to include the scripting is enabled when you restart the server by default.
    SAP provides an option to change the network connection mode at any server. The following two connection modes are available: high-speed connection (LAN) and connecting with a slow speed. Although Functional Tester works in both modes, the high-speed connection with a recorded script is played only in this mode. This also applies to other modes. They must reflect your SAP script in the same network connection mode, with which the script was recorded. It is recommended that the mode of "high-speed connection, as it offers a greater number of valid recognition properties.
    Regards,
    ScriptMan
    Edited by: ScriptMan on Apr 13, 2010 12:32 PM

  • Data Extraction from CRM and Informatica

    Hi Guru's,
    Could any one tell me how to extract the data from the CRM and Informatica in to BW.
    Please give me the steps.
    Thanks in advance....

    Steps for Extracting data from CRM:
    Configuration Steps
    1.Click on ->Assign Dialog RFC destination
    If your default RFC destination is not a dialog RFC destination, you need to create an additional dialog RFC destination in addition and then assign it to your default RFC destination
    2.Execute Transaction SBIW in CRM
    3.Open BC DataSources.
    4.Click on Transfer Application Component Hierarchy
    Application Component hierarchy is transferred.
    5.SPRO in CRM .Go to CRM->CRM Analytics
    6.Go to transaction SBIW-> Settings for Application specific Data Source ->Settings for BW adapter
    7.Click on Activate BW Adapter Metadata
    Select the relevant data sources for CRM sales
    8.Click on Copy data sources
    Say yes and proceed
    9.Logon to BW system and execute transaction RSA1.
    Create a source system to establish connectivity with CRM Server
    A source system is created. (LSYSCRM200)(Prerequisites: Both BW and CRM should have defined Back ground, RFC users and logical systems)
    10.Business content activation for CRM sales area is done
    11.Click on source system and choose replicate datasources.
    KJ!!!

  • Data transfer from R3 and BW TO external system

    Hi experts
    I got one question which I couldnt find good answer.
    it concerns...data transfer from both R3 system and BW(here data is master data) to an external system.
    what are the various options to do this both from BW side and R3 side?
    which of them offers best performance?
    Thanks
    BR
    Amanda
    Edited by: amanda ciders on Nov 20, 2008 2:17 PM

    Hi
    Im aware that I can use OpenHub Functionality for this.Can anyone explain how to do this as I am unable to implement this for this situation.....
    do anybody know other solutions like creating views or FM like that...
    .it will be of great help if u can explain any solution in greater detail(including open hub)..
    Thanks
    BR
    Amanda
    Edited by: amanda ciders on Nov 20, 2008 2:26 PM

  • MyDAQ - Generating a digital signal and displaying it on an analog waveform graph

    Hi,
    I am using the NI MyDAQ to generate a digital waveform with an adjustable frequnecy. This is being implemented into a program I have already written which generates a TTL "like" pulse out of the sound card. I am displaying the output on an analog waveform graph, and I'd like to be able to display the digital waveform generated by the myDAQ on the same graph. (Not at the same time, either one or the other, toggled by a button). I've been messing with arrays and conversions but I cant seem to really get anywhere with it all.
    This is the vi I have made to generate the adjustable frequency digital signal with MyDAQ. Any suggestions on the proper way to do this if the following is wrong would be great too as I just got the MyDAQ a few days ago. I would think there must be a better way but this is the best I could come up with so far.
    Solved!
    Go to Solution.

    Hi Jonny,
    The general logic you are using to create a digital pulse train is fine. This VI you've written should work and will create the pulse train based on software timing (which is fine because you don't have hardware-timed DIO on the myDAQ anyway). However, it is usually good practice to start the DAQmx task just before your while loop and then clear the task after the while loop when you press stop.
    For reference, there are some pretty good LV examples that I recommend looking at for this application too. If you are just trying to create a digital pulse train, the example Gen Dig Pulse Train-Continuous.vi is a good example that uses a counter to create a digital pulse train of your desired frequency. This is generally the prefered method to create a pulse train if you have the hardware available to do so (the myDAQ does have a counter). Alternatively, there are some DIO examples that continuously write to a digital line/port.
    If you're not familiar, you can find the examples by going to Help >> Find Examples... in LV. Then, navigate to Hardware Input and Output >> DAQmx >> Generating Digital Pulses or Digital Generation.
    Also, here is some additional information about the myDAQ and its counters:
    myDAQ Counters 
    myDAQ Manual 
    Hopefully this helps.
    Chris G
    Applications Engineer
    National Instruments

  • Saving form field data with Adobe Reader and Java script.

    We would like to create some customized PDF documents with pre filled form  fields for our customers. The documents will also have extended Java script  functionality to check some entered data and to save the form data to a local  disk.
    Our customers will need to click on their personalized link on our web page  and then download a pdf document with personal pre filled form fields  specifically for that customer.  From our site the PDF file will be dynamically  created and partly filled out with our web application. (The application uses an  external PDF library for the pdf creation).
    They would then need to be able to edit the form fields and save/export  them as a pdf whilst offline.
    The saving/exporting of the data should be implemented by the extended Java  Script functionality (http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf). Once the data has been edited they will send the pdf file directly back to  us.
    The issue we have is with regarded to teh EULA for Acrobat Reader. If we  create those documents with an external application is the user allowed to open  those PDF files with his Adobe Reader without breaking the Adobe Reader  Restrictions in the EULA for the Reader?  (http://www.adobe.com/products/eulas/pdfs/Reader_Player_AIR_WWEULA-Combined-20080204_1313.pdf, chapter 3.2 Adobe Reader  Restrictions)

    Hello,
    the problem which I have pertains only to the Adobe Reader. Because
    our user will use Adobe Reader to open our pdf documents but it looks
    like that the EULA for the Reader doesn't allow the user to open pdf
    files which have the extended option to save data out of the form
    fields unless!! this feature was created by an adobe product. But I
    created the pdf file not with Adobe. So I don't want our user be punished...
    It is actually a question of the law? departement of Adobe. But there
    is no Forum for that
    Or could you please forward my forum question to somebody of this department.
    I don't want to publish a product where the user breaches the EULA
    every time they are opening it
    Regards
    Niels

  • Data Recovery from Partitioned and formatted Bit Locker Encrypted Drive

    Recently because of some issues in windows 7 installation from windows 8 installed OS. it was giving as the disc is dynamic windows can not be installed on it. so at last after struggling hard no other solution i partitioned and formatted my whole
    drive so all data gone included the drive which was encrypted by bit lockers.
    For recovery i used many software such as ontrack easy recover, get data back, recovery my files professional edition but still i couldnt able to recover my data from that drive. then i found some suggestion Using CMD to decrypt my data first 
    http://technet.microsoft.com/en-us/library/ee523219(WS.10).aspx
    where it shows it successfully decrypt my data at that moment my drives were in RAW format excluding on which windows is installed and then in CMD i check Chdsk which also shows no problem found. but now problem is still i coudnt able to recover
    my data then i format the drive D and again tried to recover data using above software after decryption still no result. 
    Now i need assistance how i can recover my encrypted drive as it was partitioned and also formatted but decrypted also as i have its recovery key too. thanks

    Hi ,
    I am afraid that we cannot get the data back if the drive has been formatted even if use the
    BitLocker Repair Tool.
    You’d better contact your local data recovery center to try to get data back.
    Tracy Cai
    TechNet Community Support

  • Excel data read from users and upload in to Oracle DB using custom webpart

    Hi Team,
    I need to get the excel date from user using file upload control and read the data from the excel using custom webpart and validate the each rows whether having the values or not and need to upload the data to the oracle database.
    Can you please let me know the best approach to read the data from excel using sharepoint custom webpart.
    Thanks,
    Mylsamy

    Hi,
    According to your post, my understanding is that you want to read excel data from the uploaded file and insert the data into Oracle Database.
    The following way for your reference:
    1.Create a Visual Web Part using Visual Studio.
    2. Add an asp.net upload control into the .ascx file.
    <div>
    <asp:FileUpload ID="fileupload" runat="server" />
    <asp:Button ID="btnUpload" runat="server" onclick="btnUpload_Click" Text="Upload" />
    </div>
    3. Add some logic methods into .ascx.cs file.
    protected void btnUpload_Click(object sender, EventArgs e)
    //read data and insert the data into Oracle database.
    4.We can create a web service for adding data to Oracle database, then consume this web service in the visual web part.
    More information:
    http://msdn.microsoft.com/en-us/library/ff597539(v=office.14).aspx
    http://manish4dotnet.blogspot.in/2013/02/upload-ans-read-excel-file-using-c.html
    http://msmvps.com/blogs/windsor/archive/2011/11/04/walkthrough-creating-a-custom-asp-net-asmx-web-service-in-sharepoint-2010.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to get Date value from database and display them in a drop down list?

    Hello.
    In my Customers table, I have a column with Date data type. I want to create a form in JSP, where visitors can filter Customers list by year and month.
    All I know is this piece of SQL that is convert the date to the dd-mm-yyyy format:
    SELECT TO_CHAR(reg_date,'dd-mm-yyyy') from CustomersAny ideas of how this filtering possible? In my effort not to sound like a newbie wanting to be spoonfed, you can provide me link to external notes and resources, I'll really appreciate it.
    Thanks,
    Rightbrainer.

    Hi
    What part is your biggest problem?? I am not experienced in getting data out of a database, but the way to get a variable amount of data to show in a drop down menu, i have just messed around with for some time and heres how i solved it... In my app, what i needed was, a initial empty drop down list, and then using input from a text-field, users could add elements to a Vector that was passed to a JComboBox. Heres how.
    package jcombobox;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.swing.*;
    public class Main extends JApplet implements ActionListener {
        private Vector<SomeClass> list = new Vector<SomeClass>();
        private JComboBox dropDownList = new JComboBox(list);
        private JButton addButton = new JButton("add");
        private JButton remove = new JButton("remove");
        private JTextField input = new JTextField(10);
        private JPanel buttons = new JPanel();
        public Main() {
            addButton.addActionListener(this);
            remove.addActionListener(this);
            input.addActionListener(this);
            buttons.setLayout(new FlowLayout());
            buttons.add(addButton);
            buttons.add(remove);
            add(dropDownList, "North");
            add(input, "Center");
            add(buttons, "South");
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == addButton) {
                list.addElement(new SomeClass(input.getText()));
                input.setText("");
            } else if (e.getSource() == remove) {
                int selected = dropDownList.getSelectedIndex();
                dropDownList.removeItemAt(selected);
        public void init(String[] args) {
            setSize(400,300);
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(new Main());
    }And that "SomeClass" is show here
    package jcombobox;
    public class SomeClass {
        private String text;
        public SomeClass(String input) {
            text = input;
        public String toString() {
            return text;
    }One of the things i struggled a lot with was to get the dropdown menu to show some usefull result. If the list just contains class references it will show the memory code that points to that class. Thats where the toString cones in handy. But it took me some time to figure that one out, a laugh here is welcome as it should have been obvious :-)
    When the app is as simple as this one, using a <String> vector would have been easier, but this is just to demonstrate how to place classes in a vector and get some usefull info out of it, hope this answered some of your question :-)
    The layout might have been easier to write, than using the toppanel created by the JApplet and then the two additional JPanels, but it was just a small app brewed together in 15 minutes. Please comments on my faults, so that i can learn of it.
    If you need any of the code specified more, please let me know. Ill be glad to,

Maybe you are looking for

  • Moving pictures from one iphoto library to another

    Hello all, I have a simple question. I have all of my pictures on one computer in an iphoto library. I have a new imac (it's quite lovely) and I would like to move all my pictures to that mac. Which folders do I need to copy and move to my new comput

  • Link labview data with excel sheets

    I would like to save the output of a cluster(containing strings and numeric data) in a specific format(each data in respective columns) in an excel sheet. how do I do it in labview?? I tried mathscript, is there any other way? If there isnt can u sug

  • Help with a java assignment

    I am stuck on some things and I can't find them in my book so here goes. I need to determine if a string is even or odd and then return letters from that word based on which it is. I think i need to use a boolean for the even or odd (not for sure) an

  • How can i see iPhone sms message in my iPad

    how can i see my iPhone ams messages in my iPad?

  • What is the most appropriate way to do reversal and reconcile the reversed

    Dear All, I am facing a problem to reconcile reversal transaction. The scenario as below: Date 28.04.2008 Company A issue billing to Customer XYZ amount 3,000 MYR Date 30.04.2008 Company A want to reverse the above transaction. Questions: 1.Where is