Anthony Matovu
asked on
opening a oracle database through vb.net
I am trying to open a oracle database through vb.net but I get the message below.
below is my code
Dim oradb As String = "Data Source=(DESCRIPTION=(ADDRE SS=(PROTOC OL=TCP)(HO ST=xxxxx)( PORT=1521) ) (CONNECT_DATA=(SERVICE_NAM E=bibpt1)) ); User Id=userid;Password=pw;"
Dim conn As New OracleConnection(oradb)
conn.Open()
Could not load file or assembly 'Oracle.DataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c 47342' or one of its dependencies. An attempt was made to load a program with an incorrect format
below is my code
Dim oradb As String = "Data Source=(DESCRIPTION=(ADDRE
Dim conn As New OracleConnection(oradb)
conn.Open()
Could not load file or assembly 'Oracle.DataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed."
Thank you for your help
Dim connectionString As String = "Data Source=ThisOracleServer;In
Dim queryString As String = "SELECT served_msisdn_nr FROM BIB_ADHOC.vw_marketing_dat
Using connection As New OracleConnection(connectio
Dim command As OracleCommand = connection.CreateCommand()
command.CommandText = queryString
Try
connection.Open()
Dim dataReader As OracleDataReader = _
command.ExecuteReader()
Do While dataReader.Read()
Console.WriteLine(vbTab & "{0}" & vbTab & "{1}", _
dataReader(0), dataReader(1))
Loop
dataReader.Close()
Catch ex As Exception
Console.WriteLine(ex.Messa
End Try