VB and Oracle Server connection problem. [message #99948] |
Sat, 25 May 2002 05:37 |
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 #99998 is a reply to message #99950] |
Wed, 12 June 2002 09:32 |
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 |
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 #100535 is a reply to message #99950] |
Sat, 08 February 2003 04:00 |
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 |
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.
|
|
|