Status of the batch is "Check Creation In Progress" if [Delete] button disabled in A/P Payment batch.

: Print the checks again, then cancel the batch.

Reference

http://erp.ittoolbox.com/groups/technical-functional/accpac-l/accpac-56-delete-the-ap-payment-batch-with-the-status-of-check-creation-in-progress-4262194


Posted by 노을지기

 

Step 1: Move your company data files.
Use Windows Explorer to copy each Company data file (Folder name is company name) from its backup location (network drive or removable media, such as a CD or DVD or portable hard disk) to the C:\EASYDATA folder.


Step 2: Install new EasyPay software.


Step 3: Copy company data files to C:\EASYDATA folder of new computer.


Step 4: Run the EasyPay.


Step 5: Create New Company.
This doesn't create new company. It is just match the company folder.
Once set up, your company(s) will appear on the Company Folders screen. 


  • Click the [New] button

  • Type the Company Name and click [OK]
    • Must be the same the existing company folder in C:\EASYDATA
    • For example: If you already have existing company as HAPPYCOMPANY, type the [HAPPYCOMPANY] in Company ID Name.

 

Step 6: Check the Company Information

  • Select [Edit]-[Company] from the menu

  • Check the Business No on Profile tab

  • Check the Pay Period on Defaults tab

    It is very important that you enter the correct starting pay period number if you start Easypay part way into the year.

 

 

 

Posted by 노을지기

Bulk Insert sample

File location : C\SampleFolder

MS-SQL: SQL SERVER 2008 R2


데이블 생성한다.

CREATE TABLE [데이터베이스이름].[db_owner].[bulksample](
    [ComputerName] [varchar](50) NULL,
    [Country] [varchar](50) NULL,
    [ip] [varchar](50) NULL,
    [code] [nchar](10) NULL,
    [price] [numeric](18, 0) NULL,
    [no] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
    CONSTRAINT [PK_bulksample] PRIMARY KEY CLUSTERED ( [no] ASC )
) ON [PRIMARY] 


Data File (Comma delimited CSV) - sample.csv

ComputerName Country IP Code Price No
Com1 CANADA 192.168.1.1 0E1 2000  
Com2 CANADA 192.168.1.2 0E2 2001  
Com3 CANADA 192.168.1.3 0E3 2002  
Com4 CANADA 192.168.1.4 0E4 2003  
Com5 CANADA 192.168.1.5 0E5 2004  
Com6 CANADA 192.168.1.6 0E6 2005  
Com7 CANADA 192.168.1.7 0E7 2006  
Com8 CANADA 192.168.1.8 0E8 2007  
Com9 CANADA 192.168.1.9 0E9 2008  
Com10 CANADA 192.168.1.10 0E10 2009  
Com11 CANADA 192.168.1.11 0E11 2010  
Com12 CANADA 192.168.1.12 0E12 2011  
Com13 CANADA 192.168.1.13 0E13 2012  
Com14 CANADA 192.168.1.14 0E14 2013  
Com15 CANADA 192.168.1.15 0E15 2014  
Com16 CANADA 192.168.1.16 0E16 2015  
Com17 CANADA 192.168.1.17 0E17 2016  


위의 샘플 데이터를 양식 없이 바로 입력했을 경우.. 데이터가 깨진다.

