Java5 printf and java.util.UnknownFormatConversionException: Conversion = '
As a long time C/C++ programmer I was pleased to see printf added to Java5, however one of (IMO) the most useful features - using an asterisk in the format string to indicate a fields width modifier is to be taken from the varargs list doesn't appear to work:
Given:
#include <stdio.h>
int
main()
printf("[%*d]\n", 8, 2);
return 0;
}I get:
[ 2]
However, given:
public class Main
public static void main(String[] args)
System.out.printf("[%*d]\n", 8, 2);
}I get:
Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = '*'
at java.util.Formatter.checkText(Formatter.java:2500)
at java.util.Formatter.parse(Formatter.java:2482)
at java.util.Formatter.format(Formatter.java:2411)
at java.io.PrintStream.format(PrintStream.java:899)
at java.io.PrintStream.printf(PrintStream.java:800)
at Main.main(Main.java:19)
Process finished with exit code 1Not at all the same thing.
It fails on Windows and Mac.
The way I read the documentation I believe this should work.
Am I misinterpreting the doc, doing something wrong, or is this a bug?
Thanks!
Thanks, I understand that. What I am referring to is this from the docs:
http://sharkysoft.com/archive/printf/docs/javadocs/lava/clib/stdio/doc-files/specification.htm
1.3.1. variable width
It is possible to specify a variable field width, where one of the arguments in the argument vector is used to determine the field's width. This is indicated in the format string by using an asterisk character ('*') in place of the actual width value. The corresponding value in the argument list must be an int, and must precede the actual argument being formatted.
Example: If the format specifier is "%*hd", then there are two arguments in the argument list corresponding to this format specifier. The first argument is an int, indicating the field width, and the second argument is converted as a signed short.
Similar Messages
-
when i try to connect to oracle 11g rdbms, following error occurs -->
1. sql developer version - 4.0.3.16 (jdk - jdk1.7.0_51 externally installed) -- newly installed, giving following error when try to connect to oracle 11g rdbms.
2. sql developer version - 3.1.07.42 (jre1.6.0 included) -- used to run earlier.
java.util.UnknownFormatConversionException: Conversion = '0'
at java.util.Formatter.checkText(Formatter.java:2547)
at java.util.Formatter.parse(Formatter.java:2533)
at java.util.Formatter.format(Formatter.java:2469)
at java.util.Formatter.format(Formatter.java:2423)
at java.lang.String.format(String.java:2797)
at oracle.dbtools.raptor.backgroundTask.internal.SimpleRaptorTaskUI.getFormattedTime(SimpleRaptorTaskUI.java:288)
at oracle.dbtools.raptor.backgroundTask.internal.RaptorTaskUI.setState(RaptorTaskUI.java:43)
at oracle.dbtools.raptor.backgroundTask.internal.SimpleRaptorTaskUI.<init>(SimpleRaptorTaskUI.java:63)
at oracle.dbtools.raptor.backgroundTask.internal.RaptorTaskUI.<init>(RaptorTaskUI.java:36)
at oracle.dbtools.raptor.backgroundTask.ui.TaskProgressViewer$4.<init>(TaskProgressViewer.java:346)
at oracle.dbtools.raptor.backgroundTask.ui.TaskProgressViewer.createTaskUI(TaskProgressViewer.java:346)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.initViewers(RaptorTaskManager.java:373)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.access$400(RaptorTaskManager.java:45)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$4.run(RaptorTaskManager.java:299)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.invokeInDispatchThreadIfNeeded(RaptorTaskManager.java:313)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.addTask(RaptorTaskManager.java:302)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.addTask(RaptorTaskManager.java:200)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager.addTask(RaptorTaskManager.java:161)
at oracle.dbtools.worksheet.editor.OpenWorksheetWizard.invoke(OpenWorksheetWizard.java:425)
at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:446)
at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:390)
at oracle.dbtools.worksheet.editor.WorksheetOpenController$1.run(WorksheetOpenController.java:84)
at oracle.dbtools.worksheet.editor.WorksheetOpenController.openWorksheetWizard(WorksheetOpenController.java:90)
at oracle.dbtools.worksheet.editor.WorksheetOpenController.handleEvent(WorksheetOpenController.java:49)
at oracle.ide.controller.IdeAction$ControllerDelegatingController.handleEvent(IdeAction.java:1482)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:663)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:1153)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:618)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)Around a month ago, a similar question appeared on Jeff's block... look for checkText in http://www.thatjeffsmith.com/ask-a-question/
There was no resolution there, so (as the SQL Developer code in that area has not changed) I would tend to think it might have something to do with
1. Your Locale affecting the Formatter class's parsing of that pattern; or
2. A bug in the jdk version in use, probably also related to the Locale.
I recommend upgrading to the latest jdk1.7.0_xx update. If that does not solve the issue, then try changing the Locale. -
Why not Deprecate java.util.Date and java.util.Calendar
With the introduction of java.time, why did you not flag java.util.Date and java.util.Calendar. These classes have been a bane to every Java developer and should never be used again with the introduction of Java 1.8.
Adding the @Deprecated annotation would only just provide a warning about an old API and recommendation to the developer(s) to no longer use it. Doing so would not break any existing library out there; in fact quite a number of constructors and methods on the Date class have already been flagged deprecated.
The new java.time package is far superior to Date/Calendar. -
Java.util.Map and java.util.HashMap samples
Hi.
Please, I need some code samples of java.util.Map and java.util.HashMap interfaces. I have problems to retreive objects in the map.
Cheers,
CataTry the tutorial:
http://java.sun.com/docs/books/tutorial/collections/index.html -
Java.sql.Date and java.util.Date - class loaded first in the classpath
I had two jar files which has java.util.Date and java.sql.Date class file. i want to know whether which class is loaded first in the classpath...
I like to change the order of loading the class at runtime...
Is there is any way to change the order of loading of class...
I may have different version of jar files for example xerces,xercesImpl. some of the code uses xerces ,some of the code uses xercesImpl..i had common classes.
I like to load the class with the same name according to the order i need..
Can we do all these in Run time ?????I had two jar files which has java.util.Date and
java.sql.Date class file. i want to know whether
which class is loaded first in the classpath...
I like to change the order of loading the class at
runtime...
Is there is any way to change the order of loading of
class...
I may have different version of jar files for example
xerces,xercesImpl. some of the code uses xerces ,some
of the code uses xercesImpl..i had common classes.
I like to load the class with the same name according
to the order i need..
Can we do all these in Run time ?????That is meaningless.
The classes you are referring to are part of the Java API. Third party jars have no impact on that. And you can't change to the order because java.sql.Data is derived from java.util.Date. So the second must load before the first.
And if you have two jar files with those classes in them (and not classes that use them) then you either should already know how to use them or you should stop trying to do whatever you are doing because it isn't going to work. -
Oracle Timestamp and java.util.date
Greetings,
【Enviroment】
oracle 10g Express
jdbc 10.2.0.1.0 thin driver
windows Xp professinal
【problem】
I fetched a value of timestamp.
And I faced An Error that "java.sql.SQLException: Cannot set lastup_dt: incompatible types."
We define data type of lastup_dt is timestamp on Oracle.
And We define the data type of lastup_dt of javaBean is java.util.date.
And Ocurr SQLException at result = rsh.handle(rs);
How Can I avoid it?
public Object query(Connection conn, String sql, Object[] params,
ResultSetHandler rsh) throws SQLException {
PreparedStatement stmt = null;
ResultSet rs = null;
Object result = null;
try {
stmt = this.prepareStatement(conn, sql);
this.fillStatement(stmt, params);
rs = this.wrap(stmt.executeQuery());
result = rsh.handle(rs);
} catch (SQLException e) {
this.rethrow(e, sql, params);
} finally {
try {
close(rs);
} finally {
close(stmt);
return result;
Any help I appreciate it.
Thank you.As long as you have the long representation of the time you can create a new java.util.Date:
new java.util.Date(ts.getTime()) -
Synchronized and java.util.ConcurrentModificationException
Hi,
I keep getting a java.util.ConcurrentModificationException when running the following code:
ArrayList tObjects = ...
synchronized (tObjects) {
Iterator tObjectsIterator = tObjects.iterator();
while (tObjectsIterator.hasNext()) {
Object tObject = tObjectsIterator.next(); -----> Exception
I run synchronized on tObjects so I can't understand why (and how) I get the Exception, can anyone help?
Thanks,
Iggythanks for the help, I still have some difficulties:
I have a (static) class ObjectsHolder which holds an ArrayList tObjects, I have various methods that access the ArrayList and return one/some elements.
I would like to synchrinize on the ArrayList tObjects in ObjectsHolder, but the holder returns the ArrayList itself I am unsure whether the access to the ArrayList will be synchronized even in the calling method.
A. -
Jdev webservice and java.util.Collection
Hi,
i write a web service based on an stateless
session EJB i have 2 method who return double
and they work fine.
But i have added a method who return a Collection and
when i try to regenerate my web service i got
a message error because the return type does not
have an xml chema mapping and/or serializer
specified.
How can i fix this problem ?
I use jdev 9.0.5.2 and oracle 9ias 9.0.4.1.
Thank you for your help.I'm not a WS PM, but I think the problem here is that a java.util.Collection is a supported type for WS based on the 904 release. From what I remember the supported types are the Java primitives, their wrappers (ie java.lang.Long), java.lang.String, arrays of these and JavaBeans which have fields of these types.
I think if you want to use Collections then you need to use the JAX-RPC enabled Web Services which we provide in the 10.1.3 releases of JDev and OC4J.
cheers
-steve- -
CreateQuery and java.util.Date
I have a database fiedl that has a Date type, so after creating my named query, I am setting the currenty date to the field using
query.setParameter("createDate", new java.util.Date());
I get a failure after doing this because TopLink gets an unexpectedToken EJBQLException in trying to parse "Fri" in the resulting query like this
p.createDate = Fri Dec 21 00:00:00 PST 2007
what should I do to get this query to run. I hope I am clear.
MichaelFor java.sql.Date the spec. defines the following setParameter method (3.6.1 Query Interface):
* Bind an instance of java.util.Date to a named parameter.
* @param name
* @param value
* @param temporalType
* @return the same query instance
* @throws IllegalArgumentException if parameter name does not
* correspond to parameter in query string
public Query setParameter(String name, Date value, TemporalType
temporalType); -
Java.util.Timer and java.util.TimerTask running threads problem
Hi,
I have following scenario.
1. My thread to send mail has to run at a fixed time interval thus I am using the following method from the Timer class.
scheduleAtFixedRate(TimerTask object, start time, interval)
2. My thread in the class checkDBSendEmail that extends TimerTask class reads database and sends mail based on the data received in the run() method.
3. Whenever I send any mail, I log it into a database table that keeps the record of the emails sent.
4. i have put it some logic to filter data form data base after that it will sends me unique data. Data should be email to different uses based on the list.
Now the Problem:
I am receiving duplicate mails on multiple times.
Is there anything that I am missing in the following that would help me resolve this problem.
my Servlet inti method is:sorry code is here..........
public class SchduleTimeEmail extends HttpServlet implements SingleThreadModel{
public void init( ServletConfig servletConfig ) throws ServletException{
super.init(servletConfig);
this.config = servletConfig;
try{
// specify in the format as in 12.13.52 or 3:30pm
initialTime = format.parse( config.getInitParameter("initialTime"));
delay = HOURS_24;
RunLogger.addLogger("init first try:"); // log file
catch( ParseException pe ){
// Log.sendMessage( Log.MESSAGE_LEVEL_INFO , "[TimerServlet]", "startTime could not be parsed from web.xml file" );
System.out.println("startTime could not be parsed from web.xml file."+pe);
initialTime = new Date();
delay = HOURS_24;
// Timer Must start combination of 15,30,45,00 min for check schdule
Date dalayTimeMinSec = new Date();
int currentMin = dalayTimeMinSec.getMinutes();
int totalDelayTime = 0;
if(currentMin%15!=0 || currentMin%15 != 15){
try {
int delayMin = currentMin % 15;
totalDelayTime = (15-delayMin) * 1000 * 60;
dalayTimeMinSec.setSeconds(0);
Thread.sleep(totalDelayTime);
RunLogger.addLogger("Thread go for sleep:");
} catch (InterruptedException ex) {
RunLogger.addLogger(ex.toString());
//Start Timer from this time
timer = new Timer();
Calendar time = Calendar.getInstance();
Calendar timeOfDay = Calendar.getInstance();
try{
timeOfDay.setTime(initialTime);
time.set((Calendar.HOUR_OF_DAY), timeOfDay.get(Calendar.HOUR_OF_DAY));
time.set(Calendar.MINUTE, timeOfDay.get(Calendar.MINUTE));
time.set(Calendar.SECOND, timeOfDay.get(Calendar.SECOND));
Calendar startTimeOfTimer = Calendar.getInstance();
startTimeOfTimer.add( Calendar.MINUTE, 0 );
// make sure the first timer doesn't fire before the server starts
if( time.before(startTimeOfTimer) )
time = startTimeOfTimer;
System.out.println("TimerServlet: Timer has been set for " + time.getTime() + " '(" + delay + ")'"); // for checking
checkDBSendEmail msasTask = new checkDBSendEmail();
timer.scheduleAtFixedRate( msasTask, time.getTime(), delay );
catch( Exception e ){
RunLogger.addLogger(e.toString());
public void destroy(){
timer.cancel();
super.destroy();
and another class is:..
public class checkDBSendEmail extends TimerTask{
public void run()
// System.out.println("Function run : "+ functionExcuteCount++);
try{
// DB Logic as well as send e-mail function call
catch( Exception ex ){
RunLogger.addLogger(ex.toString());
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
public String getServletInfo() {
return "Short description";
// </editor-fold>
I also checked the email server settings, and I am sure that the email server is not duplicating the emails.
this code working correctly on my local machine But in live server it duplicating email and still I am receiving duplicate mails.
Any help is appreciated.
Thanks,
Sharda -
Problem about aix and java.util.Date
Hello,
I am using AIX 5.1 with JDK 1.4 and i got a problem
using this JDK 1.4
I was using the jdk 1.2.2 and it gets to me the correct
date from the system ... i've never exported any environment
variable like lc_type, lang , etc ...
but now, using jdk 1.4, i get wrong time, one hour less,
can i have to export some environmental variable? which ones?
because i've tried with LANG=es_ES , LC_TYPE and it doesn't
work
thank you
[email protected]It seems to have to do with default time zone.
You can consider explicitly defining the time zone you want the dates to be formatted against. -
Servlets and java.util.concurrent
Hey --
I know one is not supposed to spawn their own threads from Servlets and EJBs, but is it also 'bad form' to use Callables from a Servlet or EJB? If not can something similar be done safely?
I need to be able to (a) submit a file to be processed (b) give the user back a 'got it, will work on it' response, (c) let the user see the status of his 'job' and (4) open the results when complete.
The file processing would be running outside of the normal send request/return response path which is, of course, a synchronous process. I don't see a way, other than spawning a thread in that servlet (or another servlet which manages the 'jobs') to provide for 'long running processes.'
Thanks for any insight.
- Z -
Message was edited by:
zelmakHey --
I know one is not supposed to spawn their own threads from Servlets and EJBs, but is it also 'bad form' to use Callables from a Servlet or EJB? If not can something similar be done safely?
I need to be able to (a) submit a file to be processed (b) give the user back a 'got it, will work on it' response, (c) let the user see the status of his 'job' and (4) open the results when complete.
The file processing would be running outside of the normal send request/return response path which is, of course, a synchronous process. I don't see a way, other than spawning a thread in that servlet (or another servlet which manages the 'jobs') to provide for 'long running processes.'
Thanks for any insight.
- Z -
Message was edited by:
zelmak -
Puzzled by the redefinition of the methods in java.util.Set
Hi all,
I don't understand why those methods in java.util.Set redefined since their counterparts have alrealdy been defined in java.util.Collection and java.util.Set extends java.util.Collection. I agree to redefine boolean add(Object o) because its contract has been modified, but what about the rest like
size() and iterator() ?
Thanks.Hi all,
I don't understand why those methods in
in java.util.Set redefined since their counterparts
have alrealdy been defined in java.util.Collection
and java.util.Set extends java.util.Collection. I
agree to redefine boolean add(Object o) because its
contract has been modified, but what about the rest
like
size() and iterator() ?Completeness's sake?
~Cheers -
(Again) java.util.Date vs java.sql.Date
Hi there,
(Again) Im trying to understand the EXACT difference between
java.util.Date vs java.sql.Date.
Googling, I can see that this is a very "popular" subject, but I still
cannot figure out it exactly.
Many writers claim that java.sql.Date only stores the DATE part (yyyy-
mm-dd) but not the TIME part (hh:MM:ss) of a Date/Time value, but that
I can easily disprove:
java.util.Date ud = new java.util.Date(); java.sql.Date sd = new java.sql.Date(ud.getTime()); System.out.println(DateFormatUtils. format(ud, "yyyy-MM-dd HH:mm:ss.SSS")); System.out.println(DateFormatUtils. format(sd, "yyyy-MM-dd HH:mm:ss.SSS"));
Output:
2009-09-18 15:17:36.635 2009-09-18 15:17:36.635
So, apparently, java.sql.Date and java.util.Date have THE SAME
precision (at least down to the millisecs...).
And the official API documentation, really looks more confusing than
helpful to me::
*"java.sql.Date:*
*A thin wrapper around a millisecond value that allows JDBC to identify*
*this as an SQL DATE value. A milliseconds value represents the*
*number of milliseconds that have passed since January 1, 1970*
*00:00:00.000 GMT.*
*To conform with the definition of SQL DATE, the millisecond values*
*wrapped by a java.sql.Date instance must be 'normalized' by setting*
*the hours, minutes, seconds, and milliseconds to zero in the*
*particular time zone with which the instance is associated. "*
Exactly what means "an SQL DATE value" ? How EXACTLY does it differ
from a java.util.Date value?
Most importantly: WHY does JDBC need to distinguish between them?
And, here again: *"a java.sql.Date instance must be 'normalized' by*
*setting the hours, minutes, seconds, and milliseconds to zero in the*
*particular time zone..."*
What does that mean exactly? Apparently, the constructor doesnt
enforce this restriction, per the example above. So what's the REAL
point with this type, java.sql.Date?
Very greatful, if you can help me clarify this, once and for all.
TIA,And the official API documentation, really looks more confusing than helpful to me:The problem is that you need to understand SQL as well as Java for this to make sense. It's not the Java API's job to tell you how your SQL database works - there's a myriad of subtle differences even when the DB is compliant with the SQL spec.
Most compliant databases support DATE, TIME, and TIMESTAMP values. DATE represents only a date. TIME represents only a time. TIMESTAMP represents both. There are further complicating factors, but that's roughly how it stands.
In Java the normal type for representing time is (or was when the API was created) the java.util.Date but this is a close approximation only to the TIMESTAMP value. In order to bring the two together the java.sql.Date, java.sql.Time and java.sql.Timestamp classes were created. Making them derive from java.util.Date was probably not a good idea.
java.util.Date suffers from a number of deficiencies. java.util.Calendar was supposed to address them but didn't really succeed. The JodaTime library is rather better, but it's all a lot more complicated than you might expect - partly because time management really is a much harder problem than it appears at first glance - there are timezones, leap years, leap seconds, the difference between astronomical and atomic time, and so on and so forth. -
Test suites for Java.lang, java.util ?
Does anyone known a good (free) test suite for java.lang and java.util ?
I heard about "Mauve project" and was wondering how good it is...
any others equivalent projects ?
Thanks a lot !
Eg\\*Hi,
because I will have to test a specific implementation of these package (on an embedded device).
Eg\\*
Maybe you are looking for
-
How to call up an executable file (eg. MSPaint) from within my java program
How to call up an executable file (eg. MSPaint) from within my java program
-
Is it possible yet to import RAW files that have attached .xmp sidecar files with complete meta data including keywords into Aperture without first converting them to .dng's? I have 30k of photos shot with a Canon 1Ds, 1DsM2 & 5DM2 and have input met
-
Relation between master and transaction data
Hi experts, I have a basic question how the relation between masterdata and transction data is maintained in R/3. As I know first we extract master data and later transaction data in a typical R/3 based scenario. 1.How does BW knows that , the transa
-
Some desktop programs uses an old gtk theme
Nautilus on the right and Thunar on the left. Some of my desktop programs look like they don't have any theme. I have installed gtk-engines, but that didn't help. The theme is located in /usr/share/themes. I have the same problem with totem and vlc.
-
Hello, I want to create oPurchaseDeliveryNotes Documents. oPurchDln.NumAtCard = oPurchOrdr.NumAtCard oPurchDln.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes oPurchDln.HandWritten = SAPbobsCOM.BoYesNoE