|
-
April 13th, 2001, 06:02 AM
#1
VB6 and ORACLE
I am trying to connect VB6 ( Professional Edition ) to Oracle Enterprise Version using Microsoft ODBC for Oracle.
Oracle is installed on server "Serv1".
I created a Data Source on the Client ( where VB6 is insttaled ) giving all details like Data Source name, Description , User Name and Server Name.
When I am trying to connect to Oracle it is not sucessful. For that I am simply trying to create a form using Data wizard ( which in turn uses ADO ).
Is there any known problem for this ?
-
April 13th, 2001, 07:08 AM
#2
Re: VB6 and ORACLE
For the current Oracle ODBC Driver from Microsoft:
oConn.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=OracleServer.world;" & _
"Uid=demo;" & _
"Pwd=demo;"
For the older Oracle ODBC Driver from Microsoft:
oConn.Open "Driver={Microsoft ODBC Driver for Oracle};" & _
"ConnectString=OracleServer.world;" & _
"Uid=demo;" & _
"Pwd=demo;"
do not forget to set reference to ADO library
Iouri Boutchkine
[email protected]
-
April 14th, 2001, 01:11 AM
#3
Re: VB6 and ORACLE
Hi,
Thanks for the reply.
We are testing out the connection using Data Wizard.
When we create a new data source from 32bit ODBC in Control Panel What is the server name to be specified? Is it the Windows NT Server name or Oracle Server name?
Also when using form data wizard for creating a form we again specify a data source name , uid and password. What uid and Password is this ? Is it my Oracle database uid/pwd OR Oracle server uid/pwd OR Windows NT server uid/pwd ? The help says specify uid/pwd for connecting to the data source. What does this mean?
I know these are very basic question but this is the first time I am trying to use Oracle Enterprise version on the Network ( 7.2 ).
Thanks and would be grateful for the replies
-
April 14th, 2001, 04:11 PM
#4
Re: VB6 and ORACLE
Hello:
The server, userid and password is Oracle server, usedid, and password.
Here is my code that I use at home to access Oracle from Visual Basic:
Private Sub Command3_Click()
Adodc1.ConnectionString = "Provider=MSDAORA. 1;Password=" & Text2.Text & ";User ID=" & Text1.Text & ";Persist Security Info=True"
Adodc1.CommandType = adCmdUnknown
End Sub
I do not have a server at home but I know Oracle on network has server.
Second line of code will allow you to see if you gain access to Oracle.
Private Sub Command2_Click()
Adodc1.RecordSource = "Select " & Text3.Text & _
" from " & Text4.Text & _
" WHERE " & Text5.Text & "=" & Text6.Text
Adodc1.Refresh
End Sub
Good Luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|