mysql 과 파워빌더를 사용할때 odbc를 쓰면 가장 이상적이지만 클라이언트 PC에 일일히 설정해주는것이 상당히 귀찮은 일이다
그래서 oledb 로 mysql 에 접속해서 사용해봤는데 굉장히 아쉬운 부분이 있다
count(), max(), min() 같은 함수가 재대로 작동하지 않는 커다란 문제가 있다는 것이다
그래서 포기하고 odbc를 그대로 사용하고 있었는데 이번에 제대로 찾아봤다...과연 안되는지...
connectstring 에 option 을 넣어줘서 해결하는것은 알고 있었지만 이걸 하나만 줄 수 있는줄 알았다
option = 16384 ... 이렇게 하나만 주는 것으로 알고 있단 말이지...
저...함수가 제대로 실행되지 않는 문제는 4096 옵션으로 해결할 수 있는데 그럼 어떻게 두개를 붙일까...했는데 보니까
두개를 더하면 되네 -_-;;; 그래서 숫자들이 이상했구나...
16384+4096 = 20480 option = 20480.. 이렇게 기술하면 된다. 더몇가지 옵션을 찾아서 같이 더해주면 더 좋고....
아래는 다른 블로그에서 퍼온 옵션 상수값들이다
-------------------------------------------------------------------------------------------------
1 The client can\t handle that MyODBC returns the real width of a column.
2 The client can\t handle that MySQL returns the true value of affected rows. If this flag is set then MySQL returns \found rows\ instead. One must have MySQL 3.21.14 or newer to get this to work.
4 Make a debug log in c:\myodbc.log. This is the same as putting
MYSQL_DEBUG=d:t:O,c::\myodbc.log in AUTOEXEC.BAT
8 Don\t set any packet limit for results and parameters.
16 Don\t prompt for questions even if driver would like to prompt
32 Simulate a ODBC 1.0 driver in some context.
64 Ignore use of database name in \database.table.column\. (MySQL 3.22)
128 Force use of ODBC manager cursors (experimental)
256 Remove use of extended fetch (experimental)
512 Pad CHAR fields to full column length.
1024 SQLDescribeCol() will return fully qualifed column names
2048 Use compressed protocol (if server supports it)
4096 Tell server to ignore space after function name and before \(\ (needed by PowerBuilder). This will make all function names keywords!
8192 Connect with named pipes to a mysqld server running on NT.
16384 Change LONGLONG columns to INT columns, as some applications can\t handle LONGLONG or BIGINT.
32768 Return \user\ as Table_qualifier and Table_owner from SQLTables (test)
65536 Read my.cnf
131072 Add some extra safety checks (should not bee needed but...)
262144 Disable the new transaction support (To avoid newly introduced bugs)
If you want to have many options, you should add the above flags!
For example Option 12 (4+8) gives you debugging without package limits!
첫댓글 오.. 좋은 정보 감사드립니다