(Microsoft SQL Server management Studio에서는 제대로 입력됨.. 하지만 프로그램을 이용하면 다름과 같이 보인다.


BULK INSERT [데이터베이스이름].[db_owner].[bulksample]
FROM 'C:\SampleFolder\sample.csv'
WITH
(
    FIELDTERMINATOR=',',
    ROWTERMINATOR = '\n',
    FIRSTROW = 2
)
Go


ComputerName    Country    ip    code    price    no
Com1    CANADA    192.168.1.1    0.00E+00   2000    77
Com2    CANADA    192.168.1.2    0.00E+00   2001    78
Com3    CANADA    192.168.1.3    0.00E+00   2002    79
Com4    CANADA    192.168.1.4    0.00E+00   2003    80
Com5    CANADA    192.168.1.5    0.00E+00   2004    81
Com6    CANADA    192.168.1.6    0.00E+00   2005    82
Com7    CANADA    192.168.1.7    0.00E+00   2006    83
Com8    CANADA    192.168.1.8    0.00E+00   2007    84
Com9    CANADA    192.168.1.9    0.00E+00   2008    85
Com10    CANADA    192.168.1.10    0.00E+00   2009    86
Com11    CANADA    192.168.1.11    0.00E+00   2010    87
Com12    CANADA    192.168.1.12    0.00E+00   2011    88
Com13    CANADA    192.168.1.13    0.00E+00   2012    89
Com14    CANADA    192.168.1.14    0.00E+00   2013    90
Com15    CANADA    192.168.1.15    0.00E+00   2014    91
Com16    CANADA    192.168.1.16    0.00E+00   2015    92
Com17    CANADA    192.168.1.17    0.00E+00   2016    93


그래서 포맷을 이용하여 code 부분을 수정해야한다.

C:> CD \

C:> CD SampleFolder

c:\SampleFolder>bcp "[데이터베이스이름].db_ownder.bulksample" out "c:\SampleFolder\a.txt" -U[데이터베이스 유저 이름]

password:

나중에 변경할 예정이르모 무조건 enter

Enter the file storage type of field ComputerName [char]: Enter prefix-length of
 field ComputerName [2]:
Enter field terminator [none]:

Enter the file storage type of field Country [char]:
Enter prefix-length of field Country [2]:
Enter field terminator [none]:

Enter the file storage type of field ip [char]:
Enter prefix-length of field ip [2]:
Enter field terminator [none]:

Enter the file storage type of field code [nchar]:
Enter prefix-length of field code [2]:
Enter field terminator [none]:

Enter the file storage type of field price [numeric]:
Enter prefix-length of field price [1]:
Enter field terminator [none]:

Enter the file storage type of field no [numeric]:
Enter prefix-length of field no [1]:
Enter field terminator [none]:

Do you want to save this format information in a file? [Y/n]
Host filename [bcp.fmt]:

Starting copy...

17 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total     : 1      Average : (17000.00 rows per sec.)

C:\SampleFolder>
C:\SampleFolder>


그후 C:\Samplefolder에 bcp.fmt 파일이 보인다.

이 파일을 sample.fmt로 복사한다.

메모장에서 열어보면 다음과 같다.

10.0
6
1       SQLCHAR             2       50      ""   1     ComputerName                 SQL_Latin1_General_CP1_CI_AS
2       SQLCHAR             2       50      ""   2     Country                      SQL_Latin1_General_CP1_CI_AS
3       SQLCHAR             2       50      ""   3     ip                           SQL_Latin1_General_CP1_CI_AS
4       SQLNCHAR            2       20      ""   4     code                         SQL_Latin1_General_CP1_CI_AS
5       SQLNUMERIC          1       19      ""   5     price                        ""
6       SQLNUMERIC          1       19      ""   6     no                           ""

이것을 다음과 같이 변경하고 실행할 경우 에러가 발생한다.

sample.fmt

10.0
6
1       SQLCHAR             0       50      ","   1     ComputerName                 SQL_Latin1_General_CP1_CI_AS
2       SQLCHAR             0       50      ","   2     Country                      SQL_Latin1_General_CP1_CI_AS
3       SQLCHAR             0       50      ","   3     ip                           SQL_Latin1_General_CP1_CI_AS
4       SQLNCHAR            0       20      ","   4     code                         SQL_Latin1_General_CP1_CI_AS
5       SQLNUMERIC          0       19      ","   5     price                        ""
6       SQLNUMERIC          0       19      "\r\n"   6     no                           ""

다음과 같이 명령어 입력..

 BULK INSERT [데이터베이스이름].[db_owner].[bulksample]
FROM 'C:\SampleFolder\sample.csv'
WITH (
    FORMATFILE = 'C:\SampleFolder\sample.fmt',
    FIRSTROW = 2
)

에러 메시지

Msg 4863, Level 16, State 1, Line 1
Bulk load data conversion error (truncation) for row 2, column 4 (code).
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".


이것 때문에 고생을 많이 했다.ㅡㅡ;;

sample.fmt 을 다음과 같이 변경한다.

10.0
6
1       SQLCHAR             0       50      ","   1     ComputerName                 SQL_Latin1_General_CP1_CI_AS
2       SQLCHAR             0       50      ","   2     Country                      SQL_Latin1_General_CP1_CI_AS
3       SQLCHAR             0       50      ","   3     ip                           SQL_Latin1_General_CP1_CI_AS
4       SQLCHAR             0       20      ","   4     code                         SQL_Latin1_General_CP1_CI_AS
5       SQLCHAR             0       19      ","   5     price                        ""
6       SQLCHAR             0       19      "\r\n"   6     no                           ""


데이터가 정상적으로 입력된다.

Computer Name    Country    ip    code    price    no
Com1    CANADA    192.168.1.1    0E1           2000    94
Com2    CANADA    192.168.1.2    0E2           2001    95
Com3    CANADA    192.168.1.3    0E3           2002    96
Com4    CANADA    192.168.1.4    0E4           2003    97
Com5    CANADA    192.168.1.5    0E5           2004    98
Com6    CANADA    192.168.1.6    0E6           2005    99
Com7    CANADA    192.168.1.7    0E7           2006    100
Com8    CANADA    192.168.1.8    0E8           2007    101
Com9    CANADA    192.168.1.9    0E9           2008    102
Com10    CANADA    192.168.1.10    0E10          2009    103
Com11    CANADA    192.168.1.11    0E11          2010    104
Com12    CANADA    192.168.1.12    0E12          2011    105
Com13    CANADA    192.168.1.13    0E13          2012    106
Com14    CANADA    192.168.1.14    0E14          2013    107
Com15    CANADA    192.168.1.15    0E15          2014    108
Com16    CANADA    192.168.1.16    0E16          2015    109
Com17    CANADA    192.168.1.17    0E17          2016    110

다음에 ASP.NET이나 C#의 어플리케이션에서 작업 후 결과를 확인해야겠다.


아직까지는 보류중..




Posted by 노을지기

대용량 데이터를 입력할 일 있어서 bulk insert로 입력하였다.

데이터가 많을 경우 아주 유용하게 사용하였다.


하지만 문제는 입력시 자동으로 포맷이 변경되는 경우이다.

예를 들어 ip나 0으로 시작하는 데이터는 자기 마음대로 포맷을 변경하였다.

ex) 0E1 -> 0x0000xxx

