Parallel Port access using Java

hello guys.. Please Solve my Problem..
I have to access motor through pc using Parallel Port. I want to know how to program in java to access Parallel Port. So How can i code to access the any Port of Parallel Port. Please Guide me in this..
I have tried using parport (code given below )---------------->but it gives error hs_err_pid2172.log (error explanation given at last ). Please tell me what is the problem or if u have any other alternative to access  Parallel Port
//===============================================================================
//code :
package parport;
public class ParallelPort
private int portBase;
public ParallelPort(int portBase)
this.portBase = portBase;
public int read()
return ParallelPort.readOneByte(this.portBase+1);
public void write(int oneByte)
ParallelPort.writeOneByte(this.portBase, oneByte);
public static native int readOneByte(int address);
public static native void writeOneByte(int address, int oneByte);
static
System.loadLibrary("parport");
import parport.ParallelPort;
class SimpleIO {
public static void main ( String []args )
ParallelPort lpt1 = new ParallelPort(0x378);
lpt1.write(240);
===================================================================================
ERROR file : hs_err_pid2172.log
# An unexpected error has been detected by Java Runtime Environment:
# EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x1000107b, pid=2172, tid=2108
# Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode, sharing windows-x86)
# Problematic frame:
# C [parport.dll+0x107b]
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
--------------- T H R E A D ---------------
Current thread (0x02b5c000): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2108, stack(0x02fd0000,0x03020000)]
siginfo: ExceptionCode=0xc0000096
Registers:
EAX=0x000000ff, EBX=0x26a28380, ECX=0x000000ff, EDX=0x00000378
ESP=0x0301f2f4, EBP=0x0301f308, ESI=0x26a28380, EDI=0x02b5c000
EIP=0x1000107b, EFLAGS=0x00010246
Top of Stack: (sp=0x0301f2f4)
0x0301f2f4: 10001041 10000378 000000ff 000000ff
0x0301f304: 02b50378 0301f34c 00989c91 02b5c0f4
0x0301f314: 0301f354 00000378 000000ff 02b5c6f4
0x0301f324: 02b5c6f4 02b5c6e4 0301f32c 26a28380
0x0301f334: 0301f360 26a28618 00000000 26a28380
0x0301f344: 00000000 0301f35c 0301f384 00982cb1
0x0301f354: 26a285b8 00988099 000000ff 00000378
0x0301f364: 0301f364 26a28255 0301f390 26a28618
Instructions: (pc=0x1000107b)
0x1000106b: cc cc cc cc cc 33 c0 66 8b 54 24 04 8a 44 24 08
0x1000107b: ee c3 66 8b 54 24 04 66 8b 44 24 08 66 ef c3 66
Stack: [0x02fd0000,0x03020000], sp=0x0301f2f4, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [parport.dll+0x107b]
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00295800 JavaThread "DestroyJavaVM" [_thread_blocked, id=2164, stack(0x00870000,0x008c0000)]
=>0x02b5c000 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2108, stack(0x02fd0000,0x03020000)]
0x02b5ac00 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3640, stack(0x02f30000,0x02f80000)]
0x02b59c00 JavaThread "AWT-Shutdown" [_thread_blocked, id=2204, stack(0x02ee0000,0x02f30000)]
0x02b59000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3740, stack(0x02e90000,0x02ee0000)]
0x02addc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=372, stack(0x02d90000,0x02de0000)]
0x02adb400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=608, stack(0x02d40000,0x02d90000)]
0x02ad6c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=3920, stack(0x02cf0000,0x02d40000)]
0x02ad6000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=808, stack(0x02ca0000,0x02cf0000)]
0x02ad1800 JavaThread "Finalizer" daemon [_thread_blocked, id=1736, stack(0x02c50000,0x02ca0000)]
0x02acd000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2728, stack(0x02c00000,0x02c50000)]
Other Threads:
0x02acbc00 VMThread [stack: 0x02bb0000,0x02c00000] [id=624]
0x02ae7800 WatcherThread [stack: 0x02de0000,0x02e30000] [id=580]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 960K, used 262K [0x229e0000, 0x22ae0000, 0x22ec0000)
eden space 896K, 22% used [0x229e0000, 0x22a11830, 0x22ac0000)
from space 64K, 100% used [0x22ad0000, 0x22ae0000, 0x22ae0000)
to space 64K, 0% used [0x22ac0000, 0x22ac0000, 0x22ad0000)
tenured generation total 4096K, used 344K [0x22ec0000, 0x232c0000, 0x269e0000)
the space 4096K, 8% used [0x22ec0000, 0x22f161a8, 0x22f16200, 0x232c0000)
compacting perm gen total 12288K, used 289K [0x269e0000, 0x275e0000, 0x2a9e0000)
the space 12288K, 2% used [0x269e0000, 0x26a286b0, 0x26a28800, 0x275e0000)
ro space 8192K, 66% used [0x2a9e0000, 0x2af30f10, 0x2af31000, 0x2b1e0000)
rw space 12288K, 52% used [0x2b1e0000, 0x2b8306d0, 0x2b830800, 0x2bde0000)
Dynamic libraries:
0x00400000 - 0x00423000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\java.exe
0x7c900000 - 0x7c9b0000 G:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f5000 G:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 G:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f02000 G:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000 G:\WINDOWS\system32\Secur32.dll
0x7c340000 - 0x7c396000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\msvcr71.dll
0x6d870000 - 0x6dac0000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\client\jvm.dll
0x7e410000 - 0x7e4a0000 G:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f57000 G:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 G:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763ad000 G:\WINDOWS\system32\IMM32.DLL
0x6d710000 - 0x6d723000 G:\PROGRA~1\KASPER~1\KASPER~1\mzvkbd.dll
0x76bf0000 - 0x76bfb000 G:\WINDOWS\system32\PSAPI.DLL
0x6d730000 - 0x6d743000 G:\PROGRA~1\KASPER~1\KASPER~1\mzvkbd3.dll
0x6d020000 - 0x6d035000 G:\PROGRA~1\KASPER~1\KASPER~1\adialhk.dll
0x77f60000 - 0x77fd6000 G:\WINDOWS\system32\SHLWAPI.dll
0x77c10000 - 0x77c68000 G:\WINDOWS\system32\msvcrt.dll
0x6d4c0000 - 0x6d4c6000 G:\PROGRA~1\KASPER~1\KASPER~1\kloehk.dll
0x6d320000 - 0x6d328000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\hpi.dll
0x6d820000 - 0x6d82c000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\verify.dll
0x6d3c0000 - 0x6d3df000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\java.dll
0x6d860000 - 0x6d86f000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\zip.dll
0x6d0b0000 - 0x6d1de000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\awt.dll
0x73000000 - 0x73026000 G:\WINDOWS\system32\WINSPOOL.DRV
0x774e0000 - 0x7761d000 G:\WINDOWS\system32\ole32.dll
0x5ad70000 - 0x5ada8000 G:\WINDOWS\system32\uxtheme.dll
0x73760000 - 0x737a9000 G:\WINDOWS\system32\ddraw.dll
0x73bc0000 - 0x73bc6000 G:\WINDOWS\system32\DCIMAN32.dll
0x74720000 - 0x7476b000 G:\WINDOWS\system32\MSCTF.dll
0x755c0000 - 0x755ee000 G:\WINDOWS\system32\msctfime.ime
0x6d2c0000 - 0x6d313000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\fontmanager.dll
0x7c9c0000 - 0x7d1d6000 G:\WINDOWS\system32\shell32.dll
0x773d0000 - 0x774d3000 G:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
0x5d090000 - 0x5d12a000 G:\WINDOWS\system32\comctl32.dll
0x6d620000 - 0x6d633000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\net.dll
0x71ab0000 - 0x71ac7000 G:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 G:\WINDOWS\system32\WS2HELP.dll
0x6d640000 - 0x6d649000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\nio.dll
0x77120000 - 0x771ab000 G:\WINDOWS\system32\OLEAUT32.DLL
0x10000000 - 0x1000b000 G:\Program Files\Java\jdk1.6.0_07\bin\parport.dll
VM Arguments:
java_command: parport.NewJFrame
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=G:\Program Files\Java\jdk1.6.0_07\bin;G:\java\classes
PATH=G:\Program Files\PC Connectivity Solution\;G:\Program Files\Java\jdk1.5.0_07\bin;G:\WINDOWS\system32;G:\WINDOWS;G:\WINDOWS\System32\Wbem;G:\Program Files\K-Lite Codec Pack\QuickTime\QTSystem\;G:\Program Files\Java\jdk1.6.0_07\bin;G:\Program Files\Microsoft SQL Server\90\Tools\binn\;G:\Program Files\MATLAB\R2007b\bin;G:\Program Files\MATLAB\R2007b\bin\win32
USERNAME=shankar
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 7, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 4 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3
Memory: 4k page, physical 457196k(30972k free), swap 1074312k(241668k free)
vm_info: Java HotSpot(TM) Client VM (10.0-b23) for windows-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:14:11 by "java_re" with MS VC++ 7.1
time: Thu Oct 09 13:47:18 2008
elapsed time: 7 seconds

