Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection to Oracle D/B not working

Status
Not open for further replies.

MarcelBeals

Programmer
Mar 29, 2000
18
CA
Hello,<br><br>I am running VB 6.0 and NT 4.0.&nbsp;&nbsp;I can get my VB application to work on Win 95 but not on NT 4.0.<br><br>Is there something special that I need to install or include when I package my application for NT 4.0?<br><br>Is there anyone out there working on such a system?<br><br>I can access the Oracle D/B using SQL*NET and I can PING the D/B from DOS.<br><br>Marcel.
 
So, you are able to do a TNSPING80 ?&nbsp;&nbsp;And I'm guessing that you've set up the ODBC/ADO/DAO/XYZ123 datasource needed?<br><br>Umm. dumb question. You did install MDAC on the NT machine, right?<br><br>Chip H.<br>
 
I was able to TNSPING and the ODBC setup is working fine.<br>I loaded a previous version of my application (DAO) and it worked fine.&nbsp;&nbsp;When I uninstall everything and install the new application (ADO) I get the unable to connect error on the curConnection.OPEN string, password, username.<br>I installed the MDAC 2.1.<br>Is there anything else that I am missing?<br>Marcel.
 
What error message do you get Marcel? <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
I get an error 1200: DB OPEN.&nbsp;&nbsp;This is a error from my application (User Programmed Error).<br>The following is the code I am using.&nbsp;&nbsp;We have an Oracle D/B on a Unix platform running NT 4.0 SP5.<br><br>Public Sub DBOpenConnection()<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim ConnectionString As String<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim ConnectionUserName As String<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim ConnectionPassword As String<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;Set curConnection = New ADODB.Connection<br>&nbsp;&nbsp;&nbsp;&nbsp;Set curCommand = New ADODB.Command<br><br>&nbsp;&nbsp;&nbsp;&nbsp;On Error GoTo ErrorHandler<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;ConnectionString = &quot;DSN=&quot; & Trim(strOracleDSN) _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& &quot;;UID=&quot; & Trim(strOracleLogonName) _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& &quot;;PWD=&quot; & Trim(strOraclePassword)<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;ConnectionUserName = &quot;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;ConnectionPassword = &quot;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;curConnection.Open ConnectionString,ConnectionUserName, ConnectionPassword<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>Set curCommand.ActiveConnection = curConnection<br>&nbsp;<br>Exit Sub<br>ErrorHandler:<br>&nbsp;&nbsp;&nbsp;&nbsp;lngErrNumber = 1200<br>&nbsp;&nbsp;&nbsp;&nbsp;strErrSource = &quot;DB: Open Connection&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;strErrMessage = FillErrMessage<br>&nbsp;&nbsp;&nbsp;&nbsp;Err.Number = lngErrNumber<br>&nbsp;&nbsp;&nbsp;&nbsp;Err.Source = strErrSource<br>&nbsp;&nbsp;&nbsp;&nbsp;Err.Description = strErrMessage<br>&nbsp;&nbsp;&nbsp;&nbsp;Err.Raise lngErrNumber<br>End Sub<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top