그래서 포맷을 지정하기 위해서 Format file을 이용하려고 하는데... 

[Host file datatype]에서 문제가 발행하였다.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.utility/html/utility/utility86.htm

Storage format에서 numeric 포맷을 SYBNUMERIC로 변경하여 넣으면 바로 에러가 발생한다.


그래서 방법을 찾던 중 다음 것을 발견하였다.

http://msdn.microsoft.com/en-us/library/ms191175.aspx

Using a Non-XML Format File


You can change the order of a column mapping by changing the order value for the column to indicate the position of the corresponding data field.

The following sample non-XML format file presents a format file, myTestOrder.fmt, that maps the fields in myTestOrder-c.txt to the columns of the myTestOrder table. For information about how to create the data file and table, see "Sample Table and Data File," earlier in this topic. The format file uses character data format.

The format file contains the following information:

          9.0
4
1       SQLCHAR       0       100     ","     3     Col3               SQL_Latin1_General_CP1_CI_AS
2       SQLCHAR       0       100     ","     2     Col2               SQL_Latin1_General_CP1_CI_AS
3       SQLCHAR       0       7       ","     1     Col1               ""
4       SQLCHAR       0       100     "\r\n"  4     Col4               SQL_Latin1_General_CP1_CI_AS

        

위에 같이 Col1 컬럼이 숫자형인데, SYBNUMERIC을 사용하지 않고, 바로 SQLCHAR을 사용하였다.

