logo       


Re: MS Access selectKey question: msg#00303

Subject: Re: MS Access selectKey question
If you can change the "Number" id to "AutoNumber" you won't have to do the combined select/insert thing... if you can't, well, I'm not an iBatis expert but it sounds like you'll have to do the selecting of the next id separate from the insert. Of course then you might have to worry about multiple threads getting the same "next" id...

b

chriskle@xxxxxxxxxxxxxxxxxxxxx wrote:
Thanks for the replies guys. Sorry for the late response..
The id property doesnt exist in the object im inserting, its only an
internal identifier in the access database. In the database this is
defined as Number.

And i am stuck with access, as this system is already deployed and widely
used..
Any help on how to solve this would ensure you a place in heaven ;)


On 9/28/05, chriskle@xxxxxxxxxxxxxxxxxxxxx
<chriskle@xxxxxxxxxxxxxxxxxxxxx> wrote:

Hey,
Im having some difficulties inserting rows into ms access. The error i
get
is:

...
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in org/hisp/dhis/hmis/RoutineData.ibatis.xml. ---
The error occurred while applying a parameter map.
--- Check the addRoutineDataValue-InlineParameterMap.
--- Check the parameter mapping for the 'id' property.
--- Cause: java.sql.SQLException: [Microsoft][ODBC Microsoft Access
Driver]Invalid SQL-datatype

You have id both in your select key and the inserted value, and the
error said "while applying the *parameter* map"...  What datatype is
your "id" property of the object you're inserting?


--
I tend to view "truly flexible" by another term: "Make everything
equally hard". -- DHH







Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe