I
I
Illarion Labahua2017-09-18 09:58:07
Oracle
Illarion Labahua, 2017-09-18 09:58:07

Why the error "The specified provider cannot be found. it is probably installed incorrectly?

Attribute VB_Name = "NewMacros"
Sub REPORT_FOR_COUNTING()
Dim Conn As New ADODB.Connection, Cmd As ADODB.Command, rsOra As ADODB.Recordset
Conn.Open "PROVIDER=OraOLEDB.Oracle.1;DATA SOURCE=SVBO;USER ID=ADMIN_ILLARION ;PASSWORD=M1l2w3"
Set Cmd = New ADODB.Command
Cmd.ActiveConnection = Conn
Cmd.CommandType = adCmdText
Set rsOra = New ADODB.Recordset
rsOra.CursorLocation = adUseServer
rsOra.Open "select POS_COUNT from REPORT_FOR_COUNTING where INST_ID='9001'", Conn, adOpenForwardOnly
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "GagraPos"
.Replacement.Text = rsOra.Fields.Item(0).Value
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection .Find.Execute
Selection.TypeText Text:=rsOra.Fields.Item(0).Value
rsOra.Close
End Sub

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2017-09-18
@Dronablo

Obviously the Oracle OLEDB provider needs to be installed . Keep in mind that if you pull it from 32-bit Excel / Word, then you need the 32-bit version.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question