473,383 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to save excel file into oracle table

I need to save excel file data directely into oracle database by using XML string but getting error as

ORA-01704: string literal too long
01704. 00000 - "string literal too long"
*Cause: The string literal is longer than 4000 characters.
*Action: Use a string literal of at most 4000 characters.
Longer values may only be entered using bind variables.
Error at Line: 50 Column: 31
Please Help me ...
Apr 5 '13 #1
9 2730
r035198x
13,262 8TB
I'm assuming here that your column is already NOT varchar2 because that has a limitation on 4000 characters. If it is CLOB which can take 4gig then you still won't be able to send more than 4000 characters at a time. You should break it up into an insert followed by updates that append to the column until all the characters are written. Put that logic in a DB utility class.
Apr 5 '13 #2
Is der any option for CLOB or any other method to do the same in c#. Thanks r035198x for quick response.
Apr 5 '13 #3
r035198x
13,262 8TB
You can try with
Expand|Select|Wrap|Line Numbers
  1. using (OracleCommand cmd = new OracleCommand())
  2. {
  3. //setup command connection
  4. cmd.CommandType = CommandType.Text;
  5. cmd.CommandText = " insert into yourTable  values (:someParameter) ";
  6. OracleParameter oracleParameterClob = new OracleParameter();
  7. oracleParameterClob.OracleType = OracleType.Clob;
  8. oracleParameterClob.Value = "Your long text here";
  9. oracleParameterClob.ParameterName = "someParameterName";
  10. cmd.Parameters.Add(oracleParameterClob);
  11. cmd.ExecuteNonQuery();
  12. // ...
Apr 5 '13 #4
No its not working ... . Suggest Something .. other ..
Apr 8 '13 #5
r035198x
13,262 8TB
What does it's not working mean? Does it not compile? Do you get an exception? Put some effort into asking the question.
Apr 8 '13 #6
Thnks Got It Finally ... But Next Part Need to See.. it extract values
Apr 16 '13 #7
Got the same error .... i.e.
ORA-01704: string literal too long
01704. 00000 - "string literal too long"
*Cause: The string literal is longer than 4000 characters.
*Action: Use a string literal of at most 4000 characters.
Longer values may only be entered using bind variables.
Error at Line: 50 Column: 31
Apr 16 '13 #8
Rabbit
12,516 Expert Mod 8TB
It would help to see your code.
Apr 16 '13 #9
r035198x
13,262 8TB
Read my first reply in full again.
Apr 17 '13 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: I Decker | last post by:
Hi all, Hope this is the right group. I am writing a program in c# to open create an excel document, enter some data, save it and then email it as an attachment. I have successfully created...
2
by: Phoebe | last post by:
Hi, Good Day! Currently I have a few excel file storing different range of data. For eg. 1-100 in FileA; 101-200 in FileB; 201-300 in FileC...total 10 file. I'd like to save these set of data to...
2
by: shoa | last post by:
Hello all I open a template Excel file as following ----------------------------- im xlApp As Object Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet
0
by: michealmess | last post by:
I have an excel application which is using vb.net to import data into range names from a SQL database. My users could be using any version of Excel so I am using late binding in vb.net with no...
1
by: huseinv | last post by:
Hi. I have a search tool which gives data in listing format and grid format (based on selection) on the same asp page. If a user select grid, the result is listed in grid format. Now how i can...
0
by: =?Utf-8?B?Tml5YXpp?= | last post by:
Hi all, Does anyone know how to embed the Excel file in VB.NET 2005 Resources? Here is what I am doing at the moment: 1) In my VB.NET 2005 project code I load the excel with it path into...
1
by: Userdom | last post by:
Hi, I need to charge the list of employees from excel sheet that I Have in C:\ directory to oracle table and I need to do this every day at specific hour is like insert and update from excel to...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
5
by: maryanncanor | last post by:
Hi, I have an input excel file that needs to be imported to Table1. However, the fieldnames or header in the excel file doesnt match the fieldnames in the database. The fieldnames in the excel file...
4
by: goodamr | last post by:
Hi, I have many Excel files (more than 200 files). I'm using TOAD to import the Excel files into the Oracle table, but this process is boring and time-consuming especially for this huge number of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.