Sabtu, 11 Agustus 2007

vs2005 dotnet with c# for mobile application

hi, i am been busy for a few week a go. from the oracle form i move 180 deagrees to learn C# mobile and asp.net, because of that i will tell you what i knew about that.

today i will share about C# mobile application. i use this application for windows ce 2.0 , in this case it's require .net compact edition 2.0 , sql compact edition 2.0. it's not same with vb.net that i had been learn, c# it's more same like java but had a little complicate way to use it.
in c# application for mobile application or desktop application it's use it program.cs , program.cs it's like a main program, the program that we execute in c# it's run from program.cs
the different think's with vb.net it's like syntax formname.close, if in vb.net it's will close the form that we want to be closed , but in C# it's will be close the application(because of that you must aware about this action u choose). to handle this problem you can use formname.hide()

this way it's had to use it's, because of that in c# mobile application if we don't initialization the form as object the form will exist the hide event. for handle that problem i use this way.

in program.cs

static class Program
{
/* in this line i initialization the form with public and static
public static frmtest ofrmtest = new frmtest();
*/
[MTAThread]
static void Main()
{
Application.Run(form1);
}
}


to use this object you just put Program.ofrmtest.Show();
if you use Program.ofrmtest.Close(); the form can't be open again, because the object you had been destroyed. because of that u must use Program.ofrmtest.Hide(); or you can make a event with static method. like this;

static class Program
{

[MTAThread]
static void Main()
{
Application.Run(form1);
}
public static void OpenFormTest()
{
ofrmtest = new frmtest();
ofrmtest.Show();
}
public static voide CloseFormTest(form frm)
{
Form frmTrans= frm;
frmTrans.Close();
}
}
to use this method in form1 events form_load just put Program.OpenFormTest();
to close the form in frmtest you can use CloseFormTest(this);

well that's it.... bye bye...

Rabu, 18 Juli 2007

Commit Problem in ORACLE FORM 10g or the other version

hi, this morning i got a new case in commit problem.
this is the example problem.
in trigger when-button-pressed
insert into values ('aaa','bbb','ccc');
commit;

in trigger when-button-pressed
delete form where <> = < :itemName >
commit;

on that statement the oracle form can insert and delete the data in database, but some how i don't know why the database wouldn't commit that statement. to handled that problem you must replace the statement commit; into forms_ddl('commit');

example.
in trigger when-button-pressed
insert into values ('aaa','bbb','ccc');
forms_ddl('commit');

in trigger when-button-pressed
delete form where <> = < :itemName >
forms_ddl('commit');

this statement is built-in oracle form, it's can handled the issues dynamic SQL statement at runtime, include server-side PL/SQL and DDL. hmm.... i thinks just that i know how to solve the problem, if you had the other method to slove the problem please share it to us thanks :p

Selasa, 17 Juli 2007

why my Oracle form 10g cannot run form ( CTRL+R)?

hello, guys i back again... this is the other problem i got it in trainning, may be some of you know how to solve this problem in oracle form 10g, and i hope you can share it with us if you had another way with me :p

ok, back to the topic i want to share to all of you who had the same problem like me, that when want to run form or CTRL + R , showing an error. because of that i want you to follow my step.

in the first time when open the "form builder" in oracle form 10g , please click edit -> preferences ,after that it's will showing the new windows with tab (General, Subclass, Wizards , RunTime)। Click RunTime and in application server URL click the button reset to default, after that browse the web browser location do you wanna use it. any way in my case, i use IE and Firefox to test it. but i just can solve the problem in IE, in firefox i no idea to solve it(may be other person can share with us ^_^). now open the IE then click the tools -> internet options
in the tab click Advanced, then in security area check "allow active content run in files on My Computer", then try to run the oracle form 10g.
oh....i forgot in the first run ( CTRL +R ) in the IE it will be ask to install the Jinitiator, you must install that, because if you don't have it, the application will not run in IE, and before runing the oracle form 10g, i hope i already start the OC4J because it's like IIS , apache / Virtual server.

that all i knew about how to running the form, i hope this article will solve the problem for many people, because the solution it's hard to find in internet.
thanks for read this article...

how to unlock/lock scott (oracle 10g)

hello guys, before write this article i had been trained for oracle 10g with the pl/sql and oracle form above 10 days and more, in many days i past it. i got some problem like the title said. in the first trained i must to create a new database in oracle 10g, differing with the other database, like MS SQL SERVER we cannot just click next, but some little think we must to concentration in some case, like the password for sys,system,etc (we must focus in this one because if you forgot or not write the password we cannot pass to SQL*PLUS to unlock the scott "user" or create the user to access the database, for the dispensation we must delete the database and create the new one) ,the other one is the unlock check box in the password management, if we don't uncheck for the scott "user" or the other "user" you want to unlock in the SQL*PLUS you can't use that's user because it's will be locked.

in that case you may use SQL*PLUS and login with SYS or SYSTEM and the password is the password that u write for that database when you do the created database wizard. after that i want you to use this step for unlock the user that you want it.

examples, in SQL*PLUS:
SQL> user scott identified by tiger account unlock;
or
SQL> user identified by unlock;

if you want to lock the scott "user" with the in SQL*PLUS, use this statement
SQL> --lock scott first
or
SQL> --lock first

well, i hope guy's who need this article will be seen it and can solve the problem...
thank's alot for read this article, see you in my next article