Solved

ODBC Oracle with CString Probelm

Posted on 2004-04-05
5
285 Views
Last Modified: 2013-11-20
hello.
I am using oracle database ,and
mfc,odbc method to
execute my command.

I want to insert into mytable
,the field is LONG type data_type .
I want to insert a CString.
when the CString length <4000,
it's ok.
but when It's length come to >4000.
It won't work.
how can I resovle ,thx.

0
Comment
Question by:oopilix
  • 3
  • 2
5 Comments
 

Author Comment

by:oopilix
ID: 10763082
can anyone help me??:
0
 
LVL 2

Expert Comment

by:alligatorsql
ID: 10765322
Hello,

we use OCI and when we want to save string that are greater than 4000 bytes, we use a piecewise operation. That
means, that Oracle will save the long string in 4000 bytes blocks. Is there a aquivalent operation in ODBC ?

Best regards
Manfred Peter
0
 

Author Comment

by:oopilix
ID: 10771739
thx,
but I din't use OCI before,
and
how do you use it in OCI,
I can't imagine  I can't insert into one
field with different data;

as u see:
Insert into xxx(x) values(...
Insert into xxx(x) values(...

what will it become..
0
 
LVL 2

Accepted Solution

by:
alligatorsql earned 25 total points
ID: 10773054
Hello,

That`s true.
OCI is a low level api and you use C functions to put the datas to the table.
Piecewise operation means that you call the oci function for inserting datas more that ones
For example:

CString sVeryLongString = "ABCD";
CString sVeryLongString1;="EDFG";

OCI_PREPARE_BUFFER(sVeryLongString);
OCI_PREPARE_BUFFER(sVeryLongString1);

OCI_EXECUTE ...

The question is, can you use piecewise operation with ODBC ?

Best regards
Manfred Peter

So, the question is,
0
 

Author Comment

by:oopilix
ID: 10773153
oh,thank you
I will find the OdBC method ,and
try it.
 
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 198
Replacement selected text 2 61
maven archtype selection in eclipse 1 57
how to split multiple lines delimiter : 8 99
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question