วันพฤหัสบดีที่ 23 พฤษภาคม พ.ศ. 2556

C# Ajax.ActionLink How to Add Onclick for confirm or validate.

I try to insert onclick or @onclick in html attribute but it don't work.
so I try research and found this

@Ajax.ActionLink("Done", "ActionName", 
    new AjaxOptions 
    { 
        OnBegin = "return ConfirmDone()", 
        UpdateTargetId = "MyContainerId" 
    })
@Ajax.ActionLink("Done", "ActionName", 
    new AjaxOptions 
    { 
        Confirm= "Are you sure you want to do this?", 
        UpdateTargetId = "MyContainerId" 
    })
With this i can add function validate on begin or add confirm before click from Ajax Option.

ref: http://stackoverflow.com/questions/9604942/asp-net-mvc3-ajax-actionlink-conditional-confirmation-dialog-box

วันอังคารที่ 14 พฤษภาคม พ.ศ. 2556

DB2 7.2 There is no available conversion for the Source Code page

The Connection test failed.
[IBM][CLI Driver]SQL0332N There is no available conversion for the Source Code page "1254" to the target code page "874". Reason Code "1".
SQLSTATATE =57017
This error mean your language in client and server does not match.
Change your language by change system locale to match server and restart.

วันจันทร์ที่ 13 พฤษภาคม พ.ศ. 2556

Oracle : Import Export Whole DB

Export
set NLS_LANG=English
exp userid=[oldusername]/[oldpassword]@[sid] grants=no file=[filename].dmp
Import
set NLS_LANG=English
imp [username]/[password] file=[filename].dmp  full=yes

*may u need to grant extra role for import
SQL> grant imp_full_database to [username];

Oracle : Create new user

1. Check all users.
Start SQLPlus
If u are administrator
type
sqlpus / as sysdba
for login as sysdba
your password is sys password
type
select * from all_users;
for check all users.

2. Create new Table Space for new user (Or use old one.)
create tablespace TableSapceName datafile '[path]'
size 32m autoextend on
next 32m maxsize 2048m extent management local;
your default path for Oracle 11g Express is
'c:\oraclexe\app\oracle\oradata\XE\TableSpaceName.dbf'
dbf file will create automatically

3. Create new user with default table space.
CREATE USER [Name] IDENTIFIED BY [pass]
DEFAULT TABLESPACE "TableSpaceName"
TEMPORARY TABLESPACE "TEMP";

4. Alter user to unlimited with this tablespace.
ALTER USER [username] QUOTA UNLIMITED ON [TablespaceName];
5. Grant user permission
GRANT create procedure, create session, create table,
create type, create view, create synonym, create trigger,
resource TO [username];

grant imp_full_database to [username];