I am writing a program a little java program that reads an ACCESS database and writes the records to a the I.

I had this program working, but then I decided to add an identity column to the database on the I.

Now I can't figure out how to get the records written.

Snippet of what I'm doing



pstmt= condb.prepareStatement("INSERT into Cutsheet00 VALUES (?,?,?,?)");

while (rs.next())
{
int order = rs.getInt(1);
String house = rs.getString(2);
String street = rs.getString(3);


pstmt.setInt(1,order);

if (house == null)
house = " ";
pstmt.setString(2,house);
pstmt.setString(3,street);
pstmt.executeUpdate();
}

File cutsheet00 has 4 fields, identity column, order, house, street)
I have tried various combinations, but nothing I do lets me get the identity column added.


Thanks for any help

Mike

NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.