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
สมัครสมาชิก:
บทความ (Atom)