This discussion is archived
1 2 3 Previous Next 36 Replies Latest reply: Nov 13, 2012 10:34 AM by orafad Go to original post RSS
  • 15. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi Osama,
    Thank you very much for your help.
    I found out the Visual Studio is 32 bit in the processes.
    So, I need to downgrade my oracle 11g Personal Edition to 32 bit as well ?
    How to check whether my oracle 11g is 32 or 64 bit ? It didnt show in the processes.

    wayne
  • 16. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    rp0428 Guru
    Currently Being Moderated
    SELECT * FROM V$VERSION
  • 17. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi Sir,
    Thank you for your help.

    wayne
  • 18. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi,
    After I installed Oracle 11g Personal Edition 11.2.0.10, 32bit, I couldnt find the driver of ora11g_home1 in System DSN, Admin Tools, Data Sources(ODBC).
    I need to add this driver in order to connect VB and Oracle database, please advice accordingly, thanks.

    wayne
  • 19. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi Osama,
    Could you give me a help on below, thanks.

    After I installed Oracle 11g Personal Edition 11.2.0.10, 32bit, I couldnt find the driver of ora11g_home1 in System DSN, Admin Tools, Data Sources(ODBC).
    I need to add this driver in order to connect VB and Oracle database, please advice accordingly, thanks.


    wayne
  • 20. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    EdStevens Guru
    Currently Being Moderated
    Osama_mustafa wrote:
    Welcome to OTN


    Post
    Lsnrctl status
    One more time ....

    Repeat after me:

    ORA-12154 HAS NOTHING TO DO WITH THE LISTENER. WHEN YOU RECEIVE AN ORA-12154, THE REQUEST NEVER LEFT THE CLIENT. WHEN YOU RECEIVE AN ORA-12154 THE REQUEST NEVER REACHED THE LISTENER.

    I know you've read my blog post on this error. Please go read it again.
  • 21. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    EdStevens Guru
    Currently Being Moderated
    Osama_mustafa wrote:
    in your tnsnames.ora you are using host Name = localhost but in listener.ora you are using wayne which one is the right ???


    if the wayne is Right then modify tnsnames.ora
    Osama - do you you remember what causes an ora-12154? It means the service name requested was never found in the tnsnames.ora file. That being the case, the value of HOST or port in any of the entries that ARE in the tnsames has nothing to do with the error. The error is caused by the complete lack of the requested entry in the first place. I know for a fact you've read all my blog posts on this and have read most of my posts on OTN. So you should remember my analogy. The tnsnames.ora is like a telephone directory. Ora-12154 means when I wanted to call you I couldn't find an entry for you in the telephone directory. If that happens, do I fix it by editing someone else's entry (modify host=)? Do fix it by checking the telephone company's switchboard (check listener status)?
  • 22. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    EdStevens Guru
    Currently Being Moderated
    967313 wrote:
    Hi Osama,
    Thank you very much for your help.
    I found out the Visual Studio is 32 bit in the processes.
    So, I need to downgrade my oracle 11g Personal Edition to 32 bit as well ?
    No. You just need to install (into a seperate ORACLE_HOME) a 32-bit Oracle client. The word length of the client and database do not have to match, but within the client application stack they do have to match.

    How to check whether my oracle 11g is 32 or 64 bit ? It didnt show in the processes.

    wayne
  • 23. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    orafad Oracle ACE
    Currently Being Moderated
    >
    After I installed Oracle 11g Personal Edition 11.2.0.10, 32bit, I couldnt find the driver of ora11g_home1 in System DSN, Admin Tools, Data Sources(ODBC).
    For setting up ODBC data sources for 32-bit software on win x64, you need to go to C:\Windows\SysWOW64\odbcad32.exe.

    Answered around a billion times already on the 'net.
  • 24. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi Sir,
    Thank you very much for your help.
    Can I ask one question,
    Oracle 11g only can connect with Visual Studio 2010, how about VB 6.0 ?

    wayne
  • 25. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi Sir,
    After I installed VB6, I tried to link oracle 11g with ORACLE PROVIDER FOR OLEDB under VB6 by entering the data source : orcl, userid : system, and password.
    But, it prompted out Microsoft Data Link Error,
    TEST CONNECTION FAILED BECAUSE OF AN ERROR IN INITIALIZING PROVIDER.
    ORA-12154: TNS: COULD NOT RESOLVE THE CONNECT IDENTIFIER SPECIFIED

    Please give me a help, thanks.

    wayne
  • 26. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    sb92075 Guru
    Currently Being Moderated
    967313 wrote:
    Hi Sir,
    After I installed VB6, I tried to link oracle 11g with ORACLE PROVIDER FOR OLEDB under VB6 by entering the data source : orcl, userid : system, and password.
    But, it prompted out Microsoft Data Link Error,
    TEST CONNECTION FAILED BECAUSE OF AN ERROR IN INITIALIZING PROVIDER.
    ORA-12154: TNS: COULD NOT RESOLVE THE CONNECT IDENTIFIER SPECIFIED

    Please give me a help, thanks.

    wayne
    >
    Hi Sir,
    After I installed VB6, I tried to link oracle 11g with ORACLE PROVIDER FOR OLEDB under VB6 by entering the data source : orcl, userid : system, and password.
    But, it prompted out Microsoft Data Link Error,
    TEST CONNECTION FAILED BECAUSE OF AN ERROR IN INITIALIZING PROVIDER.
    ORA-12154: TNS: COULD NOT RESOLVE THE CONNECT IDENTIFIER SPECIFIED

    Please give me a help, thanks.

    wayne
    ORA-12154 ALWAYS only occurs on SQL Client & no SQL*Net packets ever leave client system
    ORA-12154 NEVER involves the listener, the database itself or anything on the DB Server.
    ORA-12154 occurs when client requests a connection to some DB server system using some connection string.
    TNS-03505 is thrown by tnsping & is same error as ORA-12154 thrown by sqlplus or others.
    The lookup operation fails because the name provided can NOT be resolved to any remote DB.
    The analogous operation would be when you wanted to call somebody, but could not find their name in any phonebook.
    The most frequent cause for the ORA-12154 error is when the connection alias can not be found in tnsnames.ora.
    The lookup operation of the alias can be impacted by the contents of the sqlnet.ora file; specifically DOMAIN entry.
    TROUBLESHOOTING GUIDE: ORA-12154 & TNS-12154 TNS:could not resolve service name [ID 114085.1]
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/
  • 27. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    CharlesHooper Expert
    Currently Being Moderated
    967313 wrote:
    Hi Sir,
    After I installed VB6, I tried to link oracle 11g with ORACLE PROVIDER FOR OLEDB under VB6 by entering the data source : orcl, userid : system, and password.
    But, it prompted out Microsoft Data Link Error,
    TEST CONNECTION FAILED BECAUSE OF AN ERROR IN INITIALIZING PROVIDER.
    ORA-12154: TNS: COULD NOT RESOLVE THE CONNECT IDENTIFIER SPECIFIED

    Please give me a help, thanks.

    wayne
    Wayne,

    Interfacing with an Oracle 11g database using VB 6 is very much like interfacing with an Oracle 11g database using the Excel macro scripting language. There are various examples on my blog that show how to connect to an Oracle database using either ODBC or the Oracle Provider for OLEDB in the Excel macro scripting language. I believe that this point was already covered in this thread, but a 32 bit application (like VB 6) will require the 32 bit Oracle client to be configured on the computer with an appropriate tnsnames.ora (and sqlnet.ora).

    I would advise downloading the 11.2.0.3 32 bit client from the My Oracle Support (MOS - formerly known as Metalink) site, if you have access to that site. The 11.2.0.1 client that may be downloaded without MOS access has problems with ODBC connectivity and may cause unnecessary oci-24550 errors. If you have MOS access, the 11.2.0.3 client is found in the disk 3 (p10404530_112030_platform_3of6.zip) download here:
    https://support.oracle.com/epmos/faces/ui/patch/PatchDetail.jspx?patchId=10404530

    You will need to perform a custom install of the client, and that custom install must include:
    Oracle ODBC Driver 11.2.0.x.0
    Oracle Provider for OLE DB 11.2.0.x.0

    In your VB 6 project, from the Project menu, select References. You then need to select one (and only one) of the following references (2.8 for Windows XP and above, 6.0 for Vista and above, 6.1 for Windows 7):
    Microsoft ActiveX Data Objects 2.8 Library
    Microsoft ActiveX Data Objects 6.0 Library
    Microsoft ActiveX Data Objects 6.1 Library

    A quick code example that shows how to connect to the database using the Oracle Provider for OLEDB in VB 6:
    Dim intResult as Integer
    Dim strDatabase As String
    Dim strUserName As String
    Dim strPassword As String
     
    Dim snpData As New ADODB.Recordset
    Dim dbDatabase As New ADODB.Connection 'Using the New keyword here rather than a separate Set statement may lead to slower performance
     
    strDatabase = "MyDB" 'From tnsnames.ora
    strUserName = "MyUserID"
    strPassword = "MyPassword"
     
    'Connect to the database
    'Oracle connection string
    dbDatabase.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=" & strDatabase & ";User ID=" & strUserName & ";Password=" & strPassword & ";ChunkSize=1000;FetchSize=100;"
     
    dbDatabase.ConnectionTimeout = 40
    dbDatabase.CursorLocation = adUseClient
    dbDatabase.Open
     
    If (dbDatabase.State <> 1) Or (Err <> 0) Then
        intResult = MsgBox("Could not connect to the database.  Check your user name and password." & vbCrLf & Error(Err), 16, "Oracle Connection Demo")
    End If
     
    'When finished, clean up
    If dbDatabase.State = 1 Then
        dbDatabase.Close
    End If
     
    Set snpData = Nothing
    Set dbDatabase = Nothing
    Charles Hooper
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.
  • 28. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi Sir,
    I encounter a serious issue in my visual basic(visual studio 2010).
    1. After installed the visual studio 2010 32bit, and oracle 11g Personal Edition, 32bit.
    I right clicked the Data Connections by add connections, I managed to see the oracle provider for OLEDB, and setup this connection called ODBC.orcl in VB 2010.

    2. After few days, I created tables in SQL*PLUS, under command prompt. (NOTED : I unable to access SQL Developer)
    3. Then, I checked the related tables in ODBC.orcl, but I couldnt find the tables where I created in SQL*PLUS.
    4. I tried to check the connection by change data source, I couldnt find Oracle Provider for OLEDB in Data Source, Visual Baisc 2010.
    5. I only can add.Net Framework Data Provider for Oracle, the only choice for oracle database connection.
    6. The tables in ODBC.orcl, such as emp, bonus, are not in SQL*PLUS.
    7. And the tables where I created in SQL*PLUS are not appear in ODBC.orcl, why ?

    First, why I couldnt see Oracle Provider for OLEDB in VB 2010 ? But I can see this when the first time I intalled.
    Second, I can confirm both are 32bit, I check this from processes,
    devenv.exe *32 (microsoft visual studio 2010)
    oracle.exe *32(oracle rdbms kernel executable)

    Please advice accordingly, thanks.

    wayne
  • 29. Re: Oracle 11g Personal Edition with Visual Basic(Visual Studio 2010
    970316 Newbie
    Currently Being Moderated
    Hi Sir,
    I installed oracle 11g Personal Edition, 11.2.0.1.0, so do I need to install oracle client for this version ? And, oracle 11g personal edition already included oracle provider for OLEDB, right ?
    For VB6, I need to install client, otherwise not able to connect oracle database ?

    Can I go to the below link and download client for personal edition,

    Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (32-bit)
    win32_11gR2_client.zip(684,581,290 bytes)
    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html

    And, the ODAC for visual studio,
    ODAC 11.2 Release 5 (11.2.0.3.20) with Oracle Developer Tools for Visual Studio or ODAC 11.2 Release 4 (11.2.0.3.0) with Oracle Developer Tools for Visual Studio
    http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html

    Please advice accordingly, thanks.

    wayne

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points