I have same problem...
No one more have solve this?
I alread have tried use RXTX library..
but I have:
java.io.IOException: The device is not connected.
I think that pass-motor don't have correct response for pararell protocol (I need use it with direct write, no ack signal, no read, etc)

Similar Messages

  • Parallel port access problem

    Hi all!
    I'm trying to communicate with parallel port using the commapi version 2. Unfortunately, the api doesn't accept any other mode than SPP mode that is read-only. When I try to change the parallel port mode, I got an UnsupportedCommOperationException. I'm working with windows xp.
    Does anybody have an idea?
    Thanks!
    Thiago

    I have same problem...
    No one more have solve this?
    I alread have tried use RXTX library..
    but I have:
    java.io.IOException: The device is not connected.
    I think that pass-motor don't have correct response for pararell protocol (I need use it with direct write, no ack signal, no read, etc)

  • PC parallel port access with XP

    I recently got In Port and Out Port working on XP.
    I searched the ni site for AccessHW. The CVI Run Time Engine has to be
    version 5.510 or earlier. I checked the version number of one file, i.e.
    cvirte.dll to verify.
    I directed the installer to install accesshw to the directory where the new
    In Port and Out Port and the rest of the new parallel port .vis were going
    to be, i.e. Labview\Labview 6\vi.lib\platform.
    I downloaded parallel.zip from ni.com and moved the parallelnt.llb file to
    this same directory. Parallelnt.llb has a number of parallel port vis, not
    just replacements for In Port and Out Port. I replaced the In Port.vi and
    Out Port.vis in the diagrams I was trying to make work with the new .vis.
    So, on this XP machine, with
    a monitor program, parmon.exe, running to
    display the bits on the parallel port, Labview can be seen to be using the
    new parallel port .vis, and, bits on the port are changing.

    I wonder if there's a reason why there's a javax.comm 3 series for *nix, but not for windows. Hmmm.                                                                                                                                                                                                       

  • Parallel port programming in java

    anyone please help me!!
    I have to send binary data(of numbers 1-255) to parallel port in 8 bit format.
    If you have code please send me or help me how to do so...

    One post is sufficient.
    Next time try "New to Java".
    Google ( [url http://www.google.com/search?q=java+rxtx+parallel+port]java rxtx parallel port )

  • Help needed urgent please ( parallel port access in linux)

    hi all, i am trying to read and write data to /from the parallel port , i am running IBM j9 vm on linux.under /dev there are lp0..lp3 parport0..parport3, and port devices , i dont know which one to use , i have tried all , they all return with an ioexception saying "cannot find the file" except for port device which does not generate any error but it does not return what i have written on it ,
    any help would be much appreciated.
    i am using fileoutputstream and printwriter calsses .
    i dont want to use javax.comm api cause i think its incompatible with ibms visual age micro edition ( the one i am using ) so i would prefer something that works with my IDE .
    thanks
    yahya
    [email protected]

    However, there is an on-going OpenSource version called "RXTX" (http://jarvi.ezlink.com/rxtx/) that works quite well. Be sure to read all the documentation that comes with it, as you'll need to set some permissions on the ports you want to use.

  • Help...create database(access) using java

    i had developed an java application that capture packet using Jpcap but i dont know how to keep the packet captured into database(access).i can save the packet captured in text file but not in database(access).i already had the database conectivity but i don't know how to insert the packet caputred in the table in access, is it using sql statement like INSERT INTO? or else?i realy don't know.can someone help me....?

    i can save the packet captured in to text file but not in database(access).I guess that you wish to get a databse file with your data, not a simple insert sql question.
    1. commercial solution: HXTT Access(http://www.hxtt.com/access.html), which supports create database, create table sql, and batch insert data from any JDBC driver.
    2. free solution: jdbc-odbc bridge and dsn-less jdbc url, you need to prepare a blank mdb file with blank table, then copy that blank mdb file into new mdb file, then repeat insert sql for that new mdb file.

  • USB and serial port access in java

    Hi
    I have a magstripe card reader connected to my computer with a USB interface (port).
    I am using javax.comm API to get the card swipe data but could not succeeded.
    Can i do that or have to do something else ???

    ok. Below is my code:
    this is a sample code come with the API.
    package msr;
    * @author Dell
    import java.io.*;
    import java.util.*;
    import javax.comm.*;
    * Class declaration
    * @author
    * @version 1.8, 08/03/00
    public class SimpleRead implements Runnable, SerialPortEventListener {
        static CommPortIdentifier portId;
        static Enumeration           portList;
        InputStream                inputStream;
        SerialPort                serialPort;
        Thread                readThread;
         * Method declaration
         * @param args
         * @see
        public static void main(String[] args) {
        boolean                portFound = false;
        String                defaultPort = "COM3";
         if (args.length > 0) {
             defaultPort = args[0];
         portList = CommPortIdentifier.getPortIdentifiers();
         while (portList.hasMoreElements()) {
             portId = (CommPortIdentifier) portList.nextElement();
             if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
              if (portId.getName().equals(defaultPort)) {
                  System.out.println("Found port: "+defaultPort);
                  portFound = true;
                  SimpleRead reader = new SimpleRead();
         if (!portFound) {
             System.out.println("port " + defaultPort + " not found.");
         * Constructor declaration
         * @see
        public SimpleRead() {
         try {
             serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
         } catch (PortInUseException e) {}
         try {
             inputStream = serialPort.getInputStream();
         } catch (IOException e) {}
         try {
             serialPort.addEventListener(this);
         } catch (TooManyListenersException e) {}
         serialPort.notifyOnDataAvailable(true);
         try {
             serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8,
                                SerialPort.STOPBITS_1,
                                SerialPort.PARITY_NONE);
         } catch (UnsupportedCommOperationException e) {}
         readThread = new Thread(this);
         readThread.start();
         * Method declaration
         * @see
        public void run() {
         try {
             Thread.sleep(20000);
         } catch (InterruptedException e) {}
         * Method declaration
         * @param event
         * @see
        public void serialEvent(SerialPortEvent event) {
         switch (event.getEventType()) {
         case SerialPortEvent.BI:
         case SerialPortEvent.OE:
         case SerialPortEvent.FE:
         case SerialPortEvent.PE:
         case SerialPortEvent.CD:
         case SerialPortEvent.CTS:
         case SerialPortEvent.DSR:
         case SerialPortEvent.RI:
         case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
             break;
         case SerialPortEvent.DATA_AVAILABLE:
             byte[] readBuffer = new byte[20];
             try {
              while (inputStream.available() > 0) {
                  int numBytes = inputStream.read(readBuffer);
              System.out.print(new String(readBuffer));
             } catch (IOException e) {}
             break;
    }

  • Connection with Microsoft Access using Java on Linux

    Hi,
    I am very new to Linux & trying to move my application from Windows to Linux.
    I am downloading one database(*.mdb) file from an url & want to select records from tables & add them to my My Sql database.
    Is there any way to connect to Access database on Linux machine ( Without using different Windows machine having Ms Access installed).
    Thanks in advance.
    Regards,
    Veena

    I am having the same problem.
    jackcess worked fine with Access 2000.
    But i want to work with Access having previous version (probably 97).
    Is there any way to do this?

  • Problem in sending data to parallel port

    Hello,
    I can open a parallel port (LPT1) using java comm api i,e javax.comm.
    but problem in sending data to parallel port,
    I choose the appropriate port(LPT1), it is in bi-directional mode according to BIOS configuration.
    but according to the java program the mode is SSP.
    when i write data to parallel port the volt-meter give a reading of high state for all data pin (pin1 to 9) i,e the parallel port doesnot change state. I am using windows XP.
    What is the solution?

    try it on Open Solaris 10 or Linux platform.
    also just try using the new FileWriter("LPT1").write("Hello");
    on windows platform
    Pravin

  • Java and parallel port

    I don't know if this is forum I should ask this question but I didn't find any corresponding
    to java and ports control.
    I'm using Aurox 11.0 linux.
    I wonder if I could control each output (DATA pin) of parallel port separately in
    Java Communications API?. I can control outputs in Java with JNI but I need to run
    program as root. If I would want to create applet which would use parallel port
    I would have to create server with which this applet would communicate (Limitations of
    applets). But this server would have to run as root. It would affect security of system.

    Because of C++ ioperm function. This function requires root privileges. I have JNI Java
    program which can control outputs of parallel port on the level of one byte (write
    whole byte - all DATA outputs) and C++ program which can control outputs of port separately (control of each pin) and both are based on ioperm function. Both require
    root privileges. So my question is: can I control each output pin separately with Java Communications API?. Maybe if I used wholly Java code I could access port with user privileges?.

  • Parallel port use Lookout

    Does anybody know how to read/write through the parallel port with Lookout 5.0? Is there any example code for this?

    Hi,
    It is possible to send bytes to the parallel port using the ASCII object within Lookout. However, it is presently not possible to control the state of the individual bits on the parallel port with Lookout.
    If you need to control the individual bits on a parallel port, consider using LabVIEW. It is much more powerful when programming serial and parallel ports.
    Remzi A.
    National Instruments

  • Executing Microsoft access macros using java

    Hi Everyone,
    I hava an application in microsoft access,in which many macros which extract data are there.I want to know is there anyway that I can execute the macro written in microsoft access using java.
    Can anyone please answer the above.
    Regards,
    Rakesh.

    rakbha wrote:
    I hava an application in microsoft access,in which many macros which extract data are there.I want to know is there anyway that I can execute the macro written in microsoft access using java.
    I am rather certain that that is not possible via the ODBC driver and thus not possible via JDBC.
    There is certainly an OS API that will allow that but accessing those is not a standard part of the Java API so it would require a JNI solution (yours or someone else's) or an application that allows that access.

  • Labview and parallel port

    I have installed Labview 2010 32 bit in windows xp, but i cannot find "deviceand interface"  in measurement and automation
    can anyone help in this regards.
    Do i need driver to access parallel port in labview?
    thank you

    It's right under Data Neighborhood in My System.  Click the + next to My System to open the choices under it.  It should be very easy to find unless your MAX has a big problem.
    No, you don't need drivers to communicate with the parallel port.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Ms Acces using Java

    Hi All
    I have one doubt.
    I want to know the primary keys of a table in ms access using java.The same code is working in oracle,db2.
    i wrote this:
    import java.sql.*;
    public class Java1{
    public static void main(String args[]){
    try {
    Connection con = null;
    ResultSet rs = null;
    PreparedStatement psmt = null;
    Statement st = null;
    String dataSourceName = "MsAccess";               
    String dbURL = "jdbc:odbc:" + dataSourceName;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(dbURL, "","");
    java.sql.DatabaseMetaData dbmd = con.getMetaData();
    String str = "";
    System.out.println("primary keys");     
    rs=dbmd.getPrimaryKeys"D:\\LAKSHMI\\MSACCESS\\db1",null,"DIVISION");     if (rs != null) {
         while (rs.next()) {
         str= str+"-"+rs.getString(4);          
         System.out.println(str);
    }catch(Exception e) {
    e.printStackTrace();
    I am getting this exception:
    primary keys
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Driver does not support this function
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLPrimaryKeys(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getPrimaryKeys(Unknown Source)
    at Java1.main(Java1.java:37)

    java.sql.SQLException: [Microsoft][ODBC Driver
    Manager] Driver does not support this functionThere you have it. You're doing something Access doesn't support.
    Oracle is much more advanced than Access. If you want to use both you'll either have to write code against the least common denominator (which is Access), or you split the code into one Oracle part and one Access part.

  • Problem storing date in MS Access using JSP

    Hi all,
    Can anyone please help me storing date in MS Access using Java i am getting errors. I think it is probably because MS Access take "date/month". I am entering a string with date and month example
    1st October as "0110". I don't know how to enter a date in MS Access.
    Here is my code.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@page import="java.io.*"%>
    <%@page import="java.sql.*"%>
    <HTML>
    <HEAD>
    <TITLE>  </TITLE>
    </HEAD>
    <BODY>
    <%
       String emplno = request.getParameter("emplno");
       String date = request.getParameter("date");
       String proposal = request.getParameter("proposals");
       String network1 = request.getParameter("network");
       String suppassociates = request.getParameter("suppasso");
       String intmngt = request.getParameter("intmgt");
       String client[] = request.getParameterValues("client");
       String client1= request.getParameter("client1");
       String clientunit[] = request.getParameterValues("clientunit");
       String clientunit1=request.getParameter("clientunit1");
       int staffid = Integer.parseInt(emplno);
       double proposalunit=Double.parseDouble(proposal);
       double suppliersunit=Double.parseDouble(suppassociates);
       double networkunit=Double.parseDouble(network1);
       double internalmgtunit=Double.parseDouble(intmngt);
       Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
       Connection con = DriverManager.getConnection("jdbc:odbc:finalmp" );
       String activities= "INSERT INTO StaffActivities (StaffID,Date,ProposalUnit,NetworkingUnit,SuppliersAssociatesUnit,InternalMGTUnit) VALUES (?,?,?,?,?,?)";
       PreparedStatement pstmt = con.prepareStatement(activities);
       pstmt.setInt(1,staffid);
       pstmt.setString(2,date);
       pstmt.setDouble(3,proposalunit);
       pstmt.setDouble(4,suppliersunit);
       pstmt.setDouble(5,networkunit);
       pstmt.setDouble(6,internammgtunit);
       pstmt.executeUpdate();
       //String emplno="hello";
       //String entered_date="hello";
       //int access_date=0;
       //int user_date=0;
       if(pstmt!=null)
         pstmt.close();
       if(con!=null)
         con.close();
    %>  
    </BODY>
    </HTML>

    i hope this can help you
    public static String convertToISOFormat(Date dateTime) {
            // ISO Format: 'YYYY-MM-DD HH:MM:SS'
            String returnValue = fillLeft(String.valueOf(dateTime.getYear()+1900), 4,
                    '0')
                    + "-"
                    + fillLeft(String.valueOf(dateTime.getMonth()+1), 2, '0')
                    + "-"
                    + fillLeft(String.valueOf(dateTime.getDate()), 2, '0')
                    + " "
                    + fillLeft(String.valueOf(dateTime.getHours()), 2, '0')
                    + ":"
                    + fillLeft(String.valueOf(dateTime.getMinutes()), 2, '0')
                    + ":" + fillLeft(String.valueOf(dateTime.getSeconds()), 2, '0');
            return returnValue;
        }

Maybe you are looking for

  • Access via a network to an external hard disk ?

    Hello, My wife can access with her PC (vi$ta) my Mac's Public folder through our router but she can not see my external hard disk, an alias does not help. So each time I have to move files from my external HD to the Mac. The inverse solution, me drop

  • Hr abap custom infotype  updatation

    hiii frnds,     i creatred custom inotype 9910 and i enterded some data for  this infotype in pa30 when i click on the save it is noty saving in the pa9910 table...... can any one send sample code to save the data into table

  • Slow import

    Hi all 1 Actually my import complete with warnings after long hrs.I have analyzed log file and error was . . importing table "KATVERFAHREN" IMP-00058: ORACLE error 6502 encountered ORA-06502: PL/SQL: numeric or value error: character string buffer to

  • How do I access my pdf file on my computer to be able to edit it with adobe acrobat?

    I have an existing pdf file that was sent to me and I would like to be able to edit it.  how can I do this or does the pdf have to be new?

  • Signature of Oracle forms apps

    How can I read the signature (version, checksum, size, last modified) of an Oracle forms application ?