그후에 입력하니 바로 성공..ㅡㅡ;;

왜 이러는지는 나도 모름..ㅠㅠ

다음 페이지 예제로 확인 <-- 나중에 잊어 먹지 않기 위해서..



Posted by 노을지기

windows 7 64bit에서 windows update를 이용하여 service pack 1을 설치하였다.

다운로드 후 재부팅하는데 30~40% 실행되다가 실패로 나왔다.


원도우에서 제공해준 System Update Readiness Tool을 다운 받아서 설치했는데, 이것은 성공하였다.

http://windows.microsoft.com/troubleshootwindows7sp1

그 후 혹시 몰라 Service Pack 1(http://www.microsoft.com/en-us/download/details.aspx?id=5842)을 직접 다운받아 DVD로 구운 후 다시 설치하였지만,  0X80070490 에러가 발생했다.

인터넷에서 위 에러를 검색하니, 다음과 같다.

0x80070490 ERROR_NOT_FOUND Windows could not search for new updates.

http://support.microsoft.com/kb/947821/en

이미 System Update Readiness Tool을 설치하였는데, 다시 하라니.. 이것 참..

인터넷 검색 중 좋은 것을 하나 찾았다.

출처:http://beerpla.net/2011/05/06/how-to-fix-error_not_found-0x80070490-during-windows-7-sp1-installation/

위와 같이 하니 설치 완료..

역시 대단하신 분들이 많음..

---- 추가 정리 : 잊지 않기 위한 발버둥 --

Setp 1 : SFC 실행(System File Checker or Windows Resource Checker)

Command 창을 administroator 권한으로 실행(Windows key + r -> cmd)

sfc /scannow

그후 아래와 같은 메시지가 나올 것이다.

Setp 2: CBS.log 파일을 확인하라고 함.. 하지만 이미 0X80070490 에러를 알기 때문에 패스

참고로 실행 파일은 Checksur.exe 로 실행하면 CBS 파일이 저장됨.

CBS 저장 위치는 %systemroot%\Logs\CBS

Setp 3: setupapi.dev.log 파일을 찾아야 한다.

위치는 %WINDIR%\inf\ 아래에 있다.

%WINDIR%\inf\

or

C:\WINDOWS\inf

setupapi.dev.log 파일 리스트를 보면 아래와 같이 실패했을 경우 날짜별로 생성되어 있다.

제일 아래 마지막것을 열어보자.

파일을 열명 아래와 같다.

조금만 아래를 보면 아래와 같이 실패했다는 메시지가 보인다.

실패 메시지 뒤에 파일 경로도 있다.

문제는 usbvideo.inf 파일...

Step 4. pnputil 로 드라이버 소프트웨어 업데이트

Command 창에서 파일 경로 및 이름을 복사하여 붙여 넣는다.

pnputil -a [File Name]

위 그림과 같을 경우

pnputil - a C:\windows\system32\DriverStore\FileRe.....\mstorvsc.inf


그 후 Windows Security 창이 뜨는데,

[Install this drive software anyway] 을 클릭하면 된다.


만일 여러 파일이 문제이면 찾아서 계속 업데이트하면 된다.

Artem russakovskii 분께 감사의 인사를.

다시 한 번 출처:

http://beerpla.net/2011/05/06/how-to-fix-error_not_found-0x80070490-during-windows-7-sp1-installation/



 


Posted by 노을지기