Using a CLOB in Forms 6.0
I'm looking for information about the default functionality of Forms 6.0 when working with CLOB's. I have a table with one CLOB column (note field). I'm having some difficulty displaying existing data in a CLOB column. I am also having difficulty inserting and updating records from a form.
All existing records were first inserted using empty_clob(), and if the record was not updated then the form displays "##########".
How do I prevent this? How do I check from the form if there is anythting in the CLOB column other than the locator? Where do I put this code?
Were do you put the code for inserting and updating a record that has a clob column? It does not work directly in the form. I found information on the DBMS_LOB package does a procedure need to be used? On client or database. I was not able to use the dbms_lob package in form and database triggers.
Our users don't want to do anything but store and view the text in the clob.
Help please.
Thanks
Dave
null
Unless I and my development team are very much mistaken, we do not yet see ANY real, direct support for CLOB (or other LOB) datatypes in Designer/Developer Forms 6.0 or 6i.
We would like to be able to store & maintain large text stores (like form letters, etc.) in our database, and we do not want to use LONGs. As our dev. platform is exclusively Forms based, we have been forced to live within the Forms' CHAR(2000) datatype constraint limit in designing our targeted 8i db...
As the team's data architect, this seems absolutely ludicrous to me, but (given the fact we can only use Forms for the front-end), what other choice do we have???
I'd greatly appreciate hearing back from anyone in Oracle support or elsewhere who could categorically confirm or deny this de-facto constraint, and (if the latter), explain how CLOB manipulation / editing can be supported via either Forms 6.0 or 6i.
Thanks in advance.
- Paul Van Sickle
null
Similar Messages
-
What control i can use for Clob datatype in forms?
Hi,
Backend side
I had created a table that having a column namely sql_text which hold the query string and defined as CLOB data type.
On Form 6i
Just i created a textitem(long) for the clob datatype field
but it only hold very limited length of charter, i want to be more. Any other control is there?
please guid me what should i want to do.
kanishThere is limited support for CLOBs in Forms. I guess you could read it in piecemeal with a procedure using the DBMS_LOB package
-
How to use LDAP with Oracle forms 10g on Oracle application server
Hi,
I need some help on this. I have developed oracle forms 10g on application server 9iAS. The client want to use the existing LDAP authentication to the software we wrote. I do not know how I could configure to use the existing LDAP authentication . If anyone know how would I use the existing LDAP on different server to use when they logon to our menu in 10g to validate the user. Do I need to add any varibales in formweb.cfg or any other method. Please help.
Thanks
LukshI am not quite sure if this works out of the box. According to an Oracle FAQ:
4.2 Can I use LDAP to authenticate Forms Services?
Not directly. However, Oracle Login Server is able to authenticate against a LDAP directory and thus a Forms application can take advantage of this in a SSO environment. But you cannot use access control information stored in a LDAP directory with Forms. -
I use pages to draft forms that i repeatedly edit and use in my business. Ex: letterhead, envelopes, and legal forms. I recently drafted a legal form
for a client. saved it and then reopened and printed the next day. now when i try to open that form, ( or letterhead or envelope) i get a message that
it wont open and that i need a newer version of pages. but my pages software is up to date. Whats up with this??You have 2 versions of Pages on your Mac.
Pages 5 is in your Applications folder.
Pages '09/'08 is in your Applications/iWork folder.
You are alternately opening the wrong versions.
Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
Anything that is saved to iCloud is also converted to Pages 5 files.
All Pages files no matter what version and incompatibility have the same extension .pages.
Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
Note: Apple has removed over 100 features from Pages 5 and added many bugs:
http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
Peter -
Hi,
I need to extract data from a given piece of XML. If I pass the xml to the procedure as clob and query it in a loop, it returns no rows. However if I include the actuall xml in the loop query it returns the data I'm looking for. Why doesn't it return data when using the clob?
1. Example code below works with xml included in the loop query:
BEGIN
FOR x IN ( SELECT x.*
FROM XMLTABLE (
xmlnamespaces (
'http://schemas.xmlsoap.org/soap/envelope' AS "x",
'http://www.w3.org/2001/XMLSchema-instance' AS "xsi"),
PASSING xmltype (
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<loadServiceListResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<loadServiceListReturn href="#id0"/>
</loadServiceListResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ExternalSystemOutput" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="java:ExternalSystemOutput.TestIPA.nhsia.nhs">
<standardOutput href="#id1"/>
<systemData soapenc:arrayType="ns2:ExternalSystemData[2]" xsi:type="soapenc:Array" xmlns:ns2="java:ExternalSystemData.TestIPA.nhsia.nhs">
<systemData href="#id2"/>
<systemData href="#id3"/>
</systemData>
</multiRef>
<multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:ExternalSystemData" xmlns:ns3="java:ExternalSystemData.TestIPA.nhsia.nhs" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<description xsi:type="soapenc:string">Prescription</description>
<url xsi:type="soapenc:string">http://192.168.21.131:8080/nhsia/TestIPA/validate.jsp?sdwlhqw@5)vhuylfh@Suhvfulswlrq33509</url>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:StandardOutput" xmlns:ns4="java:StandardOutput.TestIPA.nhsia.nhs" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<auditID xsi:type="soapenc:string"/>
<statusID xsi:type="soapenc:string">0</statusID>
<systemAvailability xsi:type="soapenc:string">Available</systemAvailability>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:ExternalSystemData" xmlns:ns5="java:ExternalSystemData.TestIPA.nhsia.nhs" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<description xsi:type="soapenc:string">Appointment</description>
<url xsi:type="soapenc:string">http://192.168.21.131:8080/nhsia/TestIPA/validate.jsp?vgzoktzC8,ykx|oikCGvvuotzsktz61409</url>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>').
EXTRACT (
'//multiRef',
'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
COLUMNS description VARCHAR2 (30) PATH 'description',
url VARCHAR2 (250) PATH 'url') x)
LOOP
DBMS_OUTPUT.PUT_LINE('Rec: '||x.description||' '||x.url);
END LOOP;
END;
/Returns:
Rec:
Rec: Prescription http://192.168.21.131:8080/nhsia/TestIPA/validate.jsp?sdwlhqw@5)vhuylfh@Suhvfulswlrq33509
Rec:
Rec: Appointment http://192.168.21.131:8080/nhsia/TestIPA/validate.jsp?vgzoktzC8,ykx|oikCGvvuotzsktz614092. If I assign the XML to CLOB variable and reference the clob variable in loop query it returns no data:
DECLARE
resp CLOB :=
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<loadServiceListResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<loadServiceListReturn href="#id0"/>
</loadServiceListResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:ExternalSystemOutput" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="java:ExternalSystemOutput.TestIPA.nhsia.nhs">
<standardOutput href="#id1"/>
<systemData soapenc:arrayType="ns2:ExternalSystemData[2]" xsi:type="soapenc:Array" xmlns:ns2="java:ExternalSystemData.TestIPA.nhsia.nhs">
<systemData href="#id2"/>
<systemData href="#id3"/>
</systemData>
</multiRef>
<multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:ExternalSystemData" xmlns:ns3="java:ExternalSystemData.TestIPA.nhsia.nhs" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<description xsi:type="soapenc:string">Prescription</description>
<url xsi:type="soapenc:string">http://192.168.21.131:8080/nhsia/TestIPA/validate.jsp?sdwlhqw@5)vhuylfh@Suhvfulswlrq33509</url>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:StandardOutput" xmlns:ns4="java:StandardOutput.TestIPA.nhsia.nhs" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<auditID xsi:type="soapenc:string"/>
<statusID xsi:type="soapenc:string">0</statusID>
<systemAvailability xsi:type="soapenc:string">Available</systemAvailability>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:ExternalSystemData" xmlns:ns5="java:ExternalSystemData.TestIPA.nhsia.nhs" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<description xsi:type="soapenc:string">Appointment</description>
<url xsi:type="soapenc:string">http://192.168.21.131:8080/nhsia/TestIPA/validate.jsp?vgzoktzC8,ykx|oikCGvvuotzsktz61409</url>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>';
BEGIN
FOR x IN ( SELECT x.*
FROM XMLTABLE (
xmlnamespaces (
'http://schemas.xmlsoap.org/soap/envelope' AS "x",
'http://www.w3.org/2001/XMLSchema-instance' AS "xsi"),
PASSING xmltype (resp).
EXTRACT (
'//multiRef',
'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"')
COLUMNS description VARCHAR2 (30) PATH 'description',
url VARCHAR2 (250) PATH 'url') x)
LOOP
DBMS_OUTPUT.PUT_LINE('Rec: '||x.description||' '||x.url);
END LOOP;
END;
/I would appreciate any help this one.
Cheers,
Andy.Why do you have 4 rows? I don't understand why you have two rows for 100 bottles?
Building on Odie's answer and my example plus adding in the needed outer join we have, using Oracle's outer join syntax of (+)
SQL> with my_sample_table as (
2 select xmltype('<?xml version="1.0" encoding="UTF-8" ?>
3 <request>
4 <identification>
5 <requestid>12345</requestid>
6 <periodunit>DAY</periodunit>
7 <days>MONDAY</days>
8 </identification>
9 <product>
10 <productname>ABC PRODUCT</productname>
11 <brand>
12 <brandname>CELL</brandname>
13 <ndccode>A58048</ndccode>
14 <ndccode>A49210</ndccode>
15 </brand>
16 </product>
17 <product>
18 <productname>100 bottles</productname>
19 </product>
20 </request>') xmldoc
21 from dual
22 )
23 select x.*, y.*
24 from my_sample_table t
25 , xmltable(
26 'let $e := $d/request/identification
27 for $i in $d/request/product
28 return element r {
29 $e/requestid
30 , $e/days
31 , $e/periodunit
32 , $i/productname
33 , $i/brand/brandname
34 , $i/brand/ndccode
35 }'
36 passing t.xmldoc as "d"
37 columns requestid number path 'requestid'
38 , days varchar2(30) path 'days'
39 , periodunit varchar2(10) path 'periodunit'
40 , prductname varchar2(20) path 'productname'
41 , brandname varchar2(20) path 'brandname'
42 , ndccodexml xmltype path 'ndccode'
43 ) x,
44 xmltable('/ndccode'
45 PASSING x.ndccodexml
46 COLUMNS
47 ndccode VARCHAR2(10) PATH '.') (+) y;
REQUESTID DAYS PERIODUNIT PRDUCTNAME BRANDNAME NDCCODEXML NDCCODE
12345 MONDAY DAY ABC PRODUCT CELL <ndccode>A58048</ndccode><ndccode>A49210</ndccode> A58048
12345 MONDAY DAY ABC PRODUCT CELL <ndccode>A58048</ndccode><ndccode>A49210</ndccode> A49210
12345 MONDAY DAY 100 bottles If you prefer the ANSI syntax it would be (just showing changed section)
) x
LEFT OUTER JOIN
xmltable('/ndccode'
PASSING x.ndccodexml
COLUMNS
ndccode VARCHAR2(10) PATH '.') y
ON 1=1; -
How to use FormsGraph in my forms
Hello everybody,
I want to use FormsGraph in my forms. Demo works fine but when I create a bean area in my form, bean area is empty and get some error messages in the java console (1.3.1.13):
Loading http://localhost:8888/forms90/java/f90all_jinit.jar from JAR cache
Loading http://localhost:8888/forms90/webutil/webutil.jar from JAR cache
RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
Loading http://localhost:8888/forms90/java/icons.jar from JAR cache
Loading http://localhost:8888/forms90/java/HandCursor.jar from JAR cache
Loading http://localhost:8888/forms90/java/demo90.jar from JAR cache
Loading http://localhost:8888/forms90/java/FormsGraph.jar from JAR cache
Loading http://localhost:8888/forms90/webutil/jacob.jar from JAR cache
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
Forms Applet-Version : 902122
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
Forms Applet-Version : 902122
java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at oracle.forms.handler.UICommon.instantiate(Unknown Source)
at oracle.forms.handler.UICommon.onCreate(Unknown Source)
at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
at oracle.forms.engine.Runform.processMessage(Unknown Source)
at oracle.forms.engine.Runform.processSet(Unknown Source)
at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
at oracle.forms.engine.Runform.onMessage(Unknown Source)
at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
at oracle.forms.engine.Runform.startRunform(Unknown Source)
at oracle.forms.engine.Main.createRunform(Unknown Source)
at oracle.forms.engine.Main.start(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)Hi,
hard to tell because the error simply says that there is a class missing that is expected. If you are not using other beans in Forms, can you take out the Graph bean to see if your module runs without? If it does, then we know that the problem is related to the bean. If the Forms module still doesn't run then you would have to take out the next bean until eventually the error goes away. Starting from here you put think back in and see when th eproblem reoccurs. This helps you to narrow down the problem.
Frank -
Hello
I'm working with Oracle Forms 6i and I need to check if a certain folder exists before I make an action, I think there's no way to do it with Oracle Forms only, so I tough doing it with vba.
Is there some controller that allow me to use vba in Oracle Forms? Or maybe I can do this another way.
ThanksYou can use this piece of code to check if a directory exists:
declare
l_hostcommand varchar2(1000);
l_dir varchar2(200) := 'f:\oracle';
begin
l_hostcommand := 'cmd /c if not exist '||l_dir||' exit 100';
host(l_hostcommand, no_screen);
if form_success then
message('Directory found');
else
message('Directory not found');
end if;
end; If you have no drive mapping, just use UNC (\\server\oracle). -
Hi I want to create a search form with drop down search criteria. This form should then search on the same site and display the search results. Is there HTML available for this? Or an oline site that I can use to build this form? I created a form in Jotform.com, but this form doesn't search the site, instead it sends me an e-mail. Do you have a solution for me? Thanks.
Hi I want to create a search form with drop down search criteria. This form should then search on the same site and display the search results. Is there HTML available for this? Or an oline site that I can use to build this form? I created a form in Jotform.com, but this form doesn't search the site, instead it sends me an e-mail. Do you have a solution for me? Thanks.
-
I need a list of libraries used in C# Windows Forms technology.
Windows Forms is a technology to make apps for Windows.
It uses only a part of .Net Framework.
I need a list of what it uses.
I am talking about Windows Forms technology, not Windows.Forms namespace.
I don't need .Net Framework Class Library, i need only what Windows Forms uses.
Thank you.> here are a few other namespaces that Windows Forms relies on
It is not a few, there are lots of those it relies on.
I need a list of namespaces that it relies on.
I repeat, i open a new Windows Forms project, i should know names of references to add them, right?
It uses a part of .Net Framework, and it doesn't use only System.Windows.Forms namespace, it uses others
too.
I repeat, i must know names of references to add them.
How can i do it?
It is a simple question. -
Problem using DBMS_SQL in a form
hi,
I am trying to write a procedure which get an input string containing a SQL statement (a SELECT), executes it, fetches the rows and writes them into a Excel sheet. I found this article http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm describing how to use DBMS_SQL package. My goal is to parse my query and store result in an array (using DEFINE_ARRAY).
I put theese two lines
(declare c number;)
c := dbms_sql.open_cursor;
dbms_sql.parse(c,p_query,dbms_sql.native); (p_query is my input string containing SQL)
But when I compile my program unit I get an error looking like that: "implementation restriction: DBMS_SQL.NATIVE: unable to access a remote package variable or cursor".
Where is the error? should I set something to access the package, or is it not possible to use it inside a form?W1zard is correct. Switch to Exec_SQL. Oracle does not support Forms using DBMS_SQL.
Now... please explain why you are not using a dynamic record group. It is SOOO much easier!
And if you want to look at some code using both methods, Exec_SQL and dynamic record group, you can download my "Quick Access" dynamic utility form, here: Oracle Forms Utilities -
How order by use in master detail form
hi master
sir i have master detail form but show data with out order by
my need is form show data in order on date
please give me idea how order by use in master detail form
thank
aamirSet "Order by Clause" Property at block level
Cheers
Gouri Sankar -
Image not displayed in pdf generated using Java API for Forms service
Hi,
I am creating a pdf document using Java API for Forms Service.
I am able to generate the pdf but the images are not visible in the generated pdf.
The image relative path is coming in the xml as defined below. The images are stored dynamically in the Livecycle repository each time a request is fired with unique name before the xml is generated.
<imageURI xfa:contentType="image/png" href="../Images/logo.png"></imageURI>
Not sure if I need to specify specify specific URI values that are required to render a form with image.
The same thing is working when I generate pdf document using Java API for Output Service.
As, I need to generate interactive form, I have to use Forms service to generate pdfs.
Any help will be highly appreciated.
Thanks.Below is the code snippet:
//Create a FormsServiceClient object
FormsServiceClient formsClient = new FormsServiceClient(myFactory);
//Specify URI values that are required to render a form
URLSpec uriValues = new URLSpec();
// Template location contains the whole rpository path for the form
uriValues.setContentRootURI(templateLocation);
// The base URL where form resources such as images and scripts are located. Whole Image path is passed in BaseUrl in the http format.
String baseLocation = repositoryPath.concat(serviceName).concat(imagesPath);
uriValues.setBaseURL(baseLocation);
// Set run-time options using a PDFFormRenderSpec instance
PDFFormRenderSpec pdfFormRenderSpec = new PDFFormRenderSpec();
pdfFormRenderSpec.setCacheEnabled(new Boolean(true));
pdfFormRenderSpec.setAcrobatVersion(com.adobe.livecycle.formsservice.client.AcrobatVersio n.Acrobat_8);
//Invoke the renderPDFForm method and write the
//results to a client web browser
String tempTemplateName =templateName;
FormsResult formOut = formsClient.renderPDFForm(tempTemplateName,
inXMDataTransformed,pdfFormRenderSpec,uriValues,null);
//Create a Document object that stores form data
Document outputDocument = formOut.getOutputContent();
InputStream inputStream = outputDocument.getInputStream(); -
Hi Everybody,
I am making forms based on procedures in 9iAS Portal. I am using two parameters for the form. One is Item Code for which I am having a simple LOV with sql statement. Other LOV has a dynamic Sql statement which accepts the Item_code as parameter and displays records containing the item_code. When I run the Lov seperately through navigaror it runs properly but when I used the lov through form and passed the item_code to it, on runtime it says that the lov is based on dynamic sql and unable to show results.
Can anybody please help me out of this problem.
Thanks in advance
Warm Regards
Vivek BajajWhen I tried to compile the following code in Forms, the compiler error I got was Encountered the symbol "STMT_STR" when expecting one of the following: select. However, when I run it in SQLPlus, it creates the function without any errors.
FUNCTION my_func
return number
is
TYPE DiaryCurTyp IS REF CURSOR;
cur DiaryCurTyp;
stmt_str VARCHAR2(200);
dmonth NUMBER;
dday NUMBER;
BEGIN
stmt_str := 'SELECT dmonth, dday FROM p2_diary
WHERE dmonth = :1';
OPEN cur FOR stmt_str USING '12';
LOOP
FETCH cur INTO dmonth, dday;
EXIT WHEN cur%NOTFOUND;
-- <process data>
END LOOP;
CLOSE cur;
END; -
Business rule to use page member on form
Hi all,
I need to create a business rule which uses a page member on the form. Created a RTP variable and used it in the Rule.Attached the rule and selected "use members on the form" and "Hide Prompt".But, Is still asking for prompt. How to unhide the prompt?Is it a calc manage rule or an EAS business rule, which version of planning.
Cheers
John -
Using methods from another Form C#
Hello!
I'm having some trouble using methods from one Form in another one. Here's the deal:
This is a snippet from my 'main' form:
public partial class PRINCIPAL : Form
//some variables here
Form2 Config = new Form2();
Form3 Cadastro = new Form3();
public PRINCIPAL()
InitializeComponent();
//code goes on and on
//Here's the method I want to call on the other forms (Form2 and Form3)
public void salva_banco()
this.Validate();
this.projetoBindingSource.EndEdit();
this.modulosBindingSource.EndEdit();
this.funcaoBindingSource.EndEdit();
this.estadosBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.database1DataSet);
//And here is where I show Form3
private void projetoDataGridView_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
Cadastro.ShowDialog();
//And here is where I show Form2
private void funcaoDataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
Config.ShowDialog();
}// And the code keeps on going}
And this is a snippet from Form3:
public partial class Form3 : Form
public Form3()
InitializeComponent();
private void Form3_Load(object sender, EventArgs e)
this.projetoTableAdapter.Fill(this.database1DataSet.Projeto);
this.modulosTableAdapter.Fill(this.database1DataSet.Modulos);
private void btnOK_Click(object sender, EventArgs e)
if (projetoTextBox.Text == "")
MessageBox.Show("some text here");
else
////// HERE IS THE PLACE WHERE I WANT TO CALL THE METHOD! "salva_banco()"
I've read lots of suggestions but none satisfied my condition.
I appreciate any help.
Thanks.You need to find the instance of the PRINCIPAL form to call the method on. If you know there will always be exactly one open you can use:
var principalForm = Application.OpenForms.OfType<PRINCIPAL>().Single();
principalForm.salva_banco();
David
David http://blogs.msdn.com/b/dbrowne/
Maybe you are looking for
-
Opening a SWF inside a new IE windows
From my main project (SWF), I have a button that opens another movie (SWF). How I can force the second movie to run in a new IE windows ? currenlty it replaces the main project windows ?
-
Really low volume on headphones with iPad mini iOS 8.2
Hello, Problem is with an iPad mini running iOS 8.2. When I connect any headphone/earbud to my iPad mini I can't hear a thing. Actually the sound is not totally muted but really really really low, almost imperceptible. The headphones are fine -tried
-
A very bad error in ibooks author widget...
hello, i have delivered my ibooks on ibooks store: Clil 2.0 For Maths. I added multiple choice questions using the Widget inspector, but i noted that the sentence "domanda 1 di 6" was written in italian. So i asked at this support in order to solve t
-
I sold my iphone 4s and added some money to buy a second hand Iphone 5, i can't get into the phone because i need the previous owners apple Id and password and theres absolutely no way I can cintact the previous owner because i had thier number on my
-
Dreamweaver/ php recordsets
Hello, I have a query which find featured products from the database. There are three in total. These products are then displayed in little boxes on the site, each with a different background colour. Usually, I would just repeat the region to show ea