HELP!!!Embedding a JTable on a ScrollPane into a JTable's cell
I have a single column DND JTable on a DND JScrollPane that I would like to put into another's JTable's cell. I've tried creating a CellRenderer that extends the DNDJScrollPane and returns this but this doesn't work. I do have code I could post if anyone is interested in helping out.
First copy this and compile and run and c.. then look at the code
import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.io.*;
import java.awt.*;
public class JTableExample extends JFrame
JTableRenderer renderer;
MyTableModel m1, m2;
public JTableExample()
super();
m1 = new MyTableModel();
m2 = new MyTableModel();
DefaultTableModel dtm = new DefaultTableModel()
// make first cell uneditable
public boolean isCellEditable(int row, int column)
return !(column == 0);
dtm.setDataVector(new Object[][]{{ "JTable1", m1},
{ "JTable2", m2}},
new Object[]{ "Column1","Column2"});
JTable table = new JTable(dtm);
renderer = new JTableRenderer();
table.getColumn("Column2").setCellRenderer(renderer);
table.getColumn("Column2").setCellEditor(new JTableEditor());
table.setRowHeight(80);
JScrollPane scroll = new JScrollPane(table);
getContentPane().add(scroll);
setSize( 400, 250 );
setVisible(true);
public static void main(String[] args) {
JTableExample frame = new JTableExample();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
* JTable Editor
class JTableEditor extends DefaultCellEditor
public JTableEditor()
super(new JCheckBox());
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row, int column)
return renderer;
public Object getCellEditorValue()
return (MyTableModel)((JTableRenderer)renderer).jtable.getModel();
* JTable Renederer
class JTableRenderer extends JScrollPane implements TableCellRenderer
JTable jtable;
public JTableRenderer()
jtable = new JTable();
getViewport().add(jtable);
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus,
int row, int column)
if (isSelected)
setForeground(table.getSelectionForeground());
setBackground(table.getSelectionBackground());
jtable.setForeground(table.getSelectionForeground());
jtable.setBackground(table.getSelectionBackground());
else
setForeground(table.getForeground());
setBackground(table.getBackground());
jtable.setForeground(table.getForeground());
jtable.setBackground(table.getBackground());
jtable.setModel((AbstractTableModel)value);
return this;
class MyTableModel extends AbstractTableModel {
final String[] columnNames = {"First Name",
"Last Name",
"Sport",
"# of Years",
"Vegetarian"};
final Object[][] data = {
{"Mary", "Campione",
"Snowboarding", new Integer(5), new Boolean(false)},
{"Alison", "Huml",
"Rowing", new Integer(3), new Boolean(true)},
{"Kathy", "Walrath",
"Chasing toddlers", new Integer(2), new Boolean(false)},
{"Mark", "Andrews",
"Speed reading", new Integer(20), new Boolean(true)},
{"Angela", "Lih",
"Teaching high school", new Integer(4), new Boolean(false)}
public final Object[] longValues = {"Angela", "Andrews",
"Teaching high school",
new Integer(20), Boolean.TRUE};
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][col];
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
public boolean isCellEditable(int row, int col) {
if (col < 2) {
return false;
} else {
return true;
public void setValueAt(Object value, int row, int col) {
if (data[0][col] instanceof Integer
&& !(value instanceof Integer)) {
try {
data[row][col] = new Integer(value.toString());
fireTableCellUpdated(row, col);
} catch (NumberFormatException e) {
} else {
data[row][col] = value;
fireTableCellUpdated(row, col);
private void printDebugData() {
cheers
good luck
Similar Messages
-
Help needed to loadjava apache poi jars into oracle database.
Help needed to loadjava apache poi jars into oracle database. Many classes left unresolved. (Poi 3.7, database 11.1.0.7). Please share your experience!
Hi,
The first 3 steps are just perfect.
But with
loadjava.bat -user=user/pw@connstr -force -resolve geronimo-stax-api_1.0_spec-1.0.jar
the results are rather unexpected. Here is a part of the log file:
arguments: '-user' 'ccc/***@bisera7-db.dev.srv' '-fileout' 'c:\temp\load4.log' '-force' '-resolve' '-jarsasdbobjects' '-v' 'geronimo-stax-api_1.0_spec-1.0.jar'
The following operations failed
resource META-INF/MANIFEST.MF: creation (createFailed)
class javax/xml/stream/EventFilter: resolution
class javax/xml/stream/events/Attribute: resolution
class javax/xml/stream/events/Characters: resolution
class javax/xml/stream/events/Comment: resolution
class javax/xml/stream/events/DTD: resolution
class javax/xml/stream/events/EndDocument: resolution
class javax/xml/stream/events/EndElement: resolution
class javax/xml/stream/events/EntityDeclaration: resolution
class javax/xml/stream/events/EntityReference: resolution
class javax/xml/stream/events/Namespace: resolution
class javax/xml/stream/events/NotationDeclaration: resolution
class javax/xml/stream/events/ProcessingInstruction: resolution
class javax/xml/stream/events/StartDocument: resolution
class javax/xml/stream/events/StartElement: resolution
class javax/xml/stream/events/XMLEvent: resolution
class javax/xml/stream/StreamFilter: resolution
class javax/xml/stream/util/EventReaderDelegate: resolution
class javax/xml/stream/util/StreamReaderDelegate: resolution
class javax/xml/stream/util/XMLEventAllocator: resolution
class javax/xml/stream/util/XMLEventConsumer: resolution
class javax/xml/stream/XMLEventFactory: resolution
class javax/xml/stream/XMLEventReader: resolution
class javax/xml/stream/XMLEventWriter: resolution
class javax/xml/stream/XMLInputFactory: resolution
class javax/xml/stream/XMLOutputFactory: resolution
class javax/xml/stream/XMLStreamReader: resolution
resource META-INF/LICENSE.txt: creation (createFailed)
resource META-INF/NOTICE.txt: creation (createFailed)
It seems to me that the root of the problem is the error:
ORA-29521: referenced name javax/xml/namespace/QName could not be found
This class exists in the SYS schema though and is valid. If SYS should be included as a resolver? How to solve this problem? -
Need help for publishing web intelligence document (universe) into InfoView
Post Author: mirage
CA Forum: Publishing
Hello all,
I need help for publishing web intelligence document (universe) into InfoView.
can't find this information in Business Objects Designer's Guide and in Business Objects Administrator Guide.
Can somebody give short instructions how can I do it?
Regards, SlavaIf the change between the 2 types of data has to happen dynamically during run time them
1. Use 2 dataproviders
a. Current
b. Historic
2. Merge the 2 dimensions
3. Use Webi variable to switch between the measure of the current and historic universe
Ex if [year] < 2010 then historic.[expense] else current.[expense]
Hope this helps,
Divya -
Need help serializing an AbstractTableModel for a JTable with cell editing.
Fun times are ahead. Here we go!
I have a JTable that contains data I'd like to serialize out to a file to be restored and viewed later.
So I tried saving the AbstractTableModel subclass out to a file. Whenever I do this, I get the following error message:
java.io.NotSerializableException: javax.swing.JTable$CellEditorRemover
Now I know for fact that serializing an AbstractTableModel that was installed in a JTable without cell editing works just fine (my old code did exactly that). As a result, I think that the code that handles events in the AbstractTableModel contains references back out to the JTable, which causes the JTable to be saved no matter what (even though I'm just interested in saving the TableModel only). It causes a bigger file than normal, but file size is not an issue. The only issue I have is that CellEditorRemover (an undocumented inner class of JTable), which is automatically installed for JTables with editable cells, is not serializable.
This leads to the following questions:
1. Is there a way to avoid serialization/deserialization of the CellEditorRemover inner class of JTable?
2. Is there a way to save an AbstractTableModel without saving all of the event listeners associated with it?
I think an answer to either of these questions would go a long way towards solving my problem. Otherwise, I'll resign myself to weeping silently in the corner of my office.
Thanks!I would suggest that if you can you only save the
data... but i would do this by using the
externalizable interface.
What you will need to do is have the
writeExternal(ObjectOutputStream out) and
readExternal(ObjectOutputStream out) methods in your
class. These will be responsiable for saving the
data.
Here's an example of what you can do in these
methods... this is just a little tidbit from a program
i've written.public void writeExternal(ObjectOutput out) throws
IOException {
out.writeInt(size);
out.writeObject(drawName);
out.writeInt(playersLength);
for(int i = 0; i < playersLength; i++)
) out.writeObject(players);
out.writeInt(seedsLength);
for(int i = 0; i < seedsLength; i++)
) out.writeObject(seeds[i]);
out.writeInt(drawLength);
for(int i = 0; i < drawLength; i++)
) out.writeObject(draw[i]);
public void readExternal(ObjectInput in) throws
IOException, ClassNotFoundException {
size = in.readInt();
drawName = (String)in.readObject();
playersLength = in.readInt();
for(int i = 0; i < playersLength; i++) players[i] =
= (String)in.readObject();
seedsLength = in.readInt();
for(int i = 0; i < seedsLength; i++) seeds[i] =
= (String)in.readObject();
drawLength = in.readInt();
for(int i = 0; i < drawLength; i++) draw[i] =
= (String)in.readObject();
You can now use your class as you would a Serializable
class, but it will only save the data
Hope this helped
webaf409java
I forgot to add some critical information in my original post. My apologies. :(
I've thought about using Externalizable, but am hesitant to use it because the application would no longer be able to read in files using the old save format (ie, AbstractTableModels for JTables without CellEditorRemovers ). I want to preserve the ability to read the old saved AbstractTableModel formats if possible.
Do you know of a way to revert to the default deserialization mechanism from readExternal? This way, during deserialization, I could do a quick test on the object being read and have the ability to default to the regular deserialization mechanism if the object is of the old type or continue with the new Externalizable stuff if the object is one of the new type. Maintaining file compatibility is key. -
I need a help in reading video file of 80MB into ...
Hello,
I need a help in reading video file of 80MB into a vector storing ByteArrays in it.Please help me soon.
Thank YouHello,
I was able to solve my problem by thinking & my code goes as follows.I am trying to read a video file in my program.
public Vector getFileMediaContent(RandomAccessFile fileObj){
Runtime runtime = Runtime.getRuntime();
System.out.println ("Free memory : inside Boolean Type Panel" + runtime.freeMemory() );
dataContent.removeAllElements();
System.out.println("dataContent :"+dataContent.size());
try{
int size=(int)fileObj.length();
if(size<2000000){
byte[] data = new byte[size];
fileObj.read(data);
dataContent.addElement(data);
data=null;
System.gc();
else{
int fixedsize=2000000;
int startindex=0;
int read=0;
int remaining=0;
while(read!=-1){
byte[] data=new byte[fixedsize];
read=fileObj.read(data,0,data.length);
dataContent.addElement(data);
startindex=startindex+data.length;
remaining=size-startindex;
fileObj.seek(startindex);
data=null;
System.gc();
if(remaining>0 && remaining<2000000){
byte[] data1=new byte[remaining];
read=fileObj.read(data1,0,data1.length);
dataContent.addElement(data1);
data1=null;
System.gc();
System.out.println("outside while");
System.out.println("dataContent 1 :"+dataContent.size());
System.out.println ("Free memory : inside Boolean Type Panel" + runtime.freeMemory() );
fileObj = null;
System.gc();
}catch(Exception e){
e.printStackTrace();
return dataContent;
Now I am not facing the problem of IndexOut of Bounds Exception But I am getting Out of Memory Error.
Can You suggest me to come out of this,.
As I know I have two solutions.
1.Make the objects Null which is using more space & call System.gc();
2.Increase the Virtual Memory of my System.
Any solutions other than this?
And How to Increase the Virtual Memory?Please do reply.
ThankYou -
can anyone help? am unable to upload photos into iphoto. have been doing it for a few years but will not allow it anymore. no error message comes up. has anyone had a similar experience?
What version of iPhoto? How are you trying?
As a Test:
Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
Import a few pics into this new, blank library. Is the Problem repeated there? -
JTable's Cell navigation with TAB
Dear ALL
I have face one problem in JTable's cell navigation with TAB. The problem as describe bellow.
I have two columns NAME and ADDRESS. Set focus on ADDRESS column's first cell. now if i am press tab key then focus controll comes on second cell which is the ADDRESS column. At the end of row controll comes on first row second column that means focus on ADDRESS column's first cell.
Please give me some hints.
Thanks in advance.
AmitYour description doesn't make any sense (to me at least) so I don't know what your problem is or what you are asking to be changed.
The normal tab order is Left to Right, Top to Bottom. So if the focus is at the top/left normal tabbing would be:
Row 0, Column 0 (name 0)
Row 0 Column 1 (address 0)
Row 1, Column0 (name 1)
Row 1, Column 1 (address 1)
Row 2, Column 0 (name 2)
Row 2, Column 1 (address 2)
Your question seems to imply that your tab from address to addreass, which doesn't make sense.
"Set focus on ADDRESS column's first cell. now if i am press tab key then focus controll comes on second cell which is the ADDRESS " -
JTable - active cell not highlited when editable
Hello,
I'm using JDK 1.4.2_05, and I'm seeing some behavior that seems a bit strange.
In my JTables, some cells are editable, and others are not. When the user moves the active cell around (with the arrow keys, or TAB and RETURN) the non-editable cells show up with a nice blue color. If a cell is editable, it doesn't change at all, so the user has no idea where the "cursor" (meaning the active cell) is.
These cells don't have any special renderer or anything. My JTable has these set:
setRowSelectionAllowed(false);
setColumnSelectionAllowed(false);
setCellSelectionEnabled(true);Thanks for any advice!
--- EricOkay, yeah, I overrode the default renderer, and had it check whether the cell was selected or not, setting the background color appropriately. Duh. --- Eric
-
How can i treat an Jtable on cell changed event, not on value changed
Do you mean cell selection changed? One way is to add a ListSelectionListener to both the table's and the table's ColumnModel's ListSelectionModels. Something likeListSelectionListener lsl = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
System.out.println(e.getSource());
ListSelectionModel lsm = (ListSelectionModel) e.getSource();
if (!lsm.getValueIsAdjusting()) {
System.out.println("Selection changed");
table.getSelectionModel().addListSelectionListener(lsl);
table.getColumnModel().getSelectionModel().addListSelectionListener(lsl);Note that simultaneous change of both row and column will generate two valueChanged events.
If that's not what you wanted to know, ask a better question.
[http://catb.org/~esr/faqs/smart-questions.html]
db -
I am using Iphone 3 GS since last 4 months. I have note registered it under Icloud and unfortunately i have lost my cel 2 days before. Can someone help me / tell me the ways that i can get my cel back or trace it..?
No way to trace it if you didn't active Find my Phone on your iPhone before you lost it.
Notify your carrier and your police of the loss. Chances are you will never get your phone back. -
Appearing the added JTable's cell JComboBox at running the Class
During the time of employing the JTable,arising the problem of how to appear the added JTable's cell JComboBox at loading the class..Can you aid me plz to resolve this bug...If u know answer,plz forward the resolution..
Sorry, I don't understand the question so I'll just point you to the Swing tutorial on "How to Use Tables" which has a working example of using a combo box in a table:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html -
Need help embedding mailchimp subscription code into dreamweaver.
so I created my page in edge animate, and then I brought it over to adobe dreamweaver, and I dont know where or how to place my embeded mailchimp code?
<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/slim-081711.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:360px;}
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="http://kandied.us3.list-manage.com/subscribe/post?u=4525b320bd81872705a48ea05&id=4743a970b 1" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;"><input type="text" name="b_4525b320bd81872705a48ea05_4743a970b1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
<!--End mc_embed_signup-->
I keep trying to add it to it, but I either get noting or just the subscription box. does this happen due to my edge animate project?Ben Thank you so much for your reply! It helped me read the code and made me understand it better. I decided to make my own subscription box by making a symbol "Subscription" and inside this i created two more symbols called "Textbox" and "Submittbutton". I tried putting in part of the code from above under the div id, but it kept creating the whole text box behind the symbols in dreamweaver. How would you suggest I embed the code from above into my created submission box below?
<div id="Stage_Center2_Subscription">
<div id="Stage_Center2_Subscription_subscribe"></div>
<div id="Stage_Center2_Subscription_Submittbutton">
<div id="Stage_Center2_Subscription_Submittbutton_Submitbutton">
<div id="Stage_Center2_Subscription_Submittbutton_Submitbutton_RoundRect2"></div>
</div>
<div id="Stage_Center2_Subscription_Submittbutton_text">
<div id="Stage_Center2_Subscription_Submittbutton_text_Text">Join</div>
</div>
</div>
<div id="Stage_Center2_Subscription_Textbox">
<div id="Stage_Center2_Subscription_Textbox_textbox">
<div id="Stage_Center2_Subscription_Textbox_textbox_RoundRect"></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Thank you for taking the time to look at my question! I really appreciate it!
Kyle -
Need help embedding photo gallery swf into main swf...
So I am attempting to create a website in flash and have the
main swf created for that. However, I've also created a photo
gallery in a separate swf which I want to embed into one of the
scenes in the main swf. I tried importing directly to stage, but
quickly realized that the timeline from the photo swf would not get
carried over. Basically, I know that it has to be accomplished
using AS, but don't know what that script would be. Any help would
be appreciated!OK, well, that wasn't really a tutorial as much as it was
just a huge section of code I couldn't make sense of. Anyways,
instead of loading the gallery externally now I decided to just
make it in the actual main swf. So, basically, in the section of
the main swf reserved for the gallery I created an empty movie
clip, went inside the clip, created layers for script, thumbs and
photos. The photos themselves were in a movieclip of their own.
Each photo has a small fade in accomplished by staggering the
keyframes for each photo with a stop(); action on the last frame of
each photo where it comes to full opacity. The thumbnails are back
in the main movieclip where each button has code telling it to go
to the beginning of each photos transition and play. It is supposed
to play until it hits that stop action, but it won't play at all.
Suggestions? -
Please help with an embedded query (INSERT RETURNING BULK COLLECT INTO)
I am trying to write a query inside the C# code where I would insert values into a table in bulk using bind variables. But I also I would like to receive a bulk collection of generated sequence number IDs for the REQUEST_ID. I am trying to use RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs clause where :REQUEST_IDs is another bind variable
Here is a full query that use in the C# code
string sql = "INSERT INTO REQUESTS_TBL(REQUEST_ID, CID, PROVIDER_ID, PROVIDER_NAME, REQUEST_TYPE_ID, REQUEST_METHOD_ID, " +
"SERVICE_START_DT, SERVICE_END_DT, SERVICE_LOCATION_CITY, SERVICE_LOCATION_STATE, " +
"BENEFICIARY_FIRST_NAME, BENEFICIARY_LAST_NAME, BENEFICIARY_DOB, HICNUM, CCN, " +
"CLAIM_RECEIPT_DT, ADMISSION_DT, BILL_TYPE, LANGUAGE_ID, CONTRACTOR_ID, PRIORITY_ID, " +
"UNIVERSE_DT, REQUEST_DT, BENEFICIARY_M_INITIAL, ATTENDING_PROVIDER_NUMBER, " +
"BILLING_NPI, BENE_ZIP_CODE, DRG, FINAL_ALLOWED_AMT, STUDY_ID, REFERRING_NPI) " +
"VALUES " +
"(SQ_CDCDATA.NEXTVAL, :CIDs, :PROVIDER_IDs, :PROVIDER_NAMEs, :REQUEST_TYPE_IDs, :REQUEST_METHOD_IDs, " +
":SERVICE_START_DTs, :SERVICE_END_DTs, :SERVICE_LOCATION_CITYs, :SERVICE_LOCATION_STATEs, " +
":BENEFICIARY_FIRST_NAMEs, :BENEFICIARY_LAST_NAMEs, :BENEFICIARY_DOBs, :HICNUMs, :CCNs, " +
":CLAIM_RECEIPT_DTs, :ADMISSION_DTs, :BILL_TYPEs, :LANGUAGE_IDs, :CONTRACTOR_IDs, :PRIORITY_IDs, " +
":UNIVERSE_DTs, :REQUEST_DTs, :BENEFICIARY_M_INITIALs, :ATTENDING_PROVIDER_NUMBERs, " +
":BILLING_NPIs, :BENE_ZIP_CODEs, :DRGs, :FINAL_ALLOWED_AMTs, :STUDY_IDs, :REFERRING_NPIs) " +
" RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs";
int[] REQUEST_IDs = new int[range];
cmd.Parameters.Add(":REQUEST_IDs", OracleDbType.Int32, REQUEST_IDs, System.Data.ParameterDirection.Output);
However, when I run this query, it gives me a strange error ORA-00925: missing INTO keyword. I am not sure what that error means since I am not missing any INTOs
Please help me resolve this error or I would appreciate a different solution
Thank youIt seems you are not doing a bulk insert but rather an array bind.
(Which you will also find that it is problematic to do an INSERT with a bulk collect returning clause (while this works just fine for update/deletes) :
http://www.oracle-developer.net/display.php?id=413)
But you are using array bind, so you simply just need to use a
... Returning REQUEST_ID INTO :REQUEST_IDand that'll return you a Rquest_ID[]
see below for a working example (I used a procedure but the result is the same)
//Create Table Zzztab(Deptno Number, Deptname Varchar2(50) , Loc Varchar2(50) , State Varchar2(2) , Idno Number(10)) ;
//create sequence zzzseq ;
//CREATE OR REPLACE PROCEDURE ZZZ( P_DEPTNO IN ZZZTAB.DEPTNO%TYPE,
// P_DEPTNAME IN ZZZTAB.DEPTNAME%TYPE,
// P_LOC IN ZZZTAB.LOC%TYPE,
// P_State In Zzztab.State%Type ,
// p_idno out zzztab.idno%type
// IS
//Begin
// Insert Into Zzztab (Deptno, Deptname, Loc, State , Idno)
// Values (P_Deptno, P_Deptname, P_Loc, P_State, Zzzseq.Nextval)
// returning idno into p_idno;
//END ZZZ;
//Drop Procedure Zzz ;
//Drop Sequence Zzzseq ;
//drop Table Zzztab;
class ArrayBind
static void Main(string[] args)
// Connect
string connectStr = GetConnectionString();
// Setup the Tables for sample
Setup(connectStr);
// Initialize array of data
int[] myArrayDeptNo = new int[3]{1, 2, 3};
String[] myArrayDeptName = {"Dev", "QA", "Facility"};
String[] myArrayDeptLoc = {"New York", "Chicago", "Texas"};
String[] state = {"NY","IL","TX"} ;
OracleConnection connection = new OracleConnection(connectStr);
OracleCommand command = new OracleCommand (
"zzz", connection);
command.CommandType = CommandType.StoredProcedure;
// Set the Array Size to 3. This applied to all the parameter in
// associated with this command
command.ArrayBindCount = 3;
command.BindByName = true;
// deptno parameter
OracleParameter deptNoParam = new OracleParameter("p_deptno",OracleDbType.Int32);
deptNoParam.Direction = ParameterDirection.Input;
deptNoParam.Value = myArrayDeptNo;
command.Parameters.Add(deptNoParam);
// deptname parameter
OracleParameter deptNameParam = new OracleParameter("p_deptname", OracleDbType.Varchar2);
deptNameParam.Direction = ParameterDirection.Input;
deptNameParam.Value = myArrayDeptName;
command.Parameters.Add(deptNameParam);
// loc parameter
OracleParameter deptLocParam = new OracleParameter("p_loc", OracleDbType.Varchar2);
deptLocParam.Direction = ParameterDirection.Input;
deptLocParam.Value = myArrayDeptLoc;
command.Parameters.Add(deptLocParam);
//P_STATE -- -ARRAY
OracleParameter stateParam = new OracleParameter("P_STATE", OracleDbType.Varchar2);
stateParam.Direction = ParameterDirection.Input;
stateParam.Value = state;
command.Parameters.Add(stateParam);
//idParam-- ARRAY
OracleParameter idParam = new OracleParameter("p_idno", OracleDbType.Int64 );
idParam.Direction = ParameterDirection.Output ;
idParam.OracleDbTypeEx = OracleDbType.Int64;
command.Parameters.Add(idParam);
try
connection.Open();
command.ExecuteNonQuery ();
Console.WriteLine("{0} Rows Inserted", command.ArrayBindCount);
//now cycle through the output param array
foreach (Int64 i in (Int64[])idParam.Value)
Console.WriteLine(i);
catch (Exception e)
Console.WriteLine("Execution Failed:" + e.Message);
finally
// connection, command used server side resource, dispose them
// asap to conserve resource
connection.Close();
command.Dispose();
connection.Dispose();
Console.WriteLine("Press Enter to finish");
Console.ReadKey();
} -
NEED HELP EMBEDING FONT INTO MYSITE
I have finish mysite and need to know how to embed my font. I know about going to the library and clicking new font then going to linkage, but I dont know the action script to put into my actions panel. CAN ANYBODY HELP PLEASE. My font name is 1979
Thx. With the text.Format script do I have to call each size of that font if i use it, say 9pt and 7pt? Thanks
Maybe you are looking for
-
WRK54G dies every 3 days. Why, and even more important, can I prevent it?
I have a WRK54G wireless router, and every three days exactly it doesn't work anymore. The lights are still on, but no one's home I can't even ping it, it times out, and the only solution is to unplug it, wait 2 or 3 minutes, plug it back in, and let
-
How can i find a library that is on the same network as me so I can share?
There are multiple people on the network that share iTunes libraries, but the certain one I'm looking for is not showing up. Is there anyway for me to search for this specific library? I am using the most recent version of iTunes.
-
I have been having a problem with an installation of Reader. The pop up window for printing options is showing up with no text on the buttons. Someone advised me to check 'preferences' but that window is also blank [no text] so I cannot adjust anythi
-
How do i cut parts of my video on imovie HD?
Hi, I cant cut out a part of my film on imovie HD, I already tried cntrl T.. what should i do
-
[SOLVED] update error, python2-zope-interface
Hi! I encountered the following error when I wanted to update my system today. What should I do? [martin@faye ~]$ pacman -Syu :: Synchronizing package databases... core is up to date extra is up to date community is up to date multilib is up to date