We help IT Professionals succeed at work.
Get Started

Connection to oracle database not working in vb6 app?

tentavarious
tentavarious asked
on
378 Views
Last Modified: 2010-08-05
Experts this problem is puzzling me.  I have taken over an old vb app that uses the connection string below:
 conn = "Provider=MSDAORA.1;Password=apps;User ID=apps;Data Source=BOBCAT;Persist Security Info=True"  I had it working then all of a sudden it stopped working.  I tried switching connection strings to this:conn = "driver={Oracle in OraHome90};server=xxxxxx;uid=xxxx;pwd=xxxx;DBQ=xxxxxxxx;MTS=T, and  the application opens up but when I try to query the database I keep getting an unsupported parameter error.  I would like to use the first connection string because that's what the programmer before me used and it worked fine.  When I took over the application and put it on my system, I cannot get it to run consistently, any ideas?

Private Sub Main_Form_Load()
With Main
    .Calendar1.Visible = False
    .Combo1.ListIndex = 0
    .Option1.Value = True
    .Option5.Value = True
    .Option6.Value = True
    .Text1.Text = ""
    .Text2.Text = ""
 conn = "Provider=MSDAORA;Password=xxxs;User ID=xxxx;Data Source=xxxxxxxxx;Persist Security Info=True"
    'conn = "driver={Oracle in OraHome90};server=xxxxxx;uid=xxxx;pwd=xxxx;DBQ=xxxxxxxx;MTS=T;"
   
 
    Oracle_Ado_Logon
    .Label5.Caption = "BOBCAT"
    Order_Open_Dealer_Header
End With
End Sub

Public Sub Oracle_Ado_Logon()
On Error GoTo Errors
Set Cn = New ADODB.Connection
With Cn
    .ConnectionString = conn
    .Properties("Prompt") = adPromptNever
    .CursorLocation = adUseClient
    .Open
    Exit Sub
End With
Errors:
MsgBox "No Connection To The Database", vbCritical, "Database Connection Error"
End
End Sub
   
   
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE