2012-11-08 3 views
3

현재 DB2를 일부 jdbc 코드로 로컬 MySQL-db로 미러링 중입니다. Mirror를 쿼리 할 필요없이 Node.js 앱에서 DB2를 직접 연결하고 싶습니다. Windows에서 실행 중이므로 Linux로 변경할 수 없습니다. Node.js가있는 DB2에서의 작업은 아직 매우 미미하거나 node-odbc가 사용 된 것으로 보입니다 (노드의 unixODBC 바인딩).Windows 플랫폼에서 Node.js의 DB2를 연결하십시오.

노드에 대해 DB2 바인딩을 제공하는이 프로젝트 https://github.com/herzi/db2.js을 찾았지만 설치가 실패 할 때 설치할 수 없습니다. 패키지에는 Node-gyp (이 성공적으로 설치됨) 및 .NET Framework SDK가 필요합니다. 내 PATH에 vcbuild.exe를 설정했습니다. 이 후 msbuild.exe는 누락 된 헤더 파일 (sqlcli1.h, sqlsystm.h, sqlca.h)에 대해 불만을 토로했는데,이 파일은 PRO * C의 일부입니다.

위의 헤더 파일을 http://files.edin.dk/php/win32/dev/php_build/include/db2/에서 가져 와서 내 노드의 src/디렉토리에 넣었습니다. 이제 컴파일러는 여러 오류를 표시합니다.

위의 모듈을 작동 시키려고 시도하는 것보다 Windows에서 Node.js 응용 프로그램의 DB2를 연결할 때 다른 옵션이 있습니까?

나를 도와 줄 수있는 사람은 누구입니까? 위의 모듈을 설치하는 단계는 무엇입니까?

감사합니다. 표시

오류 :

C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\sqlext.h(30): error C2146 : syntax error : missing ';' before identifier 'SQLSTATE' [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\sqlext.h(30): error C2146: syntax error : missing ';' before identifier 'SQLSTATE' [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\sqlext.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\sqlext.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\sqlext.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\sqlext.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

C:\Documents and Settings\tpaleniu\.node-gyp\0.8.12\src\sqlcli1.h(1501): error C2371: 'SQLTCHAR' : redefinition; different basic types [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\sqlext.h(30) : see declaration of 'SQLTCHAR' 

..\src\connection.cc(77): error C3861: 'snprintf': identifier not found 

[C:\IS\node\node_modules\db2\build\db2.vcxproj]..\src\connection.cc(80): error C3861: 'snprintf': identifier not found [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

..\src\connection.cc(111): error C3861: 'bzero': identifier not found [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

..\src\connection.cc(208): error C3861: 'bzero': identifier not found [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

..\src\connection.cc(547): error C2057: expected constant expression [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

..\src\connection.cc(547): error C2466: cannot allocate an array of constant size 0 [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

..\src\connection.cc(547): error C2133: 'argv' : unknown size [C:\IS\node\node_modules\db2\build\db2.vcxproj] 

답변

1

노드 ODBC를 현재 현재는 인 unixODBC와 함께 사용하기위한 것입니다 것은 사실이다. 그러나 Daniel VerWeire는 현재 supporting node-odbc on Windows에서 작업 중입니다. 나는 잠시 동안 기다릴 필요가 있다고 생각한다. 이

+0

감사로 볼 수 있습니다로

프라 빈은 즉시 here에 게시물을해야합니다. 나는 분명히이 일에 전념 할 것이다. – Tuomas

관련 문제