If you develop software with c# and deployment with ClickOnce
and using test key for sign code but it expire in 1 year
you need to create key for sign code with long term more than 1 year
Solution
1. create key with tool keygen and specific period start date and expire date
2. convert key to pfx file using tools pvk2pfx
3. sign code with youkey(key gen by step 1-2)
วันจันทร์ที่ 12 ตุลาคม พ.ศ. 2552
OLEDB Connect Text File Driver with schema.ini C#
If you using OLEDB TextFile Driver with schema.ini for interface data from textfile
for import to SQL Server Database
And If you want to import null value to not null key. you must to detect null value
before insert to table but Text Driver cannot use SQL Function such as ISNULL(field, anyvalue)
because limitation of Driver
Solution
1. You interface data from Text file with OLEDB Text Driver with schema.ini to
DataTable Object
2. Update DataTable Object with not null field to specific value such as '' (Blank)
3. Use SQLBulk Object for Interface data to SQL Server
for import to SQL Server Database
And If you want to import null value to not null key. you must to detect null value
before insert to table but Text Driver cannot use SQL Function such as ISNULL(field, anyvalue)
because limitation of Driver
Solution
1. You interface data from Text file with OLEDB Text Driver with schema.ini to
DataTable Object
2. Update DataTable Object with not null field to specific value such as '' (Blank)
3. Use SQLBulk Object for Interface data to SQL Server
วันอังคารที่ 6 ตุลาคม พ.ศ. 2552
Backup Database of Hiportfolio
If your company using HiPortfolio on windows platform and backup database with
hi-end backup software sush as veritas backup exec, netbackup, or use standard tool nt-backup
I have solution for backup HiPortfolio Database by using snapshot technology , fast and
can backup online and it free.
Technic is use 3 tools for work.
1. Delete old backup file using DeleteOld , DeleteOld is Free utility for delete old file
can specific age to delete it is project from CodeProject you can dowload hear
or original download
2. snapshot by shodow copy technology using software HoBoCopy.
HoBoCopy is a free tools you can download hear or original download
and it need visual c++ runtime (vcredist_x86)
3. 7Zip for compress backup file to zip format by command line, it's open source
compress software and you can dowload free
Create Script for backup using batfile and run batfile by TaskSchedule
With Windows Task Schedule or any TaskSchedule Software
Sample: Batfile
Backup.bat
REM ----------------- Begin of Script -----------------
SET PATH="E:\Tools"
FOR /f "Tokens=1-4 Delims=/ " ^%%i in ('date /t') do set folder=^%%k^%%j^%%i
REM //this file is use on system date formate is dd/mm/yyyy or regional setting is English United Kingdom
REM // REMOVE OLD BACKUP FILE Old Than 30 Days\\
DELETEOLD -p "E:\BACKUP" -a 30 -t d --s --r >E:\BACKUP\%folder%.LOG
CD E:\BACKUP
REM // CREATE FOLDER FOR CURRENT BACKUP \\
MKDIR %folder%
DEL E:\HIPORTBKUP\LIVE\*.* /S /Q
START /WAIT E:\Tools\HoboCopy\hobocopy.exe /full /skipdenied /y /r D:\HIPORT\HIPDB\LIVE E:\HIPORTBKUP\LIVE
START /WAIT E:\Tools\HoboCopy\hobocopy.exe /full /skipdenied /y /r D:\HIPORT\SPOOL E:\HIPORTBKUP\SPOOL
REM // BACKUP BY ZIP ALL FILE IN DATABASE TO ZIP FILE \\
SET PATH="C:\Program Files\7-Zip"
START /WAIT 7Z.EXE a -tzip E:\BACKUP\%folder%\HIPORT.ZIP "E:\HIPORTBKUP\LIVE\*"
START /WAIT 7Z.EXE a -tzip E:\BACKUP\%folder%\SPOOL.ZIP "E:\HIPORTBKUP\SPOOL\*"
START /WAIT 7Z.EXE a -tzip E:\BACKUP\%folder%\SQL.ZIP "E:\SQLBACKUP\*.BAK"
REM ----------------- End of Script -----------------
hi-end backup software sush as veritas backup exec, netbackup, or use standard tool nt-backup
I have solution for backup HiPortfolio Database by using snapshot technology , fast and
can backup online and it free.
Technic is use 3 tools for work.
1. Delete old backup file using DeleteOld , DeleteOld is Free utility for delete old file
can specific age to delete it is project from CodeProject you can dowload hear
or original download
2. snapshot by shodow copy technology using software HoBoCopy.
HoBoCopy is a free tools you can download hear or original download
and it need visual c++ runtime (vcredist_x86)
3. 7Zip for compress backup file to zip format by command line, it's open source
compress software and you can dowload free
Create Script for backup using batfile and run batfile by TaskSchedule
With Windows Task Schedule or any TaskSchedule Software
Sample: Batfile
Backup.bat
REM ----------------- Begin of Script -----------------
SET PATH="E:\Tools"
FOR /f "Tokens=1-4 Delims=/ " ^%%i in ('date /t') do set folder=^%%k^%%j^%%i
REM //this file is use on system date formate is dd/mm/yyyy or regional setting is English United Kingdom
REM // REMOVE OLD BACKUP FILE Old Than 30 Days\\
DELETEOLD -p "E:\BACKUP" -a 30 -t d --s --r >E:\BACKUP\%folder%.LOG
CD E:\BACKUP
REM // CREATE FOLDER FOR CURRENT BACKUP \\
MKDIR %folder%
DEL E:\HIPORTBKUP\LIVE\*.* /S /Q
START /WAIT E:\Tools\HoboCopy\hobocopy.exe /full /skipdenied /y /r D:\HIPORT\HIPDB\LIVE E:\HIPORTBKUP\LIVE
START /WAIT E:\Tools\HoboCopy\hobocopy.exe /full /skipdenied /y /r D:\HIPORT\SPOOL E:\HIPORTBKUP\SPOOL
REM // BACKUP BY ZIP ALL FILE IN DATABASE TO ZIP FILE \\
SET PATH="C:\Program Files\7-Zip"
START /WAIT 7Z.EXE a -tzip E:\BACKUP\%folder%\HIPORT.ZIP "E:\HIPORTBKUP\LIVE\*"
START /WAIT 7Z.EXE a -tzip E:\BACKUP\%folder%\SPOOL.ZIP "E:\HIPORTBKUP\SPOOL\*"
START /WAIT 7Z.EXE a -tzip E:\BACKUP\%folder%\SQL.ZIP "E:\SQLBACKUP\*.BAK"
REM ----------------- End of Script -----------------
ป้ายกำกับ:
Backup,
HiPort,
HiPortfolio,
HiPortfolio 3V7,
Solution
วันพุธที่ 30 กันยายน พ.ศ. 2552
HiPortfolio Job Schedule for Delay report
If your company used HiPortfolio for Investment System, and
used SLAVE Engine for run schedule job
On HiPortfolio 3V7 the Job Schedule can be set skip weekend and
holiday. but if your job schedule is run report delay. for example
run report date 1 oct 2009 on job date 2 oct 2009
you can found problem about skip weekend or skip holiday
on after skip date report date is not relative on previous date
for example
you run report delay 1 day (working day, Mon-Fri) skip weekend
Expectation job is
Job Date Report Date
Tue - Mon
Wed - Tue
Thu - Wed
Fri - Thu
Mon - Fri
but the last job in current version is
Job Date Report Date
Tue - Mon
Wed - Tue
Thu - Wed
Fri - Thu
Mon - Sun (it's incorrect)
Solution:
Job Date Report Date
Tue - Mon > Job1
Wed - Tue > Job1
Thu - Wed > Job1
Fri - Thu > Job1
Mon - Fri > Job2
you split job to 2 Job schedule
1. First Job is run between Tue-Fri (report Date Mon-Thu) and job skip weekend and holiday and create caladar for this job with every Monday is Holiday, Replace queue with 1 day
and Increment Date1, Date2 with 1 day
1.1 Crate new Currency for Calandar use Menu Mainenance>Reference file> Groups, classes,currencies, etc. > Currency code/ region> Currency Code

1.2 Create Calandar with Monday is holiday

1.3Crate Job with skip weekend and holiday and use calandar that Monday is holiday

2. Second Job is run on Monday (report date Friday) and skip is none recursive with
replace queue every 7 days, and Increment Date1, Date2 with 7 day
------------------
Reference to: HiPortfolio 3V7 week 549, On Windows Plat form
used SLAVE Engine for run schedule job
On HiPortfolio 3V7 the Job Schedule can be set skip weekend and
holiday. but if your job schedule is run report delay. for example
run report date 1 oct 2009 on job date 2 oct 2009
you can found problem about skip weekend or skip holiday
on after skip date report date is not relative on previous date
for example
you run report delay 1 day (working day, Mon-Fri) skip weekend
Expectation job is
Job Date Report Date
Tue - Mon
Wed - Tue
Thu - Wed
Fri - Thu
Mon - Fri
but the last job in current version is
Job Date Report Date
Tue - Mon
Wed - Tue
Thu - Wed
Fri - Thu
Mon - Sun (it's incorrect)
Solution:
Job Date Report Date
Tue - Mon > Job1
Wed - Tue > Job1
Thu - Wed > Job1
Fri - Thu > Job1
Mon - Fri > Job2
you split job to 2 Job schedule
1. First Job is run between Tue-Fri (report Date Mon-Thu) and job skip weekend and holiday and create caladar for this job with every Monday is Holiday, Replace queue with 1 day
and Increment Date1, Date2 with 1 day
1.1 Crate new Currency for Calandar use Menu Mainenance>Reference file> Groups, classes,currencies, etc. > Currency code/ region> Currency Code
1.2 Create Calandar with Monday is holiday
1.3Crate Job with skip weekend and holiday and use calandar that Monday is holiday
2. Second Job is run on Monday (report date Friday) and skip is none recursive with
replace queue every 7 days, and Increment Date1, Date2 with 7 day
Reference to: HiPortfolio 3V7 week 549, On Windows Plat form
ป้ายกำกับ:
HiPort,
HiPortfolio,
HiPortfolio 3V7,
Job Schedule
วันพุธที่ 16 กันยายน พ.ศ. 2552
วิธีการ Check Service Pack ของ SQL 2005
ใช้ คำสั่ง TSQL ดังนี้
SELECT SERVERPROPERTY('productversion'),
SERVERPROPERTY ('productlevel'),
SERVERPROPERTY ('edition')
ผลลัพธ์ จะออกมา ในลักษณะนี้คือ
| 9.00.1399.06 | RTM | Enterprise Edition |
ดูรายละเอียดเพิ่ม ได้ที่
http://support.microsoft.com/kb/321185
สมัครสมาชิก:
บทความ (Atom)