powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / C++ [игнор отключен] [закрыт для гостей] / Borland C++ Builder & OCI Oracle 9.2
17 сообщений из 17, страница 1 из 1
Borland C++ Builder & OCI Oracle 9.2
    #34836387
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
#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

Как быть? Кто-нибудь сталкивался с подобной ошибкой???
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34836388
Фотография Lelikk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
мало подключить .h, надо еще соответствующий .lib подключить :)
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34836395
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Lelikkмало подключить .h, надо еще соответствующий .lib подключить :)

Все старндартное прописано:
Include path C:\oracle\ora92\oci\include
Library path C:\oracle\ora92\oci\lib

Не помогает!!!
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34839977
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
UP!!!
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34840021
Borr
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Шо Up шо UP. Вам же сказали вы lib в проэкт добавили через Project->add to Progect или #pragma comment(lib,"lib_name") Либы лежат обычно на сервере в папке lib (к примеру для FB - fbclient_bor.lib)
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34840106
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
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)
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34841325
Borr
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
авторC:\ORACLE\ORA92\OCI\LIB\MSVC

Это либы для компилятора MSVC. Компиляторы от MC и Borland'a - это два совсем разных компилятора. Там папки типа Bor или еще как нет?

автор
Либы добавлены Project->Options->Directories/Conditionals->Library Path
->Library Path


Все может быть, только я то всегда думал, что пути и библиотеки это две совсем разных вещи.
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34845202
vitay
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Если был бы visual c++ то нада было бы добавить #pragma comment(lib,"ocilib") (вроде так либа называется, но лучше проверить). Но так как Borland, чето еще нада делать. Поройся в нете, я где то что-то подобное видел(borland+oci).
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34845208
vitay
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Ба.... не обратил внимания.... ты кстати пытаешься использовать ОССI, а не OCI. Если под виндой юзаешь, то OCCI с 9-м клиентом => вообще могут быть проблемы.
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34845797
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
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
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34846241
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
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)
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34846683
Фотография Кроик Семён
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Может, конечно, не в тему скажу - я больше с Delphi работаю в последние годы.

Короче, мысль такая:
У King_86 ведь Borland C++ Builder, а это значит, что Delphi/C++Builder-компоненты тоже могут быть использованы в проекте.

Есть уже масса готовых компонент доступа через OCI к Oracle: ODAC , AnyDAC , DOA . Авторы прошли долгий тернистый путь, пока разобрались с этим OCI. AnyDAC даже бесплатный и содержит также нативный доступ ко многим другим СУБД
.
Почему не воспользоватся?
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34847617
vitay
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Повторяю, в cвоей проге ты пытаешься использовать OCCI. При чем тут oci.dll?! OCCI и OCI это не одно и то же =).
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34848846
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Кроик СемёнМожет, конечно, не в тему скажу - я больше с Delphi работаю в последние годы.

Короче, мысль такая:
У King_86 ведь Borland C++ Builder, а это значит, что Delphi/C++Builder-компоненты тоже могут быть использованы в проекте.

Есть уже масса готовых компонент доступа через OCI к Oracle: ODAC , AnyDAC , DOA . Авторы прошли долгий тернистый путь, пока разобрались с этим OCI. AnyDAC даже бесплатный и содержит также нативный доступ ко многим другим СУБД
.
Почему не воспользоватся?

Есть и Borland C++ Builder и перечисленные компоненты. Хочется, да и нужно повысить производительность загрузки данных в БД.
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34848863
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
vitayПовторяю, в cвоей проге ты пытаешься использовать OCCI. При чем тут oci.dll?! OCCI и OCI это не одно и то же =).

А можно по подробнее?
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34848928
Фотография Кроик Семён
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Скорость загрузки данных в 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.
...
Рейтинг: 0 / 0
Borland C++ Builder & OCI Oracle 9.2
    #34849480
King_86
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Кроик СемёнСкорость загрузки данных в 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 не слышал, но судя из вышесказанного попробую поюзать!!!
...
Рейтинг: 0 / 0
17 сообщений из 17, страница 1 из 1
Форумы / C++ [игнор отключен] [закрыт для гостей] / Borland C++ Builder & OCI Oracle 9.2
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]