Read and Write files to data base throught Oracle Forms 6i
Hello, please help me!
How to attach or insert file into DB throught Oracle Forms and later open it ?
Is there any possibilities to do that?
Would be very appresiative!
Solveiga
Sorry forgot to add, Below is the code
BEGIN
A:=:EXP.D_DIR||'\'||'ACTIVITYS.TXT';
hFile := Text_IO.Fopen(A, 'w');
iCount := 1;
OPEN cData;
LOOP
FETCH cData
INTO F1;
EXIT WHEN cData%NOTFOUND;
IF iCount <> 1 THEN
Text_IO.New_Line(hFile, 1);
END IF;
Text_IO.Put(hFile, F1 );
SYNCHRONIZE;
message(to_char(iCount)||' Of '||TO_CHAR(:B1.CCOUNT),no_Acknowledge);
set_item_property('spin.pro',width,2*round((iCount*100)/NVL(:B1.CCOUNT,1)));
iCount := iCount + 1;
END LOOP;
CLOSE cData;
Text_IO.Fclose (hFile);
END;
Similar Messages
-
Read and write excel sheet data from uploded file in sharepoint site programmatically 2013
hi team,
I am working on sharepoint 2013.I want to read and write data in excel sheet (micrsoft excel) from stored file in shrepoint docoumnt library .please suggest me
vijayHi
Vijay,
check those links
http://www.sharepointwithattitude.com/archives/61
https://social.technet.microsoft.com/Forums/en-US/e760051b-a92f-473c-9ec9-0f0c36c99e40/read-and-write-excel-sheet-data-from-uploded-file-in-sharepoint-site-programmatically-2013?forum=sharepointdevelopment
Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation. Please remember to mark the reply as answer if it helps. -
What do I need to do to be able to read and write files to a Seagate Backup Plus Slim Portable Drive on BOTH a Mac and a PC? I downloaded "Paragon NTFS for Mac" onto my Mac, so now I can write to the drive, but when I plug it into a PC it won't work.
If the HDD is formatted NTFS, then it suggests that there is a problem with the PC. Check with the manufacturer.
Ciao. -
i am using IE as brower,. how do i change the properties so that i can let an applet to read and write files on my system? thank you, for help.
DON'T POST MULTIPLE TIMES!
Proper English:
I am using Internet Explorer as my web browser. How do I change the properties so that an applet can read and write files to my local system? Thanks for any help.
Answer) Search on Java and security in the forum search or google. This topic is covered numerous times.
DeltaCoder -
Open sybase data base in oracle form
How can I Open sybase data base in oracle form ?
Its not possible to do it directly but you can do it by installing a Transparent Gateway in your Oracle database. You would then connect to the Oracle database and it would route the table references to the Sybase DB with the help of the gateway. You wouldn't be able to utilize all the functionality of the Sybase DB, only the ones exposed by the gateway.
-
Hi
please help me
How to read and write data from file in j2mehello, u are looking to write some persistant data to a file on the mobile phone? Its the next step for me aswell. You can use the recordset function.
I'm looking at this site: http://www-128.ibm.com/developerworks/library/wi-rms/
It seems every time you use the function you must use try catch blocks. I hope this is what you are looking for. -
How to burn read and write files on DVD
I would like to know how to burn DVDs (image files) with the Read and Write setting. I have changed the settings in Get Info for the image files to Read and Write for Owner, Group and Others and yet when I burn the DVD and try and copy the files back onto the hard drive (to test if it works or not) it won't allow me. When I check the Get Info it says Read and Write for owner (greyed out) and Read Only for Group and Others (greyed out too).
I have also tried to change the status of the blank DVD before adding files and after adding the files (but b4 the burn) to Read and Write, this works but then during the burn process the DVD or burner changes my settings to Read Only.
I am burning with Finder and have tried with Toast 10 Titanium. What am I doing wrong, or not doing at all?! I'm going loopy with frustration!Kiraly, I agree that the actual problem here might be something else, but as a side issue there seems to be a difference in the way permissions are handled when a file copy is made using Finder compared to when the copy is made using the cp copy in Terminal. At least in my Tiger system, Finder preserved the permission structure, though not the ownership, when it copied a file, whereas cp used the OS defaults.
I tried the following experiment:
From my test user account "t", I created a textfile named ReadWrite.txt, and gave it Read+Write permissions for Owner, Group, and Others. I then burned it using Finder to a DVD which I named PermissionTest, and then unchecked the "Ignore Ownership" box on PermissionTest.
The original ownership and permissions were preserved on the DVD, though of course you couldn't actually write to anything there:
xxG5-Computer:~ t$ ls -l /Volumes/PermissionTest/ReadWrite.txt
-rw-rw-rw- 1 t t 15 Sep 13 18:25 /Volumes/PermissionTest/ReadWrite.txt
I then copied the file from the DVD to the Desktop using Finder, and the permissions were preserved!
Finder copy:
xxG5-Computer:~ t$ ls -l /Users/t/Desktop/ReadWrite.txt
-rw-rw-rw- 1 t t 15 Sep 13 18:25 /Users/t/Desktop/ReadWrite.txt
I then trashed the Finder copy of ReadWrite,txt on the desktop, and made a second copy from the DVD, but this time I used the cp command from Terminal instead of using Finder. This time the permissions were not preserved, but reverted to the OS default:
cp copy:
xxG5-Computer:~ t$ cp /Volumes/PermissionTest/ReadWrite.txt Desktop
xxG5-Computer:~ t$ ls -l /Users/t/Desktop/ReadWrite.txt
-rw-r--r-- 1 t t 15 Sep 13 19:43 /Users/t/Desktop/ReadWrite.txt
I then switched to a different user account "t1", and repeated the above with the same DVD, first copying the ReadWrite.txt file to the desktop using Finder, and then using cp. The ownership of the copied file changed from t to t1 in both cases, but the permission structure again was preserved in the Finder copy but not in the cp copy:
DVD file:
xxG5-Computer:~ t1$ ls -l /Volumes/PermissionTest/ReadWrite.txt
-rw-rw-rw- 1 t t 15 Sep 13 18:25 /Volumes/PermissionTest/ReadWrite.txt
Finder copy:
xxG5-Computer:~ t1$ ls -l /Users/t1/Desktop/ReadWrite.txt
-rw-rw-rw- 1 t1 t1 15 Sep 13 18:25 /Users/t1/Desktop/ReadWrite.txt
cp copy:
xxG5-Computer:~ t1$ cp /Volumes/PermissionTest/ReadWrite.txt Desktop
xxG5-Computer:~ t1$ ls -l /Users/t1/Desktop/ReadWrite.txt
-rw-r--r-- 1 t1 t1 15 Sep 13 19:51 /Users/t1/Desktop/ReadWrite.txt
I got similar results when I tried copying a file with Read+Write permissions for all from a USB flash drive to the Desktop, again with the "Ignore Ownership" box unchecked. -
Read and Write Files to user from Forms Server
We are developing an application that requires us to rread and write files to the user system. We are deploying using the developer/forms server and this is not happenning. The text_io package and the d2wkutil operate on the application server system, not the user system. So is there a method to read the file contents into the app and write files out to the user system across the web. Thanks.
developer6 can interact with javabeans. the javabean runs as an applet on the client machine. all you have to do is setup a javabean that read and write to your client machine.
when you test your application, work with java console open so you'll be able to debug your appliacion, if you'll receive java security execption you may need to sign this javabean. look at sun site for info regarding the usage of javakey for signing java classes and jars. -
Read and write a item's value in running Form.
Hi everybody,
Could you help me?
I have a table name QUANTITY(store in Oracle database server), this table have 2 filed: Model name and Quantity
I created a oracle form(Store in oracle application server) to show Quantity. I running this form in a client.
Now i want read and write QUANTITY of one Model to text file in client. It is difficult to me!
Please help me,Try something like this...
PROCEDURE load_data IS
outFile CLIENT_TEXT_IO.FILE_TYPE;
linebuf varchar2(1000);
X1 VARCHAR2(20) := ' ';
X2 VARCHAR2(15);
File_Not_Found EXCEPTION;
cursor c1 is
select col1, col2 from QUANTITY;
BEGIN
outFile := CLIENT_TEXT_IO.FOPEN('c:\tmp\Outputfile.txt','w');
if CLIENT_TEXT_IO.IS_OPEN(outFile) then
open c1;
LOOP
FETCH C1 INTO c1_rec;
EXIT WHEN C1%NOTFOUND;
X1 := c1_rec.col1;
x7 := c1_rec.col2;
linebuf := X1|| ' ' ||X2;
CLIENT_TEXT_IO.put(outFile,linebuf);
CLIENT_TEXT_IO.NEW_LINE(outfile);
END LOOP;
close c1;
end if;
CLIENT_TEXT_IO.FCLOSE(outfile);
END;Hope this helps,
Charan
Edited by: Charan on Oct 2, 2011 4:09 PM -
Application to Read and Write the Configuration Data from a xml file
Hi,
I have to develop a Webdynpro application that will do the following:
Read the Configuration data from an xml file
If stored in a file , and the file is not found, prompt the user to provide the file location.
Pre-Populate the screen(table) with the configuration data
Allow the user to edit the data
Store the configuration data when the user hits the Save button
The config xml file details are as follows:
Regardless of the location of the configuration data, the following fields will be stored
Application (string) will always contain u201CSFA_EDOCSu201D
Key (string) eg LDAP_USER, DB_PREFIX, etc.
Type (character) u201CPu201D = Plain Text, u201CEu201D = Encrypted
Value (string)
Since I am new to WD, I would require help on this.
Please help.Its Urgent.
Regards,
Vaishali.
Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AMHi,
I have to develop a Webdynpro application that will do the following:
Read the Configuration data from an xml file
If stored in a file , and the file is not found, prompt the user to provide the file location.
Pre-Populate the screen(table) with the configuration data
Allow the user to edit the data
Store the configuration data when the user hits the Save button
The config xml file details are as follows:
Regardless of the location of the configuration data, the following fields will be stored
Application (string) will always contain u201CSFA_EDOCSu201D
Key (string) eg LDAP_USER, DB_PREFIX, etc.
Type (character) u201CPu201D = Plain Text, u201CEu201D = Encrypted
Value (string)
Since I am new to WD, I would require help on this.
Please help.Its Urgent.
Regards,
Vaishali.
Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AM -
How do I read and write files on a mac?
On my windows it's easy, but when I try to write files and read them
on a Mac the filepath is always wrong. I want to write to my
"Documents" folder, and when I do /Documents/Hello.txt as a filepath
it gets it wrong. I don't know why it won't work because I'm not too familiar
with macs yet. Any help with the filepath problem?Your Documents folder is not /Documents. It's /Users/your_user_name/Documents
-
How to read and write files using flex?
Using flex, we would like to make some utility that will do a
lot of reading and writing from local files.
The writing is what I am more worried about. How is this
possible?
I want to make .zip files containing many xml files, and some
assorted media files such as .swf jpeg, html, etc.
I am new to flex btw, I've never used it properly before, and
this is the main concern I have with flex, which is that it doesn't
let me write and read lots of files.
Mainly we are looking for a good cross platform solution that
will let us develop an app, and flex looks professional and it is
cross platform. The "internet app" side of things, isn't so much
what we need really.
Would wxWidgets be better suited to our needs?The Flash player sand box will not allow reading and writing
local files. If you want to use Flex to create a desktop you will
need the Apollo runtime. The alpha is available at Adobe
Labs. -
Problem to read and write files on hdd out of html with an Applet ????
hi there,
i wrote an applet for loading a file from HDD or saving data out of a cookie in a file on a hdd.
when i compile the class there are warnings about "unchecked method invocation" and "unchecked conversion".
what did i do wrong?
i think it's about this function:
AccessController.doPrivileged(new PrivilegedAction()
public Object run()
if(saveCartAtOnce.toLowerCase().compareTo("true")== 0)
SaveShoppingCart();
}//if
return null;
}// public Object run
});//AccessController
could anyone help me?
i could also send the whole class then....
thanks a lot.
greetings
Volker Becht
[email protected]OK
now i will post the whole class.
my questen is: what have i to do so that anything runs?
if anyone will need a file example which should be read
into the calss i will email it.
package de.CATALOGcreator.shoppingcart;
import java.awt.*;
import java.io.*;
import java.applet.*;
import java.util.*;
import java.security.*;
import netscape.javascript.*;
public class shoppingcart extends java.applet.Applet
private static final long serialVersionUID = 1234567890L;
//Explanation of the possible Parameters of the applet, all of the following
//parameters need not be given explicitely, because they have default values.
String errorMessageInvalidFileFormat = ""; //set the ErrorMessage String for InvalidFileFormat when loading
String openDialogTitle = ""; //set the Open Dialog Title
String saveDialogTitle = ""; //set the Save Dialog Title
String articleNumberString = ""; //set the ArticleNumber of the CSV headline
String articleNameString = ""; //set the ArticleName of the CSV headline
String amountString = ""; //set the AmountName of the CSV headline
String priceString = ""; //set the PriceName of the CSV headline
String delimiterString =""; //set the Delimiter for the Output-csv
String inputdelimiterString =""; //set the Delimiter for the Intput-csv
//No parameter, this String is built from articleNumberString, articleNameString, amountString and
//priceString and delimiterString in the following manner:
//headline = articleNumberString + delimiterString + articleNameString + delimiterString + amountString+ delimiterString + priceString;
//see: init();
String headline = ""; //set the Headline of the csv-file
//Another parameter is saveCartAtOnce, which says, if the save-Dialog is schown
//at once when the applet is initialized. If the value is "true", the dialog shows
//at once, in all other cases (also if parameter does not exist) you have to
//call SaveShoppingCart explicitely.
String saveCartAtOnce;
public void init()
try
//set the default setting for the Paramters
openDialogTitle = this.getParam("openDialogTitle", "Open Shopping Cart");
saveDialogTitle = this.getParam("saveDialogTitle", "Save File As");
errorMessageInvalidFileFormat = this.getParam("errorMessageInvalidFileFormat", "Invalid File Format!\nLoading stopped.");
delimiterString = this.getParam("delimiterString", "||");
inputdelimiterString= this.getParam("inputdelimiterString", ",");
articleNumberString = this.getParam("articleNumberString", "Article Number");
articleNameString = this.getParam("articleNameString", "Article");
amountString = this.getParam("amountString", "Amount");
priceString = this.getParam("priceString", "Price");
headline = articleNumberString + delimiterString + articleNameString + delimiterString + amountString + delimiterString + priceString;
saveCartAtOnce = this.getParameter("saveCartAtOnce");
AccessController.doPrivileged(new PrivilegedAction()
public Object run()
if(saveCartAtOnce.toLowerCase().compareTo("true")== 0)
SaveShoppingCart();
//LoadShoppingCart();
}//if
return null;
}// public Object run
});//AccessController
catch(Exception e)
e.printStackTrace();
}//void init
public void SaveShoppingCart()
DataOutputStream dos;
String myFile;
File f ;
myFile = SaveDialog();
if(myFile!=null)
f = new File(myFile);
String Artikel=getParameter("Artikel");
String Anzahl=getParameter("MyAnzahl");
String Bezeichnung=getParameter("Bezeichnung");
String Preis=getParameter("Preis");
StringTokenizer stArticle = new StringTokenizer(Artikel, inputdelimiterString);
StringTokenizer stAnzahl = new StringTokenizer(Anzahl, inputdelimiterString);
StringTokenizer stBezeichnung = new StringTokenizer(Bezeichnung, inputdelimiterString);
StringTokenizer stPreis = new StringTokenizer(Preis, inputdelimiterString);
JSObject.getWindow(this).eval("alert('"+ Artikel +"')");
try
dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(myFile),128));
// Line 1
dos.writeChars(headline + "\n");
while (stArticle.hasMoreTokens())
String tmpArticle=stArticle.nextToken();
String tmpAnzahl=stAnzahl.nextToken();
String tmpBezeichnung=stBezeichnung.nextToken();
String tmpPreis=stPreis.nextToken();
dos.writeChars(tmpArticle + delimiterString + tmpBezeichnung + delimiterString +tmpPreis + delimiterString + tmpAnzahl + "\n");
}//while
dos.flush();
System.out.println("Successfully wrote to the file named " + myFile + " -- go take a look at it!");
dos.close();
}//try
catch (SecurityException e)
System.out.println("JavaSoft SaveShoppingCart: SecurityException\nMessage:" + e.getMessage() + "\nStackTrace:");
e.printStackTrace(System.out);
}//catch
catch (IOException ioe)
System.out.println("JavaSoft SaveShoppingCart: IOexception\nMessage:" + ioe.getMessage() + "\nStackTrace:");
ioe.printStackTrace(System.out);
}//catch
}//if
}//void SaveShoppingCart
private String SaveDialog()
try
//Date now = new Date(System.currentTimeMillis());
Calendar rightNow = Calendar.getInstance();
//SystemDate
//String strDay = Integer.toString(now.getDate());
String strDay = Integer.toString(rightNow.get(Calendar.DAY_OF_MONTH));
//String strMonth = Integer.toString(now.getMonth()+1);
String strMonth = Integer.toString(rightNow.get(Calendar.MONTH));
//String strYear = Integer.toString(now.getYear()+1900);
String strYear = Integer.toString(rightNow.get(Calendar.YEAR));
//SystemTime
//String strHoure = Integer.toString(now.getHours());
String strHoure = Integer.toString(rightNow.get(Calendar.HOUR));
//String strMinutes = Integer.toString(now.getMinutes());
String strMinutes = Integer.toString(rightNow.get(Calendar.MINUTE));
//String strSeconds = Integer.toString(now.getSeconds());
String strSeconds = Integer.toString(rightNow.get(Calendar.SECOND));
//set SystemDate+SystemTime
String strDate=strDay+"_"+strMonth+"_"+strYear+"_"+strHoure+"_"+strMinutes+"_"+strSeconds;
//set SaveName as *.csv
String SaveAs = strDate + ".csv";
FileDialog fd = new FileDialog (new Frame(), "Save File As", FileDialog.SAVE);
fd.setFile(SaveAs);
fd.setVisible(true);
//Value Save or Cancel Button
if((fd.getDirectory() == null) || (fd.getFile() == null)) // user pressed the cancel - button
return null;
}//if
else // user pressed save - button
return fd.getDirectory() + fd.getFile();
}//else
}//try
catch (SecurityException e)
System.out.println("JavaSoft String SaveDialog: SecurityException\nMessage:" + e.getMessage() + "\nStackTrace:");
e.printStackTrace(System.out);
return null;
}//catch
}// String SaveDialog
public String OpenDialog()
FileDialog fd = new FileDialog (new Frame(), openDialogTitle, FileDialog.LOAD);
fd.setVisible(true);
return fd.getDirectory() + fd.getFile();
}//String OpenDialog
private String getParam( String paramName, String defaultValue )
String value = getParameter( paramName );
if ( value != null )
return value;
}//if
return defaultValue;
}//String getParam
public void LoadShoppingCart()
String myFile;
File f ;
myFile = OpenDialog();
if(myFile!=null)
f = new File(myFile);
String rl = "";
Object[] Obj = new Object[2];
try
DataInputStream dis = new DataInputStream(new BufferedInputStream(new FileInputStream(myFile),128));
// Line 1
String FirstLine = myReadLine(dis);
JSObject.getWindow(this).eval("alert('"+ FirstLine +"')");
if(FirstLine.startsWith(headline))
while ( (rl = myReadLine(dis)) != null)
//examines correct delimiter
StringTokenizer token = new StringTokenizer (rl, delimiterString);
if(token.countTokens()!= 4)
dis.close();
JSObject.getWindow(this).eval("alert('"+ errorMessageInvalidFileFormat +"')");
}//if
Obj[0]= (Object)rl;
Obj[1]= (Object)delimiterString;
JSObject.getWindow(this).call("addCSVArticle",Obj); // this=applet
}//while
JSObject.getWindow(this).call("importFinished",null);
else
dis.close();
JSObject.getWindow(this).eval("alert('"+ errorMessageInvalidFileFormat +"')");
//System.exit(-1);
}//else
dis.close();
}//try
catch (SecurityException e)
System.out.println("JavaSoft LoadShoppingCart: SecurityException\nMessage:" + e.getMessage() + "\nStackTrace:");
e.printStackTrace(System.out);
}//catch
catch (IOException ioe)
System.out.println("JavaSoft LoadShoppingCart: IOexception\nMessage:" + ioe.getMessage() + "\nStackTrace:");
ioe.printStackTrace(System.out);
}//catch
catch(Exception exc)
System.out.println("JavaSoft LoadShoppingCart: Exception\nMessage:" + exc.getMessage() + "\nStackTrace:");
exc.printStackTrace(System.out);
}//catch
}//if
}//void LoadShoppingCart
private String myReadLine(DataInputStream dis)
char tmp;
String line = "";
try
while((tmp = dis.readChar())!= '\n')
line += tmp;
return line;
}//try
catch(IOException ioexc)
return null;
}//catch
}//String myReadLine
public boolean isInitialized()
return true;
}//public class ShoppingCart extends java.applet.Applet[/i] -
Read and Write files in Windows Vista
Im trying to make an AIR application that reads a file from
the users document directory and then try to save it again when
user have made the changes. It works fine on my mac, but when i try
it on windows vista im getting the error code #3003 "File or
directory doesnt exist", but it really DO exist. What am i doing
wrong.. is there some security issues that i have missed? i have
tryed with applicationStorageDirectory aswell and
applicationDirectory, but nothing works. Very greatful for some
advice on what im doing wrong.
/Andreas
_sellerFile = File.documentsDirectory ;
_sellerFile =
_sellerFile.resolvePath("faktura/data/seller.xml");
var stream = new FileStream();
try
stream.open(_sellerFile , FileMode.READ);
var xml = XML(stream.readUTFBytes(stream.bytesAvailable));
stream.close();
seller = XMLParser.parseSeller(xml, this);
displaySeller();
catch(e:Error)
errorMessage("Varning!", e.getStackTrace() + ", url: " +
_sellerFile.url + ", path: " + _sellerFile.nativePath, "show");Are you seeing any issues when you open the file in a text
editor? May be it is worth to take a look at permissions for the
file for your vista user and the ownership of the file (properties
-> Security). According to the documentation FileStream.open
will throw error if there is no read permission on the file. Hope
it's a physical file and not a link to any virtual store location.
In the worst case, rename the existing file, manually create a text
file and copy contents from original file to the new one and try.
Good luck :) -
Help with how to read and write files to the applets server
I am writing a form that requires some data to be written serverside(not on the host machine) and I also need to be able to read from those same files.
Can anyone provide any help?
I looked into signing but it seems, to me, that signing is for when you are going to be modifying files on the host...brianb7590 wrote:
Would I use that to refer to the file like I would with a regular application?Nope. It's pretty complicated. You've got to set something up on the server to accept requests, get all the data and then save files somewhere and on the client side you've got to make the connection and send the data.
Edited by: tjacobs01 on Apr 13, 2009 5:49 PM
Maybe you are looking for
-
How do I find the setup for mailing labels on Pages
I cannot find the place on Pages to set up labels. I use Avery labels and there is no icon once I go to Pages for setting up labels. Thanks
-
Problem during creation of equipment
dear sap gurus, I m facing the problem creating equipment.when i creating equiment the pop message shows as "Customer-specific check determined that the update is not permitted' plz how it can be rectified Rakesh mane
-
24" imac goes into sleep mode and lights on circuit flicker
Hi - I have a 24" imac and have found that when the display goes into sleep mode the lights on the circuit flicker. I have searched the web and other users have complained of the same issue with no resolution. Here is a similiar post - https:
-
When I connect my iPod Touch to my computer it does not show up in Itune on the left side and I do not see on the bar "picture", it allways did before.
-
"Show All Syntax Errors" flag doesn't work
Hi, We migrating some of the custom development to our new system. We noticed, that even there are several missing dictionary reference object and the "Show All Syntax Errors" is set in the settings, it shows only the first error. I'd expect to show