flavio2000
asked on
Connecting in Oracle DB with VB.NET
Hi, i have to connect in Oracle9i database and i tried every type of samples that this site have but doesn´t work yet.
Now i tried with a OracleClient connection:
Dim StrSql As String
Dim MyConn As OracleConnection = New OracleConnection("User ID=USER;Password=PASS;Data Source=SERVERNAME")
MyConn.Open()
StrSql = "select * from DATABASE"
But when i Run the application, this is the error:
An unhandled exception of type 'System.EntryPointNotFound Exception' occurred in system.data.oracleclient.d ll
Additional information: Unable to find an entry point named OCIEnvCreate in DLL oci.dll
Could anyone help-me?
Sorry by my English, I´m a Brazilian and I´m learnig the language yet.
Now i tried with a OracleClient connection:
Dim StrSql As String
Dim MyConn As OracleConnection = New OracleConnection("User ID=USER;Password=PASS;Data
MyConn.Open()
StrSql = "select * from DATABASE"
But when i Run the application, this is the error:
An unhandled exception of type 'System.EntryPointNotFound
Additional information: Unable to find an entry point named OCIEnvCreate in DLL oci.dll
Could anyone help-me?
Sorry by my English, I´m a Brazilian and I´m learnig the language yet.
1. Right click project ... select properties
2. Click on General from left tree view
3. From output type combo choose console application.
4. change the code something like this.
Public Shared Sub Main()
Dim StrSql As String
Dim MyConn As OracleConnection = New OracleConnection("User ID=USER;Password=PASS;Data Source=SERVERNAME")
MyConn.Open()
StrSql = "select * from DATABASE"
End Sub
2. Click on General from left tree view
3. From output type combo choose console application.
4. change the code something like this.
Public Shared Sub Main()
Dim StrSql As String
Dim MyConn As OracleConnection = New OracleConnection("User ID=USER;Password=PASS;Data
MyConn.Open()
StrSql = "select * from DATABASE"
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had to install de Oracle9i client in my computer, after that, i had to configure the tnsnames.ora. Now it´s working!
tks.
tks.
U need a start point in your application. you should declare a public shared function. and make that a strat point.
Mean while is it a Windows forms or console application ?
==========================
The exception that is thrown when an attempt to load a class fails due to the absence of an entry method.
For a list of all members of this type, see EntryPointNotFoundExceptio
System.Object
System.Exception
System.SystemException
System.TypeLoadException
System.EntryPointNotFoundE
[Visual Basic]
<Serializable>
Public Class EntryPointNotFoundExceptio
Inherits TypeLoadException
[C#]
[Serializable]
public class EntryPointNotFoundExceptio
[C++]
[Serializable]
public __gc class EntryPointNotFoundExceptio
TypeLoadException
[JScript]
public
Serializable
class EntryPointNotFoundExceptio
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
Remarks
Represents the error that occurs when an attempt to load an Assembly fails due to the absence of an entry point.
For a list of initial property values for an instance of EntryPointNotFoundExceptio
Requirements
Namespace: System
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
Assembly: Mscorlib (in Mscorlib.dll)
See Also
EntryPointNotFoundExceptio