473,513 Members | 3,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

INSERT Through Pro*C in UTF 8 DB

Hi,

I have a table that contains a huge number of fields, out of which
3 are VARCHAR2(2000). I am using a Orcale 9i with UTF8 char set. The
data I am trying to insert is ASCII (English). When I try using a
Pro*C program to insert the data, it fails, giving the error
ORA-01461.
My data is not longer than 2000 char. It neither contains any
multibyte character. Why does this happen?

If I try to insert one of the 3 VARCHAR2 columns only, it works fine.

If I use the same Pro*C program to insert the same data into the same
table in non-UTF8 database, it inserts perfectly.

Incidently, I tried changing the columns from VARCHAR2(2000) to CLOB.
Then the program works fine.

Do I need to use CLOB? As long as my data contains single byte
characters, why should I increase my column length?

Thanks in advance.

- Anoop
Jul 19 '05 #1
1 5412
Anoop wrote:
Hi,

I have a table that contains a huge number of fields, out of which
3 are VARCHAR2(2000). I am using a Orcale 9i with UTF8 char set. The
data I am trying to insert is ASCII (English). When I try using a
Pro*C program to insert the data, it fails, giving the error
ORA-01461.
My data is not longer than 2000 char. It neither contains any
multibyte character.
Are you sure about that? Any non-7 bit ASCII character could be
interpreted as multibyte character.

BTW - use varchar2(2000) CHAR as definition. The default is BYTE.
If this change makes your problem disappear, you had "extended ASCII"
characters, that are actually multibyte in UTF.

Why does this happen?
If I try to insert one of the 3 VARCHAR2 columns only, it works fine.

If I use the same Pro*C program to insert the same data into the same
table in non-UTF8 database, it inserts perfectly.

Incidently, I tried changing the columns from VARCHAR2(2000) to CLOB.
Then the program works fine.

Do I need to use CLOB? As long as my data contains single byte
characters, why should I increase my column length?


All points to the fact you may have multibyte characters (which
cold be single byte in, say WE8MSWIN1252)
--

Regards,
Frank van Bortel

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
2445
by: CJM | last post by:
I have the following SP: CREATE PROCEDURE Orders_CreateOrder @CustomerID int, @LocationID int, @CustOrderNo varchar(20), @OrderDate smalldatetime AS Insert into Orders (CustomerID, LocationID, CustOrderNo, OrderDate)
0
1858
by: Oliver G | last post by:
Hello, we have Problems to recompile a old Version of a Serviceprogramm written in Visaul C++ 6. Now we have a 9.2.0.1.0 DB with a VS.NET 2003. All we wanna do is call a Procedure with an insert into a Table. like this: EXEC SQL EXECUTE BEGIN SP_TRACER(:cProcName, :TraceFehlerNr, :TraceLevelNr,
2
3940
by: Display Name | last post by:
I can't insert an image using the "add a new stylesheet" function- the function, on dreamweaver MX (i'm on Windows 2k Pro) seems to work as it generates the code... but the image never shows up in the background. I've tried it on multiple HTML pages. I've even tried taking the BG image out and seeing if just setting a black BG color works -...
2
1766
by: Peter Parker | last post by:
Hi All, I'm going to be doing some .net development work on Windows XP Pro for the first time, having done all my work so far on Windows 2000 Advanced Server. Are there any restrictions on .net stuff on XP Pro that I should know about? I ask for two reasons: a couple of years ago I was doing asp 3.0 work on a Windows 2000 Professional...
11
9169
by: Sezai YILMAZ | last post by:
Hello I need high throughput while inserting into PostgreSQL. Because of that I did some PostgreSQL insert performance tests. ------------------------------------------------------------ -- Test schema create table logs ( logid serial primary key, ctime integer not null,
4
11896
by: souravmallik | last post by:
Hello, Is there any way to improve performance of an after insert trigger in bulk insert. I have a pro*c program that insert data in a stagging table in bulk insert mode. From stagging table I have to insert to the source table synchronously. So I'm inserting data through pl/sql fired by the table trigger. But the trigger is inserting...
8
4602
by: CaptainCrazyHat | last post by:
Greetings! I currently have a table named 2008-01-30. I would like to insert a new field, and I would like that field to be in a Date format and have it populated with the table name. I'll be using this macro on multiple tables. I don't know how to pull from the table name, so I thought I'd try just getting it to insert the column/field...
1
240
by: Anoop | last post by:
Hi, I have a table that contains a huge number of fields, out of which 3 are VARCHAR2(2000). I am using a Orcale 9i with UTF8 char set. The data I am trying to insert is ASCII (English). When I try using a Pro*C program to insert the data, it fails, giving the error ORA-01461. My data is not longer than 2000 char. It neither contains any...
3
9373
by: Kunal Desale | last post by:
Hi, How to insert/update data in foxpro table field having datatype MEMO using Linked Server? I have written sql insert queries in which i have used linked server to insert data into foxpro tables. Some fields have datatype Memo and in these fields my data is not getting inserted/updated. My queries contains local tables & dbf tables...
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4757
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.