기본 콘텐츠로 건너뛰기

VC++(MFC)에서 ADO와 ADOX를 이용한 MDB 파일 생성 / 연동 / 압축에 관한 모든 것

VC++(MFC)에서 MDB 생성 / 압축 / 연동 □ 개 요 ○ Access로 생성하는 DB 파일인 MDB 파일의 생성과 압축 및 기본 DB연동(데이터의 추가, 삭제, 검색, 수정)에 대한 내용 ○ 다이얼로그 기반의 MFC 프로젝트 상에서 위의 작업들을 수행하는 CDataBase라는 사용자 정의 클래스를 만들고 구현 □ 준비 작업 ○ stdafx.h에 다음을 import 한다. /* DB 사용을 위한 설정*/ #import "C:\Program Files\Common Files\System\ADO\msado15.dll" rename("EOF", "EndOfFile") /* DB 파일 압축을 위한 설정*/ #import "C:\Program Files\Common Files\System\ado\msjro.dll" no_namespace /* DB 파일 생성을 위한 설정*/ #import "c:\Program Files\Common Files\system\ado\msadox.dll" using namespace ADODB; using namespace ADOX; ※ ADO(msado15.dll) 자체에서는 DB 파일 생성과 압축에 대한 라이브러리가 없기 때문에 각각에 필요한 DLL 파일을 Import 해야 한다. 하지만 ADOX(msadox.dll)와 단순히 같이 Import하면 충돌하기 때문에 서로 namespace를 지정해 준다. 또한 인터넷에 돌아다니는 일부 코드는 msadox.dll를 Import할 때 rename 혹은 no_namespace 옵션을 주곤 하는데 이를 위와 같이 해제한다. ○ 초기화 작업을 수행한다. => 프로젝트의 메인파일 (TestDlg.cpp)의 BOOL CTestDlgAPP::InitInstance()에 다음 내용을 추가 /* Ole 컨트롤의 지원을 위한 작업을 가능하게 함*/ AfxEnableControlContainer(); if (!

Fixing the "Error spawning cmd.exe" Error in Visual Studio

When trying to build a C++ project with Visual Studio 2005 Beta 2(or 2007, 2008), I always get a PRJ0003 error:Error spawning 'cmd.exe' Since I mostly use C# this hasn't been bothering me unduly, particularly since it mainly seems to afflict a custom build action that doesn't appear to be essential for the compilation process... But I finally got around to finding a solution. The first clue was that if I invoked VCBuild.exe from the command line, I could get rid of the problem by using the /useenv command line option. This tells it to use environment variables to get the path to libraries, executable and the like instead of using the configured directories. The fact that it works when using the environment variables, but not when using the configured directories pointed the finger at the configured directories... This config can be found in Visual Studio's Options dialog (off the Tools menu). It's in the Projects and Solutions -> VC++ Directories page. This t

How to Compile Pidgin with Plugins from Source in Intrepid Ibex

I read about an oppurtunity to compile pidgin from source with video and voice support, so I wanted to try. This is how I proceed: Code: sudo apt-get install build-essential dh-make sudo apt-get install gstreamer0.10-plugins-good gstreamer0.10-plugins-bad libgstreamer-plugins-base0.10-dev Installed packages from http://ftp.de.debian.org/debian (added to the sources) Code: sudo apt-get install libgstfarsight0.10-0 libgstfarsight0.10-dev gstreamer0.10-plugins-farsight in order to fetch the last revision of pidgin: Code: apt-get install monotone monotone-viz then: Code: DATABASE=/home/user/monotone_databases/pidgin.mtn WORKINGDIR=/home/user/code/pidgin-mtn cd $(dirname $DATABASE) wget http://developer.pidgin.im/static/pidgin.mtn.bz2 bzip2 -d pidgin.mtn.bz2 mtn -d $DATABASE pull --set-default mtn.pidgin.im "im.pidgin.*" I got an error message so: Code: mtn -d $DATABASE db migrate then again: Code: mtn -d $DATABASE pull --set-default mtn.pidgin.im &qu

도스창 (Command Shell)에서 네트워크(Network) 설정 변경

