Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ODBC Oracle with CString Probelm

Posted on 2004-04-05
5
Medium Priority
?
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

596 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