?
Solved

ODBC Oracle with CString Probelm

Posted on 2004-04-05
5
Medium Priority
?
295 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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