컴퓨터 관리의 네트워크 어댑터에 장치가 인식되어 있는 상태에서, 소프트웨어 오류로 인해 네트워크 연결 창이 뜨지 않는 등 GUI 환경으로 IP 설정이 되지 않는 문제가 발생될 경우, 아래와 같이 조치 합니다. 다음은 예제입니다. C:\Documents and Settings\snjee.KHENG>netsh interface ip set address name="로컬 영역 연결" source=static addr=192.168.10.99 mask=255.255.255.0 위의 명령을 풀이하면, netsh interface ip set address name="[연결이름,일반적으로 로컬 영역 연결로 되어있음]" source=static addr=[변경 또는 설정할 IP 주소] mask=[서브넷 마스크 주소] 입니다. ipconfig 명령으로 변경(설정)된 IP 주소를 확인합니다. C:\Documents and Settings\snjee.KHENG>ipconfig Windows IP Configuration Ethernet adapter 로컬 영역 연결: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.10.97 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.10.1 참고 1. Gateway 변경 netsh interface ip set address name="로컬 영역 연결" gateway=192.168.10.1 gwmetric=0 참고 2. Primary DNS 변경netsh interface ip set dns name="로컬 영역 연결" source=static addr=192.168.10.2 register=P

Delete user, remove user on Linux Fedora, using userdel command

T he deluser command can be very useful to remove user account or to delete user account on Linux Fedora machine. The article below show the step by step to remove user or some say to delete user for Linux Fedora machine. Command use: # finger [username] <-- Verify user account on the Linux system # userdel [username] <-- Remove user account from Linux system # userdel -r [username] <-- Delete user account, remove home directory including their files and remove mail spool Verify the existents of user with username john on the system: [root@fedora ~]# finger john Login: john Name: (null) Directory: /home/john Shell: /bin/bash Never logged in. No mail. No Plan. [root@fedora ~]# Remove user account or delete user account. [root@fedora ~]# userdel john [root@fedora ~]# Remove user or delete user account along with their user home directory and user mail spool. [root@fedora ~]# userdel -r john [root@fedora ~]# Verify the user deleted from the system. [root@fedora ~]#

Create extra root user account to your Linux box.

The ‘ root ’ account with user id 0 is the most powerful user in Linux and Unix system. This article show the step by step to create the duplicate root account that have the same privileges as super user root account on the Linux Fedora Core operating system. You may want to make replicate of root user account, or to create more than one user account that have the same capabilities as a ' root ' user (superuser) account. Why, may be for a root backup user account, incase of something happen to the ' root ' user account or may be just for fun :-). To create another root user account, we need to replicate the ' root ' user account characteristic, then make one account that have the same characteristic and capabilities of the ' root ' user account. Let begin by check the ' root ' user account. 1. Check user id for ‘ root ’ user account: [root@fedora ~]# id root uid=0(root) gid=0(root) gro

[PWA]Enterprise 사용자 정의 필드의 기본 필드 설정 문제

Project Web Access 의 Enterprise 사용자 정의 필드 중 기본 제공 사용자 정의 필드는 삭제할 수 없으며, 또한 한번 설정한 내용은 수정할 수 없는 문제가 있다. 내가 경험한 문제와 문제 해결 방법을 다음과 같이 정리한다. Scenario : 1. Project Web Access -> 서버 설정 -> Enterpirse 데이터 -> Enterprise 사용자 정의 필드 정의 항목을 선택함. 2. Enterprise 사용자 정의 필드 : 필드 중 "팀 이름" 선택 3. 최초 설정에서 사용자 정의 특성에서 코드 체계표는 지정되지 않은 것으로 되어있다. 4. 오류내용 : 코드 체계표에서 정의하지 않았거나 기본적으로 제공하는 다른 코드 체계표를 선택하게 됨. 5. 이렇게 하고 저장을 하게 되면, 분명히 경고 팝업 윈도우를 띄워준다. 하지만 보통의 경우 이를 무시하고 나중에 다시 설정할 수 있을 것이라 생각하고 이 경고를 건너뛰게 된다. 6. 사용자 정의 필드에 대한 코드 체계표 에서 "팀 이름" 코드 체계표를 다음과 같이 만든다. (1) 이름 : 팀 이름 (2) 형식 : 텍스트 (3) 코드 마스크 순서 / 길이 / 구분기호 문자 / 모든 값 / Blank (4) 코드 체계표 값 / 설명 H/W1G / 하드웨어 개발 1 그룹 (최대전력관리장치 전담 그룹) H/W2G / 하드웨어 개발 2 그룹 (자동조명제어장치 전담 그룹) S/W1G / 소프트웨어 개발 1 그룹 (최대전력관리장치 전담 그룹) S/W2G / 소프트웨어 개발 2 그룹 (자동조명제어장치 전담 그룹) 7. 이렇게 잘 만든 코드 체계표를 저장한다. 8. Enterprise 사용자 정의 필드 중 "팀 이름"을 선택한다. 9. 설정된 값이 보여지는 화면이 보여지고 "사용