PDA

Click to See Complete Forum and Search --> : connecting to Oracle Database


edellavedova
Apr 10th, 2000, 02:36 AM
When connecting to an Oracle Database from VB, do I need to install SQLNet on the client machine, or can I just use ODBC? If I can just use ODBC, then I'm doing something wrong and could use some assistance.

Thanks,

Eric

Jaguar
Apr 12th, 2000, 02:48 AM
This is how I do it using ADO (MDAC 2.5) And NO SQL Net doesn't need to be installed. I put MDAC 2.5 Redistribution file in:

Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist

directory and then run the Package and Deployment Wizard and it installs everything for you.

Make sure though, you reboot after doing and installation because the MDAC setup must register and setup MDAC stuff from a reboot our it won't work until you do reboot.

strConn = "Provider=MSDAORA.1;User ID=Usr/Pwd;Data Source=ServerName"

oConn.Open strConn

edellavedova
Apr 12th, 2000, 08:25 PM
Thanks for the help. Yes, I'm using ADO. Please forgive my ignorance, but is the MDAC 2.5 you discuss the MDAC_Type.exe that gets included in a package whey you use the deployment wizard?

Also, when you put the server name in the connect string, what is the syntax. For example, if the Oracle database is called obpt, how does the client know to find this?

Thanks.

Serge
Apr 12th, 2000, 10:19 PM
In order for you to connect to Oracle database, you would need Oracle client to be installed.

Jaguar
Apr 13th, 2000, 03:29 AM
Yes, the MDAC_TYPE.EXE is the filename, and you need to look at the Properties|Version information of that file to make sure you are using the right file. It's about 7.6 MB in size.

BTW:
I found this information in
<drive>:\program files\
common files\system\ado\MDACReadMe.txt

"The release notes for each of the Microsoft Data Access Components can be found in the following locations:

Oracle ODBC Driver
<drive>:\<windir>\<system>\MsOracle32Readme.txt"

*** especially look at this thoroughly

<drive>:\Program Files\
Common Files\system\ado\MDACReadme.htm

This will tell you what you need to do and what is required.

Apr 26th, 2000, 04:26 PM
Hi, I am new to this forum. I am currently using VB to write an ActiveX program that connects to an Oracle Server. Referring to what Serge said, it is a must to install Oracle client to the client machine. However, is it possible to ask the ActiveX control to download the necessary files for "OLE DB Provider for Oracle" and write the registry in the client computer directly? If yes, what will be the "necessary files" for "OLE DB Provider for Oracle" and how can an ActiveX transfer those files from the server to the client machine? Thanks in advance.

Eddy
Apr 26th, 2000, 11:42 PM
well, since that you guys have been discussing about oracle, I've done a program using oracle in NT and yes, I have to install the oracle for workstation. What I would like to know is that, how can I detect/know which files are required for each workstation so that I can create a standard setup program via Package & Deployment facility?