Problems with oracle thin driver

Posted on 2003-03-03
Medium Priority
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.
Question by:bvsbabu

Expert Comment

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.  


Author Comment

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??

Expert Comment

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
Platform Intel Windows NT Platform Version 4.0
Database Version Affects Platforms  Generic
Priority Severe Loss of Service Status Closed, Not Verified by Filer
Base Bug N/A Fixed in Product Version

Problem statement:


*** 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              C. can not upgrade to 9.2 due to project restrictions. =========================     DIAGNOSTIC ANALYSIS:             Testcase works well if running against OLEDB provider.             Can successfull create stored procedure up to 130 Kbyte. . =========================    WORKAROUND:             use . =========================    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     3. List any versions in which the problem has not reproduced    =========================     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              Works Oracle ODBC              VB exits MS ODBC      2.573              Works . Oracle ODBC              VB exits . Oracle OLEDB              Works Oracle ODBC              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; *** 02/13/03 08:27 am *** I was able to reproduce the failure with ODBC but not with our  latest mainline code.  This may have been a duplicate of bug 2755525.
LVL 17

Expert Comment

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.

EE Cleanup Volunteer

Accepted Solution

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

E-E Admin

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
What we learned in Webroot's webinar on multi-vector protection.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

615 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