|
|
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
#include <vcl.h> #pragma hdrstop #include <conio.h> #include <iostream.h> #include <occi.h> using namespace oracle::occi; using namespace std; #pragma argsused int main(int argc, char* argv[]) { Environment *env; Connection *conn; Statement *stmt; env = Environment::createEnvironment (Environment::DEFAULT); //conn = (oracle::occi::Connection *) env->createConnection("ALEX","qwerty","SID"); //stmt = conn->createStatement(); getch(); //env->terminateConnection (conn); //Environment::terminateEnvironment (env); return 0; } А вот результат: [Linker Error] Unresolved external 'oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void *, void * (*)(void *, unsigned int), void * (*)(void *, void *, unsigned int), void (*)(void *, void *))' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\OCI\UNIT1.OBJ Как быть? Кто-нибудь сталкивался с подобной ошибкой??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.09.2007, 14:02:13 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
мало подключить .h, надо еще соответствующий .lib подключить :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.09.2007, 14:05:42 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Lelikkмало подключить .h, надо еще соответствующий .lib подключить :) Все старндартное прописано: Include path C:\oracle\ora92\oci\include Library path C:\oracle\ora92\oci\lib Не помогает!!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.09.2007, 14:22:03 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
UP!!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.10.2007, 10:22:36 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Шо Up шо UP. Вам же сказали вы lib в проэкт добавили через Project->add to Progect или #pragma comment(lib,"lib_name") Либы лежат обычно на сервере в папке lib (к примеру для FB - fbclient_bor.lib) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.10.2007, 10:35:17 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
BorrШо Up шо UP. Вам же сказали вы lib в проэкт добавили через Project->add to Progect или #pragma comment(lib,"lib_name") Либы лежат обычно на сервере в папке lib (к примеру для FB - fbclient_bor.lib) Либы добавлены Project->Options->Directories/Conditionals->Library Path ->Library Path Хотя поробовал сдеть по Вашему через Project->add to Progect и теперь другая ошибка: [Linker Error] 'C:\ORACLE\ORA92\OCI\LIB\MSVC\OCI.LIB' contains invalid OMF record, type 0x21 (possibly COFF) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.10.2007, 10:57:17 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
авторC:\ORACLE\ORA92\OCI\LIB\MSVC Это либы для компилятора MSVC. Компиляторы от MC и Borland'a - это два совсем разных компилятора. Там папки типа Bor или еще как нет? автор Либы добавлены Project->Options->Directories/Conditionals->Library Path ->Library Path Все может быть, только я то всегда думал, что пути и библиотеки это две совсем разных вещи. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.10.2007, 15:50:17 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Если был бы visual c++ то нада было бы добавить #pragma comment(lib,"ocilib") (вроде так либа называется, но лучше проверить). Но так как Borland, чето еще нада делать. Поройся в нете, я где то что-то подобное видел(borland+oci). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.10.2007, 22:59:12 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Ба.... не обратил внимания.... ты кстати пытаешься использовать ОССI, а не OCI. Если под виндой юзаешь, то OCCI с 9-м клиентом => вообще могут быть проблемы. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.10.2007, 23:03:16 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Borr авторC:\ORACLE\ORA92\OCI\LIB\MSVC Это либы для компилятора MSVC. Компиляторы от MC и Borland'a - это два совсем разных компилятора. Там папки типа Bor или еще как нет? автор Либы добавлены Project->Options->Directories/Conditionals->Library Path ->Library Path Все может быть, только я то всегда думал, что пути и библиотеки это две совсем разных вещи. Здесь C:\ORACLE\ORA92\OCI\LIB\ есть только одна папка MSVC. Я ошибся, дважды написал Library Path. Пути и либы добавлены: Project->Options->Directories/Conditionals->Library Path Project->Options->Directories/Conditionals->Include Path ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.10.2007, 10:23:08 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
vitay Поройся в нете, я где то что-то подобное видел(borland+oci). Все, что нашел implib -a oci.lib %ORACLE_HOME%\bin\OCI.DLL. И это не помогает... ошибка [Linker Error] 'C:\ORACLE\ORA92\OCI\LIB\MSVC\OCI.LIB' contains invalid OMF record, type 0x21 (possibly COFF) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.10.2007, 12:02:49 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Может, конечно, не в тему скажу - я больше с Delphi работаю в последние годы. Короче, мысль такая: У King_86 ведь Borland C++ Builder, а это значит, что Delphi/C++Builder-компоненты тоже могут быть использованы в проекте. Есть уже масса готовых компонент доступа через OCI к Oracle: ODAC , AnyDAC , DOA . Авторы прошли долгий тернистый путь, пока разобрались с этим OCI. AnyDAC даже бесплатный и содержит также нативный доступ ко многим другим СУБД . Почему не воспользоватся? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.10.2007, 13:27:37 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Повторяю, в cвоей проге ты пытаешься использовать OCCI. При чем тут oci.dll?! OCCI и OCI это не одно и то же =). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.10.2007, 17:37:44 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Кроик СемёнМожет, конечно, не в тему скажу - я больше с Delphi работаю в последние годы. Короче, мысль такая: У King_86 ведь Borland C++ Builder, а это значит, что Delphi/C++Builder-компоненты тоже могут быть использованы в проекте. Есть уже масса готовых компонент доступа через OCI к Oracle: ODAC , AnyDAC , DOA . Авторы прошли долгий тернистый путь, пока разобрались с этим OCI. AnyDAC даже бесплатный и содержит также нативный доступ ко многим другим СУБД . Почему не воспользоватся? Есть и Borland C++ Builder и перечисленные компоненты. Хочется, да и нужно повысить производительность загрузки данных в БД. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2007, 10:58:40 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
vitayПовторяю, в cвоей проге ты пытаешься использовать OCCI. При чем тут oci.dll?! OCCI и OCI это не одно и то же =). А можно по подробнее? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2007, 11:01:24 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Скорость загрузки данных в Oracle можно повысить с помощю Direct Path Load engine сервера, доступ к которой реализован, если это DOA: TOracleDirectPathLoader component (Подобные компоненты есть, думаю, и в ODAC, и в AnyDAC и совсем незачем самому OCI копать) Вот что стоит там в хелпе: DOA Description The TOracleDirectPathLoader component allows an application to access the Direct Path Load engine of the Oracle Server, which is also used by SQL*Loader. This provides the ability to load external data from memory into the database at the highest possible speeds. Instead of using Insert SQL statements to insert the individual records, the external data in memory is converted in to a format that can immediately be written to the physical database blocks of a table. This makes it even faster than Array DML, which basically still processes Insert statements. The drawback of this speed advantage is that there are several restrictions: Triggers are not allowed for the table. An attempt to load data into a table with triggers will lead to "ORA-26086 direct path does not support triggers". You can temporarily disable the triggers of the table. Check constraints and foreign key constraints are not allowed for the table. Loading data into such a table will lead to "ORA-26087 direct path does not support referential or check constraints". You can temporarily disable the constraints of the table. Primary and unique key constraints are allowed. Remote tables cannot be loaded. User defined types not allowed for the table. The Direct Path Load interface is only available in Net8 8.1 (the Oracle8i client) and later. The load operation is not part of a "normal" transaction. These drawbacks may be a reason to resort to Array DML, which does not suffer from any of these restrictions and still provides excellent batch loading performance. However, the speed advantage of the TOracleDirectPathLoader can be considerable. For example, loading 10'000 records into a table with 2 columns of 40 bytes without any indexes, on a local database configuration on a Pentium III class server shows the following benchmark results: TypeSpeedSingle Inserts1'500 records / secondArray Inserts15'000 records / secondDirect Path Loading60'000 records / second Results will of course vary for different parameters. For example, if the table has one or more indexes there will be more overhead for each inserted row, and results will be closer. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2007, 11:13:12 |
|
||
|
Borland C++ Builder & OCI Oracle 9.2
|
|||
|---|---|---|---|
|
#18+
Кроик СемёнСкорость загрузки данных в Oracle можно повысить с помощю Direct Path Load engine сервера, доступ к которой реализован, если это DOA: TOracleDirectPathLoader component (Подобные компоненты есть, думаю, и в ODAC, и в AnyDAC и совсем незачем самому OCI копать) Вот что стоит там в хелпе: DOA Description The TOracleDirectPathLoader component allows an application to access the Direct Path Load engine of the Oracle Server, which is also used by SQL*Loader. This provides the ability to load external data from memory into the database at the highest possible speeds. Instead of using Insert SQL statements to insert the individual records, the external data in memory is converted in to a format that can immediately be written to the physical database blocks of a table. This makes it even faster than Array DML, which basically still processes Insert statements. The drawback of this speed advantage is that there are several restrictions: Triggers are not allowed for the table. An attempt to load data into a table with triggers will lead to "ORA-26086 direct path does not support triggers". You can temporarily disable the triggers of the table. Check constraints and foreign key constraints are not allowed for the table. Loading data into such a table will lead to "ORA-26087 direct path does not support referential or check constraints". You can temporarily disable the constraints of the table. Primary and unique key constraints are allowed. Remote tables cannot be loaded. User defined types not allowed for the table. The Direct Path Load interface is only available in Net8 8.1 (the Oracle8i client) and later. The load operation is not part of a "normal" transaction. These drawbacks may be a reason to resort to Array DML, which does not suffer from any of these restrictions and still provides excellent batch loading performance. However, the speed advantage of the TOracleDirectPathLoader can be considerable. For example, loading 10'000 records into a table with 2 columns of 40 bytes without any indexes, on a local database configuration on a Pentium III class server shows the following benchmark results: TypeSpeedSingle Inserts1'500 records / secondArray Inserts15'000 records / secondDirect Path Loading60'000 records / second Results will of course vary for different parameters. For example, if the table has one or more indexes there will be more overhead for each inserted row, and results will be closer. Спасибо за полезную инфу. О Direct Path Load не слышал, но судя из вышесказанного попробую поюзать!!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.10.2007, 12:57:17 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=34845202&tid=2028063]: |
0ms |
get settings: |
9ms |
get forum list: |
18ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
182ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
66ms |
get tp. blocked users: |
1ms |
| others: | 207ms |
| total: | 502ms |

| 0 / 0 |
