UsingVORTEX++
-
How do I get a describe of what would have been returned from a query, for
example the type when no rows are returned?
-
dbStatement.getColDesc()
-
I'm trying to start the Vortex TRIM RPC (vtx17.dll,vtx17.exe) program in the
Windows environment but I receive an error from db.connect as follows:
'connect error in db.connect DLLSAFE: Loaded DLL is not thread safe'
Do you have any clues to what it could be?
-
Use vtxnet2 instead of vtxnetd. vtxnetd on Windows
is the multi-threaded version
whereas vtxnet2 is single-threaded.
-
I have a case where 99% of the time, the data is already in the
database, so I would like to try an update on the row. If that
doesn't do anything, then I would do the insert, but I
don't know how to tell if the update successfully updated a record or
not. How do I tell how many (if any) rows the update operated on?
-
Use dbChannel::getRowsAffected().
-
I'm inserting a row with a column (type varchar2(10)) to a certain value. That
value has spaces at the end.
So, using VORTEX++, I make a dbChar class, and construct it specifying both
the string AND the length. Then I use that in an insert statement.
In the database, when I query with either VORTEX++ or SQL*PLUS, the
varchar2 value in question has no spaces on the end.
Also, I tried doing the exact same insert statement on the sqlplus command
line, and I can use that to insert the column value with the spaces at the
end intact--no problem.
-
You must set the Oracle character type to 96 which handles trailing blanks.
This is done using the command() method.
pchannel->command(NULL, 7, "96");
-
How do I know which row caused an error on a bulk insert?
-
Use dbChannel::getRowsAffected().
For example lets say you are doing a bulk insert of 100 records. You get an
error indicating that uniquness has been violated. getRowsAffected() will
show you how many records were actually inserted as well as determining
which record was bad. You can then fix the faulty record and continue
inserting without having to redo the whole insert.
-
What do the parameters passed in dbChannel() mean?
-
Here is an example:
db = new dbChannel(128,32,128,8192);
128 - The number of logical cursors (dbCursor())
32 - The number of DBMS cursors
128 - The maximum number of columns returned by a query
8192 - The fetch buffer size (see above)
The fetch buffer size can have a serious performance impact. For example, if
you do a select
statement that returns 100 records and each one is 100 bytes, VORTEX
fetches the first 81 into its buffer and each time your application fetches a
record, it is fetched from the local buffer. This minimizes your
network traffic. It does not limit the total number of records you can
retrieve. Making this value too large, however means that there will be
a noticable delay before the first records are available because VORTEX++
fetches enough rows to fill the fetch buffer before returning control.
-
I'm using just 10 cursors max, and my thread catches a dbException with the
message: Too many currently open cursors. The number of cursors in
dbChannel is for one thread or to all threads in an application ?
-
It is for each thread.
In order to get "Too many concurrently open cursors", you must have 32 dbCursor
cursors open (i.e. select statements with more data pending) and be attempting
to open the 33rd (using the dbChannel values in the previous question).
© 1985-2020
Updated 6 Sep 2011.
|