Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle OLEDB Provider

Re: Oracle OLEDB Provider

From: <tjmxyz_at_my-deja.com>
Date: Thu, 30 Sep 1999 07:22:49 GMT
Message-ID: <7sv341$gm5$1@nnrp1.deja.com>


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>&nbsp;</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>&nbsp;</DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp;
gsADOConnect =
> =3D=20
> "Provider=3DMSDAORA.1;Password=3D" &amp; gsPassword &amp; ";" &amp;=20
> _<BR>&nbsp;&nbsp;&nbsp;&nbsp;"User ID=3D" &amp; gsUserName &amp;
";Data =
> Source=3D"=20
> &amp; gsHostString &amp; ";Persist Security Info=3Dfalse"</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;Set
cnn =
> =3D New=20
> ADODB.Connection<BR>&nbsp;&nbsp;&nbsp; With=20
> cnn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Provider =3D=20
> "MSDAORA.1"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
> .ConnectionString =3D=20
> gsADOConnect<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
> .CursorLocation =3D=20
> adUseClient<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
> .Open<BR>&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp; If
cnn.State =
> =3D=20
> adStateOpen Then</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
> ...</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; end =
> if</FONT></DIV>
> <DIV>&nbsp;</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>&nbsp;</DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;Set cnn =3D
New=20
> ADODB.Connection<BR>&nbsp; With cnn<BR>&nbsp;&nbsp;&nbsp; =
> .ConnectionTimeout =3D=20
> 60&nbsp;&nbsp; '=3D 60 seconds</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;&nbsp; =
> .CursorLocation =3D=20
> adUseClient<BR>&nbsp;&nbsp;&nbsp; .Open "Provider=3DMS
Remote;Remote=20
> Provider=3DMSDAORA;Data Source=3DgsDatabaseAlias;User ID=3D" &amp; =
> _</FONT></DIV>
> <DIV><FONT face=3D"Courier New" =
> size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;txtUserName.Text=20
> &amp; ";Password=3D" &amp; txtPassword.Text &amp; ";Remote =
> Server=3Dhttp://"=20
> &amp;&nbsp;txtServerName.Text<BR>&nbsp;&nbsp;End With<BR>&nbsp; If cnn
=
> Is=20
> Nothing Then<BR>&nbsp;&nbsp;&nbsp; MsgBox "Sorry, Login failed!", =
> vbCritical,=20
> "XXX Login"<BR>&nbsp;&nbsp;&nbsp; GoTo theEnd</FONT></DIV>
> <DIV><FONT face=3D"Courier New"=20
> size=3D2>&nbsp;&nbsp;Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;sQ1 =3D "select =
> x,y,z from=20
> a"<BR>&nbsp;&nbsp;&nbsp; Set rs1 =3D New =
> ADODB.Recordset<BR>&nbsp;&nbsp;&nbsp;=20
> With rs1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ActiveConnection =3D=20
> cnn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Source =3D=20
> sQ1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .CursorType =3D=20
> adOpenForwardOnly<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .LockType =3D=20
> adLockReadOnly<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Open&nbsp; =
> <STRONG><EM><FONT=20
> color=3D#ff0000>'here the error occurs !!!!<BR>&nbsp;&nbsp;&nbsp;=20
> </FONT></EM></STRONG>End With&nbsp;</FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>&nbsp;&nbsp;end
if&nbsp;&nbsp;=20
> </FONT></DIV>
> <DIV>&nbsp;</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>&nbsp;</DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>Could somebody help, =
> please!</FONT></DIV>
> <DIV>&nbsp;</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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US