Solved

ORA-12537 while connecting ORACLE with an VISUAL BASIC exe file when the file name is too long.

Posted on 2004-04-04
6
3,829 Views
Last Modified: 2013-12-12
Hi
I have two Oracle databases. 1st one is PROD, 2nd is CARD. Version of DBs are 8.1.7.4.0   .My Tnsnames.ora file is at bottom

I developed a Visual Basic project to acess this both DBs. I used ADODB 2.5 for connection. (Source code at bottom)

i'm trying to connect both databases in VB design screen. I'm connecting to CARD but i can't connect to PROD. I'm getting "Run time error -2147467259 (80004005) ORA-12537: TNS:connection closed" error

on the other hand when i compile this file and give a name like 'test.exe' this executable file is connecting both databases

if i rename the file name to 'test1234567890123456.exe' (filename length is 20 or longer) i can connect just to CARD but getting same error from PROD connection.
When I copy test.exe file to my desktop, rename it to test123456.exe (length 10 or longer) i'm getting same error.

I'm using Windows XP and Windows 2000

What is the problem with my PROD database or with my VB code??



MY VB CODE is
Private Sub Command1_Click()
    Dim sSQL As String
    Dim oRs As ADODB.Recordset
    Dim sProvider As String
    Dim oConn As ADODB.Connection
    Set oConn = CreateObject("ADODB.Connection")
    Set oRs = CreateObject("ADODB.Recordset")
    sProvider = "Provider=MSDAORA.1;Password=pass;User ID=myuserid;Data Source= PROD ;Persist Security Info=True"
    oConn.Open sProvider
    oRs.CursorLocation = adUseClient
    sSQL = "select * from DIVISIONS"
    oRs.Open sSQL, oConn, adOpenDynamic, adLockBatchOptimistic
    Set oRs = Nothing
    Set oConn = Nothing
 End Sub


My tnsnames.ora file is

PROD.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = TCP)
          (Host = 10.1.1.1)
          (Port = 1521)
        )       )
    (CONNECT_DATA = (SERVICE_NAME = PROD)
                    (SERVER=DEDICATED)          )  )

CARD.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = 10.1.1.2)
          (Port = 1521)
        )    )
    (CONNECT_DATA = (SERVICE_NAME = CARD)
    )  )

0
Comment
Question by:akmustafa
6 Comments
 
LVL 2

Expert Comment

by:syed555
ID: 10751546
Do you have firewall in PROD server?
0
 

Author Comment

by:akmustafa
ID: 10752823
Yes.
But both of DBs are behind same firewall.
0
 
LVL 47

Expert Comment

by:schwertner
ID: 10755324
Set USE_SHARED_SOCKET to FALSE in the registry.
Warning :
Setting this parameter will prevent to connect through a firewall which has no
SQL*Net proxy built-in.
0
 

Author Comment

by:akmustafa
ID: 10756662
Will I do this in my computer?

What is the full aaddress of this key?
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 11020045
PAQed, with points refunded (500)

GhostMod
Community Support Moderator
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now