?
Solved

Problems with oracle thin driver

Posted on 2003-03-03
5
Medium Priority
?
431 Views
Last Modified: 2012-08-13
Hi.. All

I am facing hell of problems while executing the insert query.

I am creating a string constructor like the following..

String str = new String("insert query of length 4042");

This insert query is like this INSERT INTO TABLE_NAME (COL1...COL196)VALUES(1,..196); All the columns are strings only.

If the length of the query string is < 4042 or > 4042..it is executing properly.. If the length is equal to 4042 then the program is hanging up..

It is giving problems only if I am using oracle thin driver..Otherwise it is working ok with normal jdbc:odbc driver.

Please help me out.
0
Comment
Question by:bvsbabu
[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
5 Comments
 
LVL 4

Expert Comment

by:iozturk
ID: 8056777
Heh he! you traped a bug.
Go metalink.oracle.com then seach 2786533 (BUG NO).

I have traped it with VB and Oracle assinged a bug  for it. You may resolve the problem by using JDBC thin driver.  


0
 

Author Comment

by:bvsbabu
ID: 8074365
I am not an employee of oracle group. I am not able to register to metalink.oracle.com. please tell me what do I need to do??
0
 
LVL 4

Expert Comment

by:iozturk
ID: 8078007
Here is Oracle document for the bug. It seems similar. You may by pass your problem with adding spaces if its length = 4042.
What if your query string lenght >4200?

Bug No. 2786533
Filed 05-FEB-2003 Updated 13-FEB-2003
Product Oracle ODBC Driver Product Version  8.1.7.4
Platform Intel Windows NT Platform Version 4.0
Database Version 8.1.7.4 Affects Platforms  Generic
Priority Severe Loss of Service Status Closed, Not Verified by Filer
Base Bug N/A Fixed in Product Version 9.2.0.4.0

Problem statement:

VB INTERPRETER CRASHES IF RUNNING A CREATE PROCEDURE STATEMENMT < 4200 BYTES
--------------------------------------------------------------------------------


*** 02/05/03 12:24 am *** =========================     PROBLEM: .  1. Clear description of the problem encountered:             VB interpreter crashes if running a create procedure statemenmt             with a length of about 4.200 Bytes.   2. Pertinent configuration information (MTS/OPS/distributed/etc)             N/A  3. Indication of the frequency and predictability of the problem               Every time testcase runs  4. Sequence of events leading to the problem               Build a VB project and run testcase  5. Technical impact on the customer. Include persistent after effects.             C. needs a solution for 8.1.7.4.              C. can not upgrade to 9.2 due to project restrictions. =========================     DIAGNOSTIC ANALYSIS:             Testcase works well if running against 9.2.0.2 OLEDB provider.             Can successfull create stored procedure up to 130 Kbyte. . =========================    WORKAROUND:             use 9.2.0.2 . =========================    RELATED BUGS:             none        =========================    REPRODUCIBILITY: .  1. State if the problem is reproducible; indicate where and predictability             yes, everytime  2. List the versions in which the problem has reproduced             8.1.7.4  3. List any versions in which the problem has not reproduced             9.2.0.2 =========================     TESTCASE: Private Sub Command1_Click()    Dim myconn As ADODB.Connection    Dim fso As Scripting.FileSystemObject    Dim f As Scripting.TextStream    Dim f1 As Scripting.TextStream    Dim sql As String    Set myconn = New ADODB.Connection    myconn.Open constr        Set fso = New Scripting.FileSystemObject    Set f = fso.CreateTextFile("c:\sil.txt")    sql1 = "create or replace function fff1 return number is " & _           "a number(1); begin a:=3; "    'sql = ""    dum = ""    For i = 1 To 62       dum = dum & "--  ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" & vbCrLf       'sql = sql1 & dum & "return a; end;" & vbCrLf       sql = sql1 & dum & "return a; end;"       Set f1 = fso.CreateTextFile("c:\sil.sql", True)       f.WriteLine Len(sql)       f1.Write sql       f1.Close       'myconn.Execute sql    Next        myconn.Execute sql    f.Close    myconn.Close    Set myconn = Nothing End Sub . . ======================== STACK TRACE:       N/A . =========================    SUPPORTING INFORMATION: . . 24 HOUR CONTACT INFORMATION FOR P1 BUGS: . . =========================     DIAL-IN INFORMATION:        N/A . =========================     IMPACT DATE:       next 2 month *** 02/05/03 01:04 am *** (CHG: Asg-&gt;NEW OWNER) *** 02/05/03 03:51 am *** (CHG: Sta-&gt;10) *** 02/05/03 03:51 am *** For in-line code to compile need to add MS ADO Objects Library and MS  Scripting Runtime to project references. . Looking at the testcase it isn't actually using OLEDB, it's using ODBC.   Amended code so you can connect via either depending on what is  commented/uncommented and uploaded testcase to ess30. . Testing: . Product/Version         Client Version         Result ------------------------------------------------------------------- Oracle OLEDB 9.2.0.2    9.2.0.2.1              Works Oracle ODBC  9.2.0.3    9.2.0.2.1              VB exits MS ODBC      2.573      8.0.6.3.6              Works . Oracle ODBC  9.0.1.5    9.0.1.4.0              VB exits . Oracle OLEDB 8.1.7.3    8.1.7.4.1              Works Oracle ODBC  8.1.7.8    8.1.7.4.1              VB exits . So there is a problem is all versions of the Oracle ODBC driver but no problem  with OLEDB.  Since this bug has been logged against OLEDB though can you  please check whether the customer is using OLEDB or ODBC - if you do not  specify a provider the default is ODBC.  See my uploaded testcase if you are  unsure how to switch.  The bug also says that the problem is not reproducible  in 9.2 which for me it is.  Can you therefore also provide the versions of  ODBC you are using in both 8.1.7 where you've reproduced and 9.2 where you  have not.  Can the customer use OLEDB as a workaround? *** 02/13/03 06:00 am *** (CHG: Sta-&gt;11 Asg-&gt;NEW OWNER) *** 02/13/03 06:00 am *** As there has been no response and this is clearly a problem with odbc only and  in all the latest versions, switching product to odbc and passing to  Development. *** 02/13/03 08:27 am *** (CHG: Sta-&gt;93) *** 02/13/03 08:27 am *** (CHG: Fixed-&gt;9.2.0.4.0) *** 02/13/03 08:27 am *** I was able to reproduce the failure with ODBC 9.2.0.3.0 but not with our  latest mainline code.  This may have been a duplicate of bug 2755525.
0
 
LVL 17

Expert Comment

by:walterecook
ID: 10322915
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

walterecook
EE Cleanup Volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10361035
PAQed, with points refunded (100)

Computer101
E-E Admin
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Suggested Courses

765 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