Home » Infrastructure » Windows » VB and Oracle Server connection problem.
VB and Oracle Server connection problem. [message #99948] Sat, 25 May 2002 05:37 Go to next message
Jamal
Messages: 15
Registered: March 2002
Junior Member
My oracle server is win2k server and client computer is win2kPro.I can connect to oracle server from my client using SQL+(User=Scott;Password=tiger;HostString=ClientMachine Name). But when I trying to connect ADO using connection string thru oracle driver,It can't connect and message is ' ORA-12514 TNS:Listener cannot resolve service name '.I need help on how to connect VB client machine with oracle server.
I want to know about ODBC configuration also.

Waiting for help.
Thanks
Re: VB and Oracle Server connection problem. [message #99950 is a reply to message #99948] Mon, 27 May 2002 08:07 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
hello!
hostring should be equal to servicename ( from tnsnames.ora) which is an aggregation of machinename:ntwork protocol:portname.

seems your servicename is not properly configured or you are not giving properinformation to ADO.
pls check it out.

easiest way is go to net8 easy configuration and create a new connect string.
Re: VB and Oracle Server connection problem. [message #99955 is a reply to message #99950] Tue, 28 May 2002 03:01 Go to previous messageGo to next message
Jamal
Messages: 15
Registered: March 2002
Junior Member
Now I can connect the ADO with orcale server.I was making mistake.Can ano one give me code to connect to oracle server.

Thanks
Re: VB and Oracle Server connection problem. [message #99998 is a reply to message #99950] Wed, 12 June 2002 09:32 Go to previous messageGo to next message
krahuman
Messages: 18
Registered: January 2002
Junior Member
1.create system dsn in controlpanel
2. add ms ado control component from the components lis in vb

3. add 2 text boxes.
name them as txt_no,txt_name

4.
in the general_declaration

Dim adoconnection As ADODB.Connection
Dim adorecordset As ADODB.Recordset
Dim adoconnectstring

In the Form_Load

Set adoconnection = New ADODB.Connection
Set adorecordset = New ADODB.Recordset
adoconnectstring = "data source = dsnname; user id = userbane; password = password"

adoconnection.Open adoconnectstring
adorecordset.CursorType = adUseClient
adorecordset.Open "tablename(emp)", adoconnection, , , adCmdTable
txt_no = adorecordset.Fields("empno").Value
txt_name = adorecordset.Fields("emapname").Value

u will c something in execution
krahuman
Re: VB and Oracle Server connection problem. [message #100008 is a reply to message #99950] Sat, 15 June 2002 23:18 Go to previous messageGo to next message
Sharmin
Messages: 1
Registered: June 2002
Junior Member
I am also working in Database which is defined as

Database (Back end) - W2K Server (os)- Oracle Server
Application (Front End) - w98/ME -Visual basic 6

This provides an multiuser environment. My Question is -HOW CAN I PROVIDE CONNECTION BETWEEN VB AND ORACLE BY USING ADO? Mentionable that Database server is only one and application runs so many pc under LAN. Would anybody please help me? If possible, then please write in details code & procedure.
Thanks a lot.
Re: VB and Oracle Server connection problem. [message #100074 is a reply to message #99950] Tue, 09 July 2002 05:47 Go to previous messageGo to next message
ouazzani mehdi
Messages: 1
Registered: July 2002
Junior Member
vb + connection pour le reseau local
Re: VB and Oracle Server connection problem. [message #100155 is a reply to message #99950] Tue, 13 August 2002 00:35 Go to previous messageGo to next message
jophin
Messages: 1
Registered: August 2002
Junior Member
i can't cannect with oracle
Re: VB and Oracle Server connection problem. [message #100346 is a reply to message #99950] Wed, 30 October 2002 22:44 Go to previous messageGo to next message
Chowdary
Messages: 3
Registered: January 2002
Junior Member
conectio back end ado controle

how to connect the ado
Re: VB and Oracle Server connection problem. [message #100535 is a reply to message #99950] Sat, 08 February 2003 04:00 Go to previous messageGo to next message
shakhawat Hossain
Messages: 1
Registered: February 2003
Junior Member
Please Create A DSN with oracle odbc driver--
"data source name(Dsn)=? name,Service Name=? and userid=?"

take vb reference ado objects lybrary.

Then call the following procedure in form load.
---------------------------------------
Public Connect As New ADODB.Connection
Dim dbstr As String
Public Sub Oraconnection()
dbstr = "uid=shahin;pwd=shahin;dsn=oraHRMCS"
Connect.Open dbstr
Connect.CursorLocation = adUseClient

End Sub
-----------------------------------------
Re: VB and Oracle Server connection problem. [message #100866 is a reply to message #100008] Mon, 26 January 2004 18:14 Go to previous message
Kishore
Messages: 45
Registered: September 2000
Member
hello sir i am also having the same problem
HOW CAN I PROVIDE CONNECTION BETWEEN VB AND ORACLE BY USING ADO? Mentionable that Database server is only one and application runs so many pc under LAN.

So u please forword me if u get any answer from any one.

or if u solve this problem u please help to complete this.

thanking u

Kishore M.
Previous Topic: java.exe error
Next Topic: Batch file
Goto Forum:
  


Current Time: Fri Nov 22 13:51:12 CST 2024