Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle OLEDB Provider
I know there is Microsoft KB article on this but I couldn't get onto
it...
Check...
http://support.microsoft.com/search/default.asp
You may also want to consult
www.universalthread.com
In article <7stk0n$pvm$1_at_pacifica.access.ch>,
"Paul O. Schenker" <poschenker_at_access.ch> wrote:
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_000B_01BF0AB5.3A155C60
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Hi everybody,
>
> On a LAN and WAN (by ISDN Router) I am trying to get connected to =
> different Oracle8i Databases by Visual Basic Code (6.0 SP 3, on
Windows =
> NT/4 SP5, with Microsoft Data Access 2.1). And the following code
works =
> fine, since it does not make use of the Remote Provider:
>
> gsADOConnect =3D "Provider=3DMSDAORA.1;Password=3D" & gsPassword &
=
> ";" & _
> "User ID=3D" & gsUserName & ";Data Source=3D" & gsHostString & =
> ";Persist Security Info=3Dfalse"
> Set cnn =3D New ADODB.Connection
> With cnn
> .Provider =3D "MSDAORA.1"
> .ConnectionString =3D gsADOConnect
> .CursorLocation =3D adUseClient
> .Open
> End With
> If cnn.State =3D adStateOpen Then
> ...
> end if
>
> However, if I want to do the same with the following code, I keep =
> getting error messages like: "ORA12154: TNS: could not resolve service
=
> name."
>
> Set cnn =3D New ADODB.Connection
> With cnn
> .ConnectionTimeout =3D 60 '=3D 60 seconds
> .CursorLocation =3D adUseClient
> .Open "Provider=3DMS Remote;Remote Provider=3DMSDAORA;Data =
> Source=3DgsDatabaseAlias;User ID=3D" & _
> txtUserName.Text & ";Password=3D" & txtPassword.Text & ";Remote =
> Server=3Dhttp://" & txtServerName.Text
> End With
> If cnn Is Nothing Then
> MsgBox "Sorry, Login failed!", vbCritical, "XXX Login"
> GoTo theEnd
> Else
> sQ1 =3D "select x,y,z from a"
> Set rs1 =3D New ADODB.Recordset
> With rs1
> .ActiveConnection =3D cnn
> .Source =3D sQ1
> .CursorType =3D adOpenForwardOnly
> .LockType =3D adLockReadOnly
> .Open 'here the error occurs !!!!
> End With=20
> end if =20
>
> Previously I had tested this code with an Oracle DB Version of =
> 8.0.3.0.0. and it worked fine and I had to code "Data Source=3D"
without =
> giving a TNS name. But now with Oracle8i (8.1.5.0) and its new Net =
> Service Names (differently set up), I do not know what to do in order
to =
> get the connection working.=20
>
> Could somebody help, please!
>
> With my kindest regards
> Paul
>
> ------=_NextPart_000_000B_01BF0AB5.3A155C60
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META content=3D"text/html; charset=3Diso-8859-1" =
> http-equiv=3DContent-Type>
> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY>
> <DIV><FONT size=3D2>Hi everybody,</FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT size=3D2>On a LAN and WAN (by ISDN Router) I am trying to
get =
> connected=20
> to different <STRONG>Oracle8i </STRONG>Databases by Visual Basic Code
=
> (6.0 SP 3,=20
> on Windows NT/4 SP5, with Microsoft Data Access 2.1). And the
following =
> code=20
> works fine, since it does not make use of the Remote =
> Provider:</FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>
gsADOConnect =
> =3D=20
> "Provider=3DMSDAORA.1;Password=3D" & gsPassword & ";" &=20
> _<BR> "User ID=3D" & gsUserName &
";Data =
> Source=3D"=20
> & gsHostString & ";Persist Security Info=3Dfalse"</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2> Set
cnn =
> =3D New=20
> ADODB.Connection<BR> With=20
> cnn<BR> .Provider =3D=20
> "MSDAORA.1"<BR> =
> .ConnectionString =3D=20
> gsADOConnect<BR> =
> .CursorLocation =3D=20
> adUseClient<BR> =20
> .Open<BR> End With<BR> If
cnn.State =
> =3D=20
> adStateOpen Then</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2> =
> ...</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2> end =
> if</FONT></DIV>
> <DIV> </DIV>
> <DIV>However, if I want to do the same with the following code, I keep
=
> getting=20
> error messages like: "ORA12154: TNS: could not resolve service =
> name."</DIV>
> <DIV> </DIV>
> <DIV><FONT face=3D"Courier New" size=3D2> Set cnn =3D
New=20
> ADODB.Connection<BR> With cnn<BR> =
> .ConnectionTimeout =3D=20
> 60 '=3D 60 seconds</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2> =
> .CursorLocation =3D=20
> adUseClient<BR> .Open "Provider=3DMS
Remote;Remote=20
> Provider=3DMSDAORA;Data Source=3DgsDatabaseAlias;User ID=3D" & =
> _</FONT></DIV>
> <DIV><FONT face=3D"Courier New" =
> size=3D2> txtUserName.Text=20
> & ";Password=3D" & txtPassword.Text & ";Remote =
> Server=3Dhttp://"=20
> & txtServerName.Text<BR> End With<BR> If cnn
=
> Is=20
> Nothing Then<BR> MsgBox "Sorry, Login failed!", =
> vbCritical,=20
> "XXX Login"<BR> GoTo theEnd</FONT></DIV>
> <DIV><FONT face=3D"Courier New"=20
> size=3D2> Else<BR> sQ1 =3D "select =
> x,y,z from=20
> a"<BR> Set rs1 =3D New =
> ADODB.Recordset<BR> =20
> With rs1<BR> .ActiveConnection =3D=20
> cnn<BR> .Source =3D=20
> sQ1<BR> .CursorType =3D=20
> adOpenForwardOnly<BR> .LockType =3D=20
> adLockReadOnly<BR> .Open =
> <STRONG><EM><FONT=20
> color=3D#ff0000>'here the error occurs !!!!<BR> =20
> </FONT></EM></STRONG>End With </FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2> end
if =20
> </FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>Previously I had tested this
=
> code with an=20
> Oracle DB Version of <STRONG>8.0.3.0.0</STRONG>. and it worked fine
and =
> I had to=20
> code "Data Source=3D" without giving a TNS name. But now with Oracle8i
=
> (8.1.5.0)=20
> and its new Net Service Names (differently set up), I do not know what
=
> to do in=20
> order to get the connection working. </FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>Could somebody help, =
> please!</FONT></DIV>
> <DIV> </DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>With my kindest =
> regards</FONT></DIV>
> <DIV><FONT face=3D"Courier New"
size=3D2>Paul</FONT></DIV></BODY></HTML>
>
> ------=_NextPart_000_000B_01BF0AB5.3A155C60--
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Sep 30 1999 - 02:22:49 CDT
![]() |
![]() |