MSaccess

Hi...
I have a msaccess db with pair of tables from db2 and pdb files, using pdb odbc driver. What i want to do is, from a java app to copy the entire contents of the db2 table to its respective pdb file. I tryed tow things
1. Create a msaccess macro that exports the db2 table within msaccess to the pdb file using the pdb driver... but i dont find anything about calling macros from java.
2. Execute a SQL (Insert into pdbtable Select db2table), but when the table is empy (wich usually is) the command doesnt create any row.
So... is there any idea how to do any of the thing above, or is there any better way to achive this?
Thanks a lot.

If you're sing MS Access's mdb, not pdb, database, you can try HXTT Access(www.hxtt.net), a commerical JDBC package for MS Access. You should read Bulk Insert A ResultSet from any JDBC driver at http://www.hxtt.net/access/advanced.html#insertresultset .
Yonghong Zhao
System Analyst
www.hxtt.net

Similar Messages

  • Cannot OpenDatabase (MSAccess mdb file) using VB6 code on windows8 64 bit machine using office 2013.

    I have a "mdb" file which is created long back in MSAccess 97 or 2000. I am using Office 2013.
    When I tried to open the mdb file from my application using below code written in VB6, It works fine in Windows 7 64 bit machine but It is not working in Windows 8 64 bit machine.
    If I use office 2010 again same code works fine in both Windows 7 and 8 64 bit machines.
    Set gWork = DBEngine.CreateWorkspace("", "admin", "", dbUseJet)
    Set gCache = gWork.OpenDatabase(DataPath & fFilePath & "\connec00.mdb")
    I have a referenced "Microsoft DAO 3.51 Object Library" for the code.
    I tried changing it to "Microsoft DAO 3.6 Object Library" also but still the problem is not resolved.
    Can anyone please help me in figuring this out ??

    Dear Bruce,
    Thanks for your reply.
    Code was written in VB6. My VB6 application will try to open a "connec00.mdb" file and will read the data in it for displaying in the application.
    For opening the database by the application the code was written like below
    On Error GoTo Herr
    Set gWork = DBEngine.CreateWorkspace("", "admin", "", dbUseJet)
    FLog.Addlog "File exists: Connecting to database..."
    Set gCache = gWork.OpenDatabase(DataPath & fFilePath & "\connec00.mdb")
    Herr:
    FLog.Addlog "Error(Class_Initialize - DataConnector): " + Err.Description + " in " + Err.Source + Chr(10) + Chr(13) + "Init: Going on execution..."
    If I manually open the "mdb" file both in windows 7 64 bit and windows 8 64 bit using MSAccess 2013, I will get  the error
    "cannot open a database created with previous version of your application".
    On Windows 7 64 bit
    Through my VB6 code the mdb file is opened (does not launch MSAccess) by my application and reading is done perfectly which inturns helps the application to display the data in the mdb file. (even though manually if I cannot open)
    On Windows 8 64 bit
    Through my VB6 code the mdb file is not able to open the database by my application.
    It is going to Herr: part when it tries comes to that "OpenDatabase" step and it prints nothing in the log (Err.Description )also.
    (This is seen only for Windows 8 64 bit) . In Windows 7 64 bit Herr part does not even hit.
    Configuration wise I have checked both are same. Please let me know in case of furthur clarification or anything if I miss..
    Thanks for your co-operation.

  • SELECT with WHERE clause for MSAccess from JDBC

    Hi,
    I am new user of MSAccess.I am getting exception: Invalid user type when i was trying the following code:
    String name1=nameTextfield.getText().trim();
    String query="SELECT ID from Suppliers WHERE name=name1;"
    Statement stmt=con.createStatement();
    ResultSet rs=stmt.executeQuery(query);
    while(rs.next())
    String id1=rs.getInt(1);
    System.out.println(id1);
    nameTextField is JTextField in my GUI.
    ID id auto field in table Suppliers.
    I am using MSAccess 97.
    I came to know that the JDBC SQL queries will be different for Access.
    Any body help me how to write SELECT statement?
    Thanks in advance,
    Sai Ram

    name or ID might be reserved words in access. Either change the name of the column or put [] around them. Also, you ar looking for a record where fields name and name1 are equal. You probably don't have a name1 field.
    String name1=nameTextfield.getText().trim();
    String query="SELECT [ID] from Suppliers WHERE [name]='"+name1+"';"
    Pay attention to the single and double quotes I have.

  • [b]ERROR : connecting to msaccess[/b]

    I am trying to connect to a msaccess file but I get this error when I try to select from the table.
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC Microsoft Access Driver] The
    Microsoft Jet database engine cannot open the file '(unknown)'. It is already
    opened exclusively by another user, or you need permission to view its data.
    (SQL State: S1000; SQL Code: -1032)
    ORA-02063: preceding 2 lines from MSA
    here are the steps I took:
    1. Setup a System DSN called msaccess
    a. selected the mdb file for database
    b. assigned user name and password
    - user name : disco_area
    - password : password
    2. in ORACLE_HOME\hs\admin\initmsaccess.ora
    HS_FDS_CONNECT_INFO = MSACCESS
    HS_AUTOREGISTER = TRUE
    HS_DB_NAME = msaccess
    3. listener.ora file
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\ora92)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = prt)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = prt)
    (SID_DESC =
    (GLOBAL_DBNAME = dwt)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = dwt)
    (SID_DESC =
    (GLOBAL_DBNAME = FNT)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = FNT)
    (SID_DESC =
    (SID_NAME=msaccess)
    (ORACLE_HOME = C:\oracle\ora92)
    (PROGRAM = hsodbc)
    4. sqlnet.ora
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
    5. tnsnames.ora
    # TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    PRT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = prt)
    PRT.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = prt)
    FNT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FNT)
    FNT.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FNT)
    NEWTON =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = newton)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = newton.porp)
    DWT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dwt)
    DWT.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dwt)
    MSACCESS =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = tcp)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SID = msaccess)
    (HS = OK)
    MSACCESS.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = tcp)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SID = msaccess)
    (HS = OK)
    INST1_HTTP =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = decartes)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = MODOSE)
    (PRESENTATION = http://HRService)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    6. created user in PRT
    disco_area/password (same as dsn)
    7. database link
    CREATE PUBLIC DATABASE LINK "MSA" CONNECT TO "DISCO_AREA" IDENTIFIED BY "password"
    USING 'MSACCESS.WORLD'
    8. select statement as disco_area user
    select count(*) from income@msa;
    9. Error from above
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC Microsoft Access Driver] The
    Microsoft Jet database engine cannot open the file '(unknown)'. It is already
    opened exclusively by another user, or you need permission to view its data.
    (SQL State: S1000; SQL Code: -1032)
    ORA-02063: preceding 2 lines from MSA
    any suggetions
    thanks in advance Tony

    Hi Andrea,
    Thanks for your response. This is how I have things setup:
    Computer A
    Windows XP Pro
    User : disco_admin
    Password : password
    Level : Administrator
    MS Office 2000
    msaccess file : user : disco_area/password
    Computer B
    Windows 2000 Pro
    User : disco_admin
    Password : password
    Level : Administrator
    Oracle DB 9i
    Oracle Schema/user : disco_area/password
    System Dsn : mst
    Initmsaccess.ora
    Listener.ora
    Tnsnames.ora
    The users are the same on both computers and the oracle schema user is the same as
    the msaccess file user and password. I think I have followed the steps to have this work
    but for some reason it does not. Let me know if you see anything.
    Thanks Tony
    By the way, what part of Italy are you from ? I was born in Calabria and moved
    to United States in 1971.
    Ciao

  • How to append records in MSAccess through Java using JDBC:ODBC

    Hello,
    I was able to retrieve records from MSAccess database through JAVA over the JDBC-ODBC bridge.
    If I want to append records to a table (for eg. photo1 table containing photono., length, breadth, area as
    columns) I could not able to do so through JAVA.
    I am using JTable with the above fields. The user is displayed with the JTable and he has to enter
    data inside the JTable and press a button titled "Append". Then the JAVA program should append
    whatever the user has entered in the JTable as a single record inside the MSAccess database.
    Can anyone help me please?

    hi i too am having similar problem. i am able to create a table in ms access through java but when i insert values i get a msg that it has inserted the values but when i check the table by opening ms-access there are no values in the table.
    the insert statement i am using is
    " insert into tk1 values(3,'tarun')"
    further i tried using the methods commit, setAutoCommit etc with the connection object. -NO GO.
    can you help me ?

  • Handling query errors when using ADO connection in MSAccess

    Hello,
    I'm working on enhancing a data pull from a terrabyte sized Oracle database for use within an MSAccess front end. The current plan is to append and update tables within Oracle using ODBC pass through queries or ADO connection objects, then copy the resulting much smaller data set to Access for further processing.
    Oracle client: 11g
    Access DB: 2010
    Tnsnames.ora in place
    Connection via ADO connection, or DAO/ODBC pass thru queries
    connect string:
    "ODBC;DSN=dbname;UID=username;PWD=password;DBQ=dbname;"
    i have also tried:
    "ODBC;driver={Oracle};DSN=dbname;UID=username;PWD=password;DBQ=dbname;"
    there are two issues i'm facing:
    1) comparing performance with the SQL developer, where for some runs, Access is significantly slower, other times its fine
    2) trapping errors, where it appears that all i get is the query timeout error, rather than a more informative error, such as a key violation.
    in the first instance, creating about 6000 rows in the Oracle table takes about a 2 seconds using the SQL developer, and sometimes about 6 minutes with either ADO or DAO methods of queriing, but then sometimes its nearly as quick (?). Is there any way to figure out how to make the performance equivalent or consistent? This is probably not the forum, but maybe someone could post a link to where people are doing this more often (my google searches are returning spotty results)
    But in addition, it seems like if there is an error in the query, such as a key violation, the query will wait all the way until the timeout value in many cases before returning just the timeout error, which tells me nothing. I need to keep that value pretty high, as sometimes the client will pull a lot more than 6000 records. Its also inconsistent, sometimes i get the key violation in 5-6 minutes, other times its all the way to 10 minutes before the timeout error happens, rather than almost immediatly with SQLdeveloper. is there any way to return error messages more quickly?
    thanks much for the help - I'm going round in circles here.

    Hi,
    I am working on OLAP catalog. I created one cube and 6 Dim. And OEM Console mgs showing this as valid CUbe. When I m trying to create Presentation after selecting my Measure it gives this error:-
    oracle.dss.dataSource.common.QueryRuntimeException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.ExpressServerExceptionError class: OLAPI
    Server error descriptions:
    DPR: Unable to execute the query, Generic at TxsOqCursorManager::fetchInitialBlocks
    SEL: Unexpected error occurred. Contact Oracle Support!, Generic at null
    java.lang.CloneNotSupportedException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.ExpressServerExceptionError class: OLAPI
    Server error descriptions:
    DPR: Unable to execute the query, Generic at TxsOqCursorManager::fetchInitialBlocks
    SEL: Unexpected error occurred. Contact Oracle Support!, Generic at null
         void oracle.dss.dataSource.common.QueryDataDirector.addDataDirectorListener(oracle.dss.util.DataDirectorListener)
              QueryDataDirector.java:687
         void oracle.dss.dataView.ModelAdapter.setDataDirector(oracle.dss.util.DataDirector)
              ModelAdapter.java:145
         void oracle.dss.crosstab.CrosstabModelAdapter.setDataSource(oracle.dss.util.DataSource)
              CrosstabModelAdapter.java:49
         void oracle.dss.dataView.Dataview.setDataSource(oracle.dss.util.DataSource)
              Dataview.java:386
         void oracle.dss.addins.wizard.presentation.PresentationWizardState.applyQuery()
              PresentationWizardState.java:106
         void oracle.dss.addins.wizard.presentation.PresentationWizardDialog.wizardFinished(oracle.bali.ewt.wizard.WizardEvent)
    It is little urgent.
    JDev version is 9.0.3.3 (Build 1205)
    Business Comp Version 9.0.3.11.50
    OS Win 2000 Proff
    DOwn Loaded BIBean9032 and bibeans90321 patch

  • Acrobat Pro 10.1.1 MsAccess 2010 64 bit

    I'm positive I trialed Acrobat Pro X and it worked in microsoft access 2010 64bit.
    I have since purchased APX only to discover there is no acrobat tab in msaccess.  I've tried repatching APX and re-installing.  I can only find
    documentation indicating Office 2010 64 bit versions of Word, Excel, PowerPoint and Outlook are supported.  Is this everyone else's experience?
    I appologize, I'm sure this has been asked and answered many times..but I couldn't seem to find a definitive answer in the forum.
    thanks

    As far as I know, Acrobat X as first released was not fully compatible with MS Office 64bit
    You might check the updates page to see if something has been issued to add 64bit compatibility
    All Adobe updates start here and select product, read to see if you need to install updates in number order, or if the updates are cumulative for the individual product http://www.adobe.com/downloads/updates/

  • Reports vi or msaccess

    I have troubles to print some data tables with lv reports vis in
    Windows NT.
    I have 1-D array of cluster (say 15000 elements) in a for-while loop,
    from where, every time, I extract parts that I convert in a data
    table, then I print it.
    If I ask (with a button) every time the user to print that part, I
    have no problems; if I permit to print all parts sequentially, after a
    while LV crashes!
    In every case the process is too slow.
    If I print the same data with a report of msaccess the printing
    process is extremely fast and without troubles.
    Someone can help me to solve this?
    Alternatively can someone tell me how can I run msaccess procedures
    from within LV to use access as a report engine (in the same way LV
    run excel macro in the examples vi)?
    Thanks
    in advance

    JRA wrote in message news:<[email protected]>...
    > It sounds possible that you're sending too much data to the printer at
    > one time. Since it works when the user must click a button, that
    > gives the application time to fulfill the most recent print execution.
    > You could try placing a "Wait Until Next Millsecond" VI in your loop
    > and give it just a little time to process each request. Let me know
    > how it works out.
    I thought so also, but it doesn't works. I put a Wait of 1 minute to
    simulate user interaction without effect.
    The trouble seems to be in the Append Text Table to Report.vi, but
    this affects only the Standard Report (HTML report works fine - I'm
    using Labview 6.0.2). It seems to me tha
    t this vi suffers of some
    limitation in the manipulation of data.

  • File-XI-JDBC(MSAccess) scenario

    Dear All,
    I am working on a simple scenario in which I want to update a database table maintained in MSAccess at my local machine from the data maintained in a flat file through XI.
    I am able to do the configuration part for sender but I am not getting the setting to be done in ID for JDBC(MSAccess) adapter.
    Please guide me on how to go forward on this.
    Warm Regards,
    N.Jain

    How to use SELECT statement in JDBC scenario's.
    Ref : https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1725 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    stored procedures
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures by siva
    1278 by sriram
    Sender adapter
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    and also ref jdbc adapter in sap xi help.

  • Receiver MSAccess

    Hi All,
    My scenario is File to MSAccess.
    I configured my scenario as per the following blog.
    /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    I got an error in the communication channel monitoring. Can any one suggest why it is showing?
    Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=
    168.186.44.51\XI_Test_Files\Out\db1.mdb' using the JDBC driver 'jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (.mdb)};DBQ=
    168.186.44.51\XI_Test_Files\Out\db1.mdb': SAPClassNotFoundException: jdbc.odbc.JdbcOdbcDriver'
    Thanks,
    Satish.

    hi,
    Did you install the driver to access the MS DB in your XI server. It is not able to recognise the Driver.
    Also check whether global DB name is correct or not.
    Check if you have deloyed the drivers correctly . Refer to following config guide for delopyment steps .
    http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000591425&_OBJECT=011000358700001697502004E
    I think generally it is the work of  basis people to delopy them
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • Inserting into MsAccess Database

    Hi,
    I am having problem with inserting a row into the MsAccess Database. I am getting error like
    "SQLException: Occurred while performing Database Operations ---> method Main() java.sql.SQLException
    : [Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in INSERT INTO statement.[Microsoft][ODB
    C Microsoft Access 97 Driver] Syntax error in INSERT INTO statement".
    My code is as under:
    please help me out.
    Smitha
    ==========================================
    package dao;
    import utils.GeneralFailureException;
    import dbConnection.dbConnection;
    import java.util.*;
    import java.sql.*;
    public class GeneralExpenses {
    dbConnection dbCon = new dbConnection();
    public GeneralExpenses() {
         super();
    public static java.sql.Timestamp getTstamp() {
    java.util.Date date = (Calendar.getInstance()).getTime();
    java.sql.Timestamp tStamp = new java.sql.Timestamp(date.getTime());
    System.out.println("The Time Stamp : " + tStamp);
    return tStamp;
    public void insertExpenseTable(String sExphead, double dAmount, String sMode)
         throws GeneralFailureException, SQLException, ClassNotFoundException {
         String inssql = "INSERT INTO EXPENSES(tnum, date , " + sExphead + ", " + sMode + ") VALUES(?,?,?,?)";
         Connection conn = null;
         PreparedStatement pstmt = null;
         try {
              conn = dbCon.getConnection();
              pstmt = conn.prepareStatement(inssql);
              pstmt.setInt(1, 100);
              pstmt.setTimestamp(2, getTstamp());
              pstmt.setDouble(3, dAmount);
              pstmt.setString(4, sMode);
              pstmt.executeUpdate();
         } finally {
              dbCon.closeAll(pstmt, conn);
    public static void main(String[] args) {
         try {
    GeneralExpenses ge = new GeneralExpenses();
         ge.insertExpenseTable("xxxxxxx", 250.35, "yyyyyyyy");
         System.out.println("worked");
         } catch(ClassNotFoundException sqlex) {
         System.err.print("SQLException: Occurred while performing Database Operations ---> method Main() " + sqlex);
         System.err.println(sqlex.getMessage());
         catch(SQLException sqlex) {
         System.err.print("SQLException: Occurred while performing Database Operations ---> method Main() " + sqlex);
         System.err.println(sqlex.getMessage());
    } catch(GeneralFailureException e) {
         System.err.print("GeneralFailureException: Occurred while Establishing Connection ---> method getConnection() " + e);
         System.err.println(e.getMessage());
    } catch(Exception e) {
         System.err.print("GeneralFailureException: Occurred while Establishing Connection ---> method getConnection() " + e);
         System.err.println(e.getMessage());

    I'm so happy to finally found the answer of my problem with that message Kurt.
    Thank you very much... !
    I will now remember that date cannot be the name of a field when using jdbc-odbc. I called my field TransDate and it is now working perfectly!

  • Oracle To MSAccess interface trouble

    I'm trying to run a simple interface that transfers data in one Oracle table to a MS Access table and getting errors. I've clicked the "Staging Area Different From Target" checkbox and specified that the calculations should be done on the Oracle side, but when the interface runs, it tries to create the work table in MS Access.
    Here's the error I'm getting:
    -3551 : 37000 : java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in CREATE TABLE statement.
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in CREATE TABLE statement.
    Anyone been successful with doing an Oracle to MSAccess transfer and if so how did you set it up?
    Thanks,
    Zack.

    >
    > We have a requirement that to transfer data from oracle operationa data store to SAP R/3. What is the best way to achieve this. Is it possible to do using FTP? Please let me know if there are any other ways to achieve this.
    >
    If you have PI middleware then you can develop interface between ORACLE to SAP R/3 , it works for you.
    search in sdn for ORACLE AND R/3INTEGRATION interface.
    Regards,
    raj

  • Sql - Insert problem in MsAccess

    Hello!!!
    J have problem with INSERT function, I use MsAccessm as database. My query is :
    INSERT INTO [Produkty-www] ( Id,Nazwa,Kod,Cena)
    VALUES 6646545,"Zlaczka
    prosta 22mm 1/2 ' z (KRoCIEC)",'JGK22-1/2Z',10.00)
    this is very import symbol ' in 1/2 ' z must be at the place. When I execute this query I have exception. In maaccess I create query and also msaccesse show me when is the bad part of query the sybmol ' is underline.
    So I create a new query but in access :
    INSERT INTO [Produkty-www] ( Id,Nazwa,Kod,Cena) VALUES (6646545,"Zlaczka prosta 22mm 1/2 ' z (KRoCIEC)",'JGK22-1/2Z',10.00)
    and ok access add record, now I copy this query to my java application and I also have exception.
    Why this query don`t work.. ?

    Ok, it`s done :     
    PreparedStatement statement = podlaczenie.prepareStatement("INSERT INTO [Produkty-www] (id, Nazwa, Kod, Cena) VALUES (?,?,?,?)");
    statement.setInt(1,2);
    statement.setString(2,"ffsdfds'fdsfs");
    statement.setString(3,"kod");
    statement.setInt(4,124);
    statement.execute();
    But I need a sql query print to console, a search a method of statement but I dont find that I look for, it is some method that give my sql query in string ?
    Thank`s for help

  • Launching MSAccess db not working

    Is there a trick to get the NAL to open a specific MSAccess database? I
    set it up the same as the word docs & powerpoints, but I keep getting the
    error "can't find the file..." even though it's there. Help please!
    Thanks,
    Cheryl

    No, this should be simple and straight forward.
    1) Make sure the app is not running as an "Unsecure System User". This adds
    complexity we could address if required.
    2) Check the path, some older versions of Access had issues with some long
    name/file formats and they would not launch but required manually opening
    inside of access itself.
    Craig Wilson
    Novell Product Support Forum Sysop
    Master CNE, MCSE 2003, CCNA
    Editor - http://www.ithowto.com
    (Seeking Full-Time Expert? Drop me a note :> )
    <[email protected]> wrote in message
    news:aQfqf.1670$[email protected]..
    > Is there a trick to get the NAL to open a specific MSAccess database? I
    > set it up the same as the word docs & powerpoints, but I keep getting the
    > error "can't find the file..." even though it's there. Help please!
    > Thanks,
    > Cheryl

  • Using AND for SELECT in MSAccess

    Hi,
    Anybody help me how to write SQL query using AND for MSAccess.
    When I am using the following query, It gives the error "Datatype mismatch in criteria expression". The field names in database are correct.
    String query="select [id] from Suppliers where (([name]='"+name1+"') AND ([street]='"+street1+"') AND ([zipcode]='"+zipcode1+"'));";
    How to write???
    Thanks in advance,
    Sai Ram

    Hi,
    Anybody help me how to write SQL query using AND for
    MSAccess.
    When I am using the following query, It gives the
    error "Datatype mismatch in criteria expression". The
    field names in database are correct.
    String query="select [id] from Suppliers where
    (([name]='"+name1+"') AND ([street]='"+street1+"') AND
    ([zipcode]='"+zipcode1+"'));";
    How to write???
    Thanks in advance,
    Sai RamThe error message leads me to believe that there's a mismatch between the column type and the query (even if the field names are correct). The way you've written them all the columns in the WHERE clause should be of Java type String and SQL type text/varchar.
    I'd recommend that you remove those square brackets from around the column names - I don't believe those are standard SQL. They're a M$ extension.
    I'd also recommend that you use PreparedStatement instead of Statement. You can use the setString/setDate methods to do the escaping properly for you and not worry about putting quotes around String values. (setString will even work when there's a field value with an apostrophe in it.)

  • How to connect database(MSAccess ) in j2me

    hi,
    i'm new to j2me. can anyone tell me how to connect MsAccess database with the j2me.and also whether it is possible to connect or else we have to use some other database such as Mysql or oracle.
    thanx a lot in advance
    regards
    laxmi

    Not directly. Please use the search, was already asked numerous times!

Maybe you are looking for

  • Issue in CCR of Stocks

    Hi, We are facing issue while doing CCR in APO for specific material location combination. After running CCR it does not give any differences for iteration step but when we are comparing stock in R3 using trasncation MMBE with APO stock using transca

  • Why does iPhoto crash so often when I am trying to assign faces?

    I have a 15" MacBook Pro with Retina Display. I cannot figure out why iPhoto crashes so often. I have rebuilt the library several times. I have transferred the library to a different hard drive and then opened the library under a different user accou

  • BI 70 upgrade question - Exception Aggregation

    Hi , In our upgrade test system we are getting exception aggregation warning "Brain 447 - Time of calculation 'Before Aggregation' is obsolete" . I know the location where we can change the option (  under "Enhnaced Properties" of the Calculated key

  • How do i fix this error: sync server can't sync calendar?

    i've had my 3gs phone for 2 years now and i'm getting an error when i try to sync my calendar. re-installing itunes did not help. thoughts?

  • G5 won't restart or shut down or change startup disc...

    (after several updates) my computer won't restart or shut down except manually... which prevents me from changing the startup disc (where all my important stuff is). Option key during startup doesn't give me the startup disc option either. I'm stuck!