Access Database Query

I am running a query on an access database, but am getting some strange results. The problem might be access and not Visual studio though.
Here is the core of the problem:
If I run the following query, I get exactly what I want
SELECT ID, Question, Solved, Date_Created, Date_Last_Edit, Date_Closed
FROM(
SELECT F.ID AS Ident, Count(F.ID) AS Num
FROM(
SELECT Keywords, ID, Question, Solved, Date_Created, Date_Last_Edit, Date_Closed
FROM(
SELECT ID, Solved, Date_Created, Date_Closed, Date_Last_Edit, Question, Model, Keywords.Value AS Y FROM Questions) AS X INNER JOIN Keywords ON X.Y =Keywords.ID
Where Keywords = "Back" ) As F
Group By F.ID
HAVING (((Count(F.ID)) =1)))
As T Inner Join Questions
On T.Ident = Questions.ID
But, if I change
Where Keywords = "Back"
to
Where Keywords Like "*Ba*"
I get nothing from my query. No errors, just no data.
The strange thing is, if I output my query to a message box, and copy and paste it into access and run the query, it runs just fine. I've double checked all the syntax and I don't get a syntax error back from the code anyway.

Hi Mynamewasused,
Thank you for posting in MSDN forum.
Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation
Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
To help you find the correct forum support this issue, could you please tell me if you running a query on an access database with ADO.NET?
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Access database query resultset in java scriptlet

    Question:
    1) I am Creating a web page and plotting points on the page:
    2) Database query results in decimal values dec_latitude and dec_longiitude.
    3) Perform calculations on lati. & long. in a java scriptlet to create a plot position (xpos, ypos).
    4) Send the xpos and ypos back to the java server page
    5) Use <IMG and absolute positioning to plot the point at position xpos, and ypos.
    6) Repeat until all rows in the query result set have been plotted.
    I don't know how to pass the dec_latitude and dec_longitude to the java scriptlet.
    After the java scriptlet calculation translates the latitude and longitude
    into xpos and ypos, I need to pass the xpos and ypos back to the java server page so that a data point is plotted on a map at position xpos, ypos.
    I tried many ways of doing it but am just guessing as
    to how to pass the data.
    Thanks in Advance. - John
    Here is what I am trying so far .... see snippet below:
    The code below results in a runtime error.
    Am I supposed to create a java object and access that in the java scriptlet? Can the java scriptlet access the latvar and longvar created during the "<c:set var="latvar"... ?
    If not, what mechanisum do I use to access the resulting colums: dec_latitude and dec_longitude? I need the java scriptlet to convert the
    dec_latitude and dec_longitude into a display position based on the number of pixels from the TOP and LEFT (xpos, ypos). Then plot of the data point using the IMG and (xpos, ypos). This will overlay a map whose z-index is lower than the plotted data point.
    *** Query the database ***
    <sql:query var="qryBio">
    SELECT
    DEC_LATITUDE,
    DEC_LONGITUDE,
    ENTRY_TIMESTAMP
    FROM app.biosurvey where
    </sql:query>
    *** for each row retreived from the database ***
    <c:forEach var="row" items="${qryBio.rows}">
    <c:set var="latvar" value="${row.dec_latitude}" scope="page"/>
    <c:set var="longvar" value="${row.dec_longitude} "scope="page" />
    *** java code scriptlet - ***
    *** convert latitude and longitude to xpos and ypos for display ***
    <%
    latitude = (Float)pageContext.getAttribute("latvar"); <--- runtime error !!!!
    longitude = (Float)pageContext.getAttribute("longvar");
    xpos = (int)Math.round(latitude);
    ypos = (int)Math.round(longitude);
    xpos = 1082 - xpos;
    ypos = 700 + ypos;
    pageContext.setAttribute("xpos", xpos);
    pageContext.setAttribute("ypos", ypos);
    %>
    *** plot a point on the display html page overlaying the map ***
    <IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xpos%> px;
    left:<%=ypos%> px;
    z-index:2">
    </c:forEach>

    Thanks
    I still get a runtime error: I translated the code you gave to code below .... which I think is equivalent. See Below: I'm still learning about this stuff so I may not have not translated this properly. Do
    you see what I am doing wrong?
    Best Regards,
    - John
    %@ page language="java" contentType="text/html;
    charset=ISO-8859-1"%>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ page import="java.lang.Math"%>
    <sql:setDataSource dataSource="jdbc/SampleDB" />
    <c:set var="genus_name" value="${param.genus_name}" />
    <c:set var="species_name" value="${param.species_name}" />
    <c:set var="species_common_name" value="${param.species_common_name}" />
    <c:set var="dd_sighted" value="${param.dd_sighted}" />
    <c:set var="mm_sighted" value="${param.mm_sighted}" />
    <c:set var="yyyy_sighted" value="${param.yyyy_sighted}" />
    <c:set var="species_state" value="${param.species_state}" />
    <c:set var="species_county" value="${param.species_county}" />
    <c:set var="species_country" value="${param.species_country}" />
    <c:set var="dec_latitude" value="${param.dec_latitude}" />
    <c:set var="dec_longitude" value="${param.dec_longitude}" />
    <c:set var="notes" value="${param.notes}" />
    <c:set var="person_first_name" value="${param.person_first_name}" />
    <c:set var="person_last_name" value="${param.person_last_name}" />
    <c:set var="person_street" value="${param.person_street}" />
    <c:set var="person_city" value="${param.person_city}" />
    <c:set var="person_state" value="${param.person_state}" />
    <c:set var="person_zip" value="${param.person_zip}" />
    <c:set var="person_country" value="${param.person_country}" />
    <c:set var="person_email" value="${param.person_email}" />
    <h2>Species Sightings:</h2>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Breckenridge Citizen Bio-Survey Selective Output Page</title>
    </head>
    <body>
    Izaak Walton League of America
    <h1>Breckenridge Citizen Bio-Survey Selective Output</h1>
    <HR>
    <c:if test="${param.action == 'Submit'}">
    <%int xpos = 0;
         int ypos = 0;
         float latitude = 0.0F;
         float longitude = 0.0F;
         float latitudeMpls = 45.06F;
         float longitudeMpls = -93.14F;                    int xposMpls = 1205 - (int) Math.round(latitudeMpls);
         int yposMpls = 735 + (int) Math.round(longitudeMpls);
    %>
    <IMG SRC="minnesota_1990.jpg" ALT="minesota map" style="z-index:1;"> <----- THIS WORKS FINE
    <IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xposMpls%> px;
    left:<%=yposMpls%> px;
    z-index:2"> <----- THIS WORKS FINE FOR HARDCODED MPLS XPOS AND YPOS
    <sql:query var="qryBio">
    SELECT
    PERSON_FIRST_NAME,
    PERSON_LAST_NAME,
    GENUS_NAME,
    SPECIES_NAME,
    SPECIES_COMMON_NAME,
    SPECIES_COUNTY,
    SPECIES_STATE,
    SPECIES_COUNTRY,
    DD_SIGHTED,
    MM_SIGHTED,
    YYYY_SIGHTED,
    DEC_LATITUDE,
    DEC_LONGITUDE,
    NOTES,
    ENTRY_TIMESTAMP
    FROM app.biosurvey where
    genus_name like rtrim(upper('${genus_name}')) AND
    species_name like rtrim(upper('${species_name}')) AND
    species_common_name like rtrim(upper
    ('${species_common_name}')) AND
    species_state like rtrim(upper('${species_state}')) AND
    species_county like rtrim(upper('${species_county}')) AND
    species_country like rtrim(upper('${species_country}')) AND
    person_first_name like rtrim(upper('${person_first_name}')) AND
    person_last_name like rtrim(upper('${person_last_name}')) AND
    person_email like rtrim(upper('${person_email}'))
    </sql:query>
    <c:forEach var="row" items="${qryBio.rows}">
    <--- THE LINE ABOVE WORKS FINE --->
    <c:set var="latvar" value="${row.dec_latitude}" scope="page" />
    <c:set var="longvar" value="${row.dec_longitude} " scope="page" />
    <%
    latitude =
    Float.parseFloat((String)pageContext.getAttribute("latvar"));
    <--- RUNTIME ERROR OCCURS HERE --- SEE LINE ABOVE --->
    longitude =
    Float.parseFloat((String)pageContext.getAttribute("longvar"));
    xpos = (int) Math.round(latitude);
    ypos = (int) Math.round(longitude);
    xpos = 1082 - xpos;
    ypos = 700 + ypos;
    request.setAttribute("xpos",new Integer(xpos));
    request.setAttribute("ypos",new Integer(ypos));
    %>
    IIMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xpos%> px;
    left:<%=ypos%> px;
    z-index:2">
    <--- THIS (ABOVE) WORKS FINE WITH CORRECT VALUES FOR XPOS AND YPOS WHEN RUNTIME ERROR DOES NOT OCCUR --->
    </c:forEach>
    </c:if>

  • Access database query import

    I have some queries stored in databases from MS Access which I am trying to import into DIAdem.  I use the open with option for the database to select the query I wish to load and then chose selective opening to grab the columns of data I really want.  It appears to import the data but only the first 27890 entries - the total is approx 750,000.  Why is only about 27890 entries being imported?

    Hi Jim,
    No, I am not sure why you are experiencing this difference in load behavior.  We tried to replicate your situation here and were able to successfully load either by selecting the whole table or specific columns within that table:
    ACCESS Table with 7 columns, each column with 560 000 values
    Tested on both a DIAdem 9.1 SP2c computer and a DIAdem 10.1 SP1 computer (clean installs)
    Result in DIAdem:
    7 channels, each channel with 560 000 values if I load the table complete
    3 channels, each channel with 560 000 values if I load selected channels
    The first step is for us to reproduce your symptoms.  Would it be possible for you to post your Access database on our ftp.ni.com/incoming server?
    How much RAM do you have on your computer?
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Access database query data in Java SCriptlet

    Question:
    Creating a web page and plotting points on the page:
    1) Database query results in decimal values latitude and longitude.
    2) Perform calculations on lati. & long. in a <% java scriptlet %>
    I don't know how to pass the data back and forth between the
    java server page and the java scriplet.
    After the calculation translates the latitude and longitude
    into xpos and ypos, a data point is plotted on a map.
    I tried many ways of doing it but am just guessing as
    to how to pass the data.
    Thanks in Advance. - John
    Here is what I am trying so far .... see snippet below:
    *** Query the database ***
    <sql:query var="qryBio">
    SELECT
    DEC_LATITUDE,
    DEC_LONGITUDE,
    ENTRY_TIMESTAMP
    FROM app.biosurvey where
    </sql:query>
    *** for each row retreived from the database ***
    <c:forEach var="row" items="${qryBio.rows}">
    <c:set var="latvar" value="${row.dec_latitude}" scope="page"/>
    <c:set var="longvar" value="${row.dec_longitude} "scope="page" />
    *** java code scriptlet - ***
    *** convert latitude and longitude to xpos and ypos for display ***
    <%
    latitude = (Float)pageContext.getAttribute("latvar");
    longitude = (Float)pageContext.getAttribute("longvar");
    xpos = (int)Math.round(latitude);
    ypos = (int)Math.round(longitude);
    xpos = 1082 - xpos;
    ypos = 700 + ypos;
    pageContext.setAttribute("xpos", xpos);
    pageContext.setAttribute("ypos", ypos);
    %>
    *** plot a point on the display html page overlaying the map ***
    <IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xposMpls%> px;
    left:<%=yposMpls%> px;
    z-index:2">
    </c:forEach>

    Question:
    Creating a web page and plotting points on the page:
    1) Database query results in decimal values latitude and longitude.
    2) Perform calculations on lati. & long. in a <% java scriptlet %>
    I don't know how to pass the data back and forth between the
    java server page and the java scriplet.
    After the calculation translates the latitude and longitude
    into xpos and ypos, a data point is plotted on a map.
    I tried many ways of doing it but am just guessing as
    to how to pass the data.
    Thanks in Advance. - John
    Here is what I am trying so far .... see snippet below:
    *** Query the database ***
    <sql:query var="qryBio">
    SELECT
    DEC_LATITUDE,
    DEC_LONGITUDE,
    ENTRY_TIMESTAMP
    FROM app.biosurvey where
    </sql:query>
    *** for each row retreived from the database ***
    <c:forEach var="row" items="${qryBio.rows}">
    <c:set var="latvar" value="${row.dec_latitude}" scope="page"/>
    <c:set var="longvar" value="${row.dec_longitude} "scope="page" />
    *** java code scriptlet - ***
    *** convert latitude and longitude to xpos and ypos for display ***
    <%
    latitude = (Float)pageContext.getAttribute("latvar");
    longitude = (Float)pageContext.getAttribute("longvar");
    xpos = (int)Math.round(latitude);
    ypos = (int)Math.round(longitude);
    xpos = 1082 - xpos;
    ypos = 700 + ypos;
    pageContext.setAttribute("xpos", xpos);
    pageContext.setAttribute("ypos", ypos);
    %>
    *** plot a point on the display html page overlaying the map ***
    <IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xposMpls%> px;
    left:<%=yposMpls%> px;
    z-index:2">
    </c:forEach>

  • Trying to display results from access database query on a JSP

    Seem to be having real difficulty with this one, i keep getting a null pointer exception :(. Wondered if anyone could point me to any examples of displaying the results on jsp. The database is connected, as i can display the query on netbeans, but just not on a jsp.

    I think it would be good if we had a section in these forums for pre-canned answers to the same questions that come up again and again. It would save time.
    Here is a rough outline for using JSP:
    * Read a JSP book.
    * The JSP page (View in MVC) should get all the data it needs to display from a useBean and/or request.getAttribute().
    * The JSP page should not have any business logic. Its purpose is to display data only (and have some submit buttons such as 'update').
    You can do some basic client side validation using javascript if you want. Because there is no business logic in it, you can easily debug
    your code in the servlet or business logic. You can't set breakpoints in JSP and examine data easily.
    * When you click the submit button, all data from <input type="text" tags, etc is put into request scope via name/value pairs.
    * Submit the JSP page <form tag to a servlet (Control in MVC).
    * The servlet reads the name/value pairs of data from the JSP page via request.getParameter()
    * The servlet should then instansiate a business object (Model in MVC), passing the data it got from the page to the business logic.
    Example: ProcessPage processPage();
    if(request.getParameter("updateButtonClicked"))
    processPage.updateData(data from the jsp page)
    * The business logic should instansiate a separate database object (DAO) to get data to/from the database. Business logic should not have sql in it.
    Business logic should not generate html. Business logic should not have request objects in it.
    * The business logic should return data to the servlet that in turn will put it in request scope via request.setAttribute() so the JSP page can draw itself.
    * The servlet should then call up the approprate JSP page.

  • SQL Query with MS-Access Database

    Hi,
    I have linked my oracle database with MS-Access via a DB LINK. i can access the data from MS-ACCESS, but i have a problem that when i specify the column name or define a where clause in my query it gives me the error ORA-00904: invalid identfier ..
    This query fetch the data without any problem SELECT * FROM TBLREPORT@M_ACCESS but when i run SELECT EMP_ID FROM TBLREPORT@M_ACCESS it gives me the error i mentioned above. (Column name have No problem or mistake of spelling even CASE)
    also when i try to put where clause in the query it gives me same error SELECT * FROM TBLREPORT@M_ACCESS WHERE EMP_ID = '100' (Error)
    is there any change in SQL query for ACCESS database ??
    any clue
    Regards
    Rehman

    Are column/table names in access case sensitive? Issue
    DESC TBLREPORT@M_ACCESS If column EMP_ID actual name shows up in mixed/lower case, enclose it in double quotes and use the exact case. E.g., if column name shows up as Emp_Id, use:
    SELECT "Emp_Id" FROM TBLREPORT@M_ACCESSSY.

  • How to insert date into ms access database using sql query in servlet

    sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
    insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
    or either the system date is inserted with query .
      plz help me
    thanx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    bhavishya wrote:
    sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
    insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
    or either the system date is inserted with query .
    plz help me
    thanxAnd that SQL statement is another reason to use PreparedStatement. I assume bname and sname are input from some form? Well, if that's the case, simply inserting them into SQL by simple String concatenation is just begging for all sorts of problems. What if there is an apostrophe in the entry? Broken Statement. Worse, it's a wide open invitation to an SQL Injection attack.

  • Linking to an Access Database (accdb) - calculated field in query

    Using Crystal Report v 14 we have a problem linking to an Access 2010 database (accdb file format).
    We created a query in the Access database with a calculated field that we want to use to link with Great Pllains database. We can see the query using the database expert and the OLEDB (ADO) data source. The problem is that the calculated field in the Access query does not show in the link manager.
    What is the best wat to link an Access table that has a job number containing hyphens (111-222-333) with the other database that has the job number stored without hyphens (111222333)? Why does our query solution not work?

    Hi,
    I'm not sure if this can be handled at the Database query level, however this can surely be handled from the report level.
    You would need to insert a subreport with Great Pllains as its datasource. The Main report's data source would be the access table.
    Next, in the Main report you would need to create a formula to remove the hyphens from the string and convert it back to number. Use this formula:
    tonumber(replace(,"-",""));
    You can then palce this formula in the details section/group section (which ever is applicable) and then link the subreports's job number field with this formula field. A record selection formula is automatically added in the subreport when you do so.
    Also, make sure the sub-report is place in the same section this formula field is placed in, otherwise you can get unexpected results.
    Hope this helps!
    -Abhilash

  • "RUN-TIME ERROR '3078': The Microsoft Access database engine cannot find the input table or query 'name'. Make sure it exists and that its name is spelled correctly.

     When I run the code below I get the following error:"RUN-TIME ERROR '3078': The Microsoft Access database engine cannot find the input table or query 'False'. Make sure it exists and that its name is spelled correctly. Note that I do not call
    anything by the name of "false" anywhere in this code.
    The subject code (the underscored line of code is highlighted in the debugger when the error occurs):
    Option Compare Database
    Private Sub JobAssign_Click()
    MatLotListAvail_openform
    End Sub
    Function MatLotListAvail_openform()
    Dim dbsAPIShopManager2010 As DAO.Database
    Dim rstMaterialLotJobJoint As DAO.Recordset
    Dim strSQL As String
    Set dbsAPIShopManager2010 = CurrentDb
    strSQL = "SELECT * FROM MaterialLotJobJoint WHERE JobID" = "tempvars!JobID" And "MatLotID" = "tempvars!MatLotID"
    Set rstMaterialLotJobJoint = dbsAPIShopManager2010.OpenRecordset(strSQL, dbOpenDynaset)
    If rstMaterialLotJobJoint.EOF Then
    DoCmd.OpenForm "JobAssignMatConf", acNormal, "", "", acEdit, acNormal
    Forms!JobAssignMatConf!PartapiIDVH = TempVars!PartapiID
    Forms!JobAssignMatConf!JobapiIDVH = TempVars!JobapiID
    Forms!JobAssignMatConf!JobIDVH = TempVars!JobID
    Forms!JobAssignMatConf!MaterialLotIDVH = TempVars!MatLotID
    Forms!JobAssignMatConf!Desc = TempVars!MatDesc
    Forms!JobAssignMatConf!recdate = TempVars!recdate
    DoCmd.Close acForm, "MaterialLotListAvailable"
    Else: MsgBox "This material lot has already been assigned to this job."
    DoCmd.Close acForm, "MaterialLotListAvailable"
    End If
    End Function

    I think the SQL statement should be
    strSQL = "SELECT * FROM MaterialLotJobJoint WHERE JobID=" & _
    tempvars!JobID & " AND MatLotID=" & tempvars!MatLotID
    This assumes thatJobID and MatLotID are number fields.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • SQL query to find access database files?

    Odd request, but does anyone have a SQL query to find files? Specifically, I am looking for machines that have access databases on them. .mdb & .accdb

    Have you enabled inventory for them?
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ
    i was trying to figure out where that option was but couldn't find it under hierarchy settings. perhaps it's been changed since 2012 R2? can you help point it out?

  • Query 32 bit Access Database from 64 bit Sql Server

    Hi All,
    I have a task to query the Accessdb from Sql Server and below are the configuration details:
    OS: Windows Server 2008 R2 Enterprise( 64 bit)
    Sql Server: Sql Server 2012 enterprise (64 Bit)
    Access : MS Office 2010 (32 bit)
    I used the below queries to reap the data from access db.
    SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','D:\Product.accdb', Product) AS Product
    (or)
    SELECT * FROM OPENROWSET('MICROSOFT.ACE.OLEDB.12.0','D:\PRODUCT.ACCDB', PRODUCT) AS PRODUCT
    following error returnd from both queries.
    Error: "Msg 7438, Level 16, State 1, Line 2.    The
    32-bit OLE DB provider "Microsoft.Jet.OLEDB.4.0" cannot be loaded in-process on a 64-bit SQL Server."
    Please help.
    Ram MSBI Developer

    not sure if anyone is watching this thread anymore but i have this scenario. i am using the excel connection manager in SSIS to create an excel spreadsheet with VS 2012.  To do this from what I have read I am required to use the 32-bit driver for "Microsoft
    Access database engine 2007", if I use the 64-bit driver I cannot connect to the Excel connection manager.   i get 0xc020801c message.
    i can install the 32-bit "Microsoft Access database engine 2007" and resolve this problem.  but i also have a stored procedure that creates a spreadsheet (i use this because i have to leave some cells intact), it appears to require the
    64-bit "Microsoft Access database engine 2007".  in 32-bit mode i get the following message
    Msg 7438, Level 16, State 1, Procedure sp_CreateGRfile, Line 26
    The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server.
    so i need both the 32-bit  "Microsoft Access database engine 2007" and 64-bit  "Microsoft Access database engine 2007".
    any thoughts on getting around this issue?

  • Query MS Access Database

    OK - I have a customer that wants to write out to an MS Access Database from Livecycle.  I know this is BAD but they have their reasons - i.e. they have a sever shortage of skills for anything more complex.
    Firstly - I created a Java program to test the JDBC ODBC connection - this worked fine - ran queries and updated OK (code is attached)
    Howver I have tried connecting to Access from within Livecycle in two different ways - both are failing
    Firstly - using the JNDI setup for JDBC ODBC e.g.
    <datasources>
      <local-tx-datasource>
        <jndi-name>MSAccess_DS</jndi-name>
        <!-- format of URL is "jdbc:odbc:DSNNAME" -->
        <connection-url>jdbc:odbc:DBFormData</connection-url>
        <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
        <user-name></user-name>
        <password></password>
      </local-tx-datasource>
    </datasources>
    Calling this within a Livecycle process does not return an error to the process, but the log generates an error:
    2009-08-29 23:01:30,768 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
    org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: General error)
    I also tried creating a Java Component and importing it - by creating a very basic jar and importing it to livecycle (based on the same code I used in my Java testing)
    It also gave me the general error - and I can see it is happening on the line:
            Connection con = DriverManager.getConnection(dbURL, "","");
    Any ideas on what is going wrong, or a workaround?  (Assuming that I have to use Access)
    Thanks
    Tim

    OK I solved this.  This was only happening on the Win2K3 server - not on my local dev instance
    On the server I set the JBoss service to run under the local admin account (in the Services Panel) - after a service restart the jdbc odbc connection worked fine.  It must have been some permissions with the system account

  • Can Java Query An Access Database?

    Is it possible to write a Java program that can retrieve data from Microsoft Access tables? If so, how is this accomplished? Are there any tutorials on the subject?

    I am not sure about the exact specifics, but what you can do is set up a JDBC-ODBC bridge. What that means is you set up an ODBC DSN for your access database. Then you use sun's jdbcodbc driver to access that ODBC DSN, and they execute normal SQL against that...
    Hope that gets you started!
    ERic

  • Caonnecting ms access database through tomcat5.5 query

    Hi,
    I have installed tomcat5.5 and jdk1.6 on my machine which has Windows server2003 as OS.
    I'm not able to clearly underdstand the steps in tomcat docs for connecting to database and the changes to be made in different files.
    Can someone tell me detailed and clear steps for connecting to an ms access database through jsp?
    Thanks in advance for your suggestions.

    I'm not exactly sure why you have this problem. I know that the Microsoft SQL Server driver has a parameter "readOnly=false". Check your DB2 docs to see if you need to set a flag like that, too.
    Maybe it has to do with transactions and auto commit. See if DB2 assumes autoCommit true or false. Maybe you have to explicitly commit your INSERT.
    Maybe you're writing to one database and opening another. Make sure that's correct.
    There are other suggestions that I'll offer.
    You do all that work with a database in a constructor? Bad idea.
    You've got database and UI stuff all mingled together. Ever heard of MVC separation?
    Be object-oriented - start by designing an object to encapsulate all those items you're trying to INSERT.
    Then write a Data Access Object (DAO) that does CRUD operations for that object. Test these thoroughly, preferrably with JUnit, until they're 100% perfect.
    Then have a separate UI that instantiates these objects and calls their methods. The persistence layer shouldn't know about UI stuff, and the UI shouldn't need to have any persistence code in it.
    %

  • How to display image is in result of query to MS Access database

    How can i display image (ole db) from MS Access database?
    I tried to do it throw streams but i have a package not a image. Also i trued to save image as a stream of characteristics but the image doesn't create.
    thnks

    Normally to construct an image in java you need the image data.
    If you have stored the image as a OLE object it may include additional data which make it imposible to identify the image data from java side.
    You need to find a way extract actual data from the ole object.

Maybe you are looking for

  • Two line column heading in ALV Report

    Hi Experts, My requirement is that I have to create an ALV report with columns having two lines of headings. Like a main heading called Consultants under which 5 to 10 columns of departments(Dept Num, Num of Ppl , Manager etc. ) and then Contractors(

  • Problem with call error / call restart

    If during a call with the Bluetooth car speakerphone on and - due to loss of signal, or anything else - I get a call error, in the lock screen there is a message of error with black color font and (!) icon, and until there is nothing strange, right?

  • Default value in advanced  search

    Hi All,           I want to give default values in "open advanced search" in opportunities. I need to give default as sy-datum in Validto field and start date of each quater as default for Validfrom field.                  I have written  the code to

  • APP-FND-01206 Error

    Hello, After fetching data into form when I press f4, the message box Do you want to save the changes made? will appear when I click YES the APP-FND-01206 The record already exists error is coming. Can anyone help me to resolve this error. Thanks & R

  • Procedure Business Function Activation - How To

    Hi all, i have a customer that just upgraded it's systems to ehp4, our newest available release. He is now asking on a general best practice procedure how business functions should be activated in which client and what needs to be transported or not.