Avatar of Alfredo Luis Torres Serrano
Alfredo Luis Torres Serrano
Flag for United States of America asked on

oracle 8i with vs 2005

Hi esperts,

  I had been trying many differents ways with this:

        I have Visual Studio 2003,2005 And 2008.
        I work at Visual Basic, In the company they have a Remote server with Oracle 8i.
        I have downloaded and installed Oracle for .Net providers 9,10g and 11g without any solutions.

       What i need is nomatter how is to connect Visual Studio to open a databse throu an SQL query in oracle to obtain a recordset in a datareader or to execute a SQL without any return.

     Any help or onyone experienced on this issue.

    The points will be assigned once the conneciton is made.
Thanks in advance for your help
 
Something like this:
 
        Dim oradb As String = "Data Source=Server IP ;User Id=MyId;Password=MyPassword;"
        Dim con As New Oracle.DataAccess.Client.OracleConnection
        con.ConnectionString = oradb
        con.Open()

Open in new window

Oracle DatabaseEnterprise Software.NET Programming

Avatar of undefined
Last Comment
Alfredo Luis Torres Serrano

8/22/2022 - Mon
Sean Stuber

Data Source isn't the server's ip address, it is the TNS connect string

usually that's the database name

check your oracle home's   TNSNAMES.ORA file  if you use tnsnames,  if you use ldap or onames you'll need to check those (ask your dba) for the connect strings.
Alfredo Luis Torres Serrano

ASKER
The problem is not in the conection string this is not then question focus i have use the tns coneciton string also.

Those strings are over all the internet and there is no need to ask to the DBA, I am the DBA in the company.

Thanks any way
Sean Stuber

what happens when you use the proper tns alias?

what is the error?
Your help has saved me hundreds of hours of internet surfing.
fblack61
Alfredo Luis Torres Serrano

ASKER
ORA-00604: error occurred at recursive SQL level %s

This is the error
Alfredo Luis Torres Serrano

ASKER
And this is the con string

Conn.ConnectionString = "Data Source=(DESCRIPTION =(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(PORT = 1521)(HOST = 159.182.43.14)))(CONNECT_DATA =(SERVICE_NAME = orc1)));User Id=consulta;Password=eminente"

If you ask i also probe

Conn.ConnectionString = "Data Source=(DESCRIPTION =((ADDRESS=(PROTOCOL=TCP)(PORT = 1521)(HOST = 159.182.43.14)))(CONNECT_DATA =(SERVICE_NAME = orc1)));User Id=consulta;Password=eminente"

With the same result

Also receive ORA-3134,ORA-12504,ORA-12705

        Dim Conn As Client.OracleConnection = New Client.OracleConnection()
        Conn.ConnectionString = "Data Source=(DESCRIPTION =(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(PORT = 1521)(HOST = 159.182.43.14)))(CONNECT_DATA =(SERVICE_NAME = orc1)));User Id=consulta;Password=eminente"
        'Conn.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(PROTOCOL=TCP)(HOST=159.182.43.14)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orc1)));User Id=consulta;Password=eminente;"
        Conn.Open()

Open in new window

Alfredo Luis Torres Serrano

ASKER
I did a last try at least for me.

I have installed Oracle Development Provider for .Net 10G that is for VS 2005.

Created a reference to the oracle.dataaccess.dll

Create a project when i try to create the object

Dim Conn As Oracle.DataAccess.Client.OracleConnection = New Oracle.DataAccess.Client.OracleConnection

I receive an exception with this stackrace:

   en Oracle.DataAccess.Client.OracleConnection..ctor()
   en PruebaORa.Form1.Form1_Load(Object sender, EventArgs e) en C:\Documents and Settings\altor\Mis documentos\Visual Studio 2005\Projects\PruebaORa\PruebaORa\Form1.vb:línea 4
   en System.EventHandler.Invoke(Object sender, EventArgs e)
   en System.Windows.Forms.Form.OnLoad(EventArgs e)
   en System.Windows.Forms.Form.OnCreateControl()
   en System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   en System.Windows.Forms.Control.CreateControl()
   en System.Windows.Forms.Control.WmShowWindow(Message& m)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   en System.Windows.Forms.ContainerControl.WndProc(Message& m)
   en System.Windows.Forms.Form.WmShowWindow(Message& m)
   en System.Windows.Forms.Form.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   en System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
   en System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   en System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   en System.Windows.Forms.Control.set_Visible(Boolean value)
   en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   en System.Windows.Forms.Application.Run(ApplicationContext context)
   en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   en Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   en PruebaORa.My.MyApplication.Main(String[] Args) en 17d14f5c-a337-4978-8281-53493378c1071.vb:línea 81
   en System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   en System.Threading.ThreadHelper.ThreadStart()

If you have the solution please let me know if not i will ask for refund and delete due to no solution.

Thank
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Alfredo Luis Torres Serrano

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.