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

Home -> Community -> Usenet -> c.d.o.misc -> Re: [half OT] Oracle and Microsoft Word

Re: [half OT] Oracle and Microsoft Word

From: NoName <nobody_at_nowhere.com>
Date: Fri, 23 Jan 2004 12:05:41 +0100
Message-ID: <buquqp$b19$1@fata.cs.interbusiness.it>


> What is the Connectionstring you are using ...

"DSN=Oracle" (just to test)

I have configured "oracle.dsn", including UID=scott and PWD=tiger.

What I don't understand is the following: the only way to open a datasource seems to use the orrible MSquery, through ODBC, or some methods of the "MailMerge" object.

I found the following example, on the internet, but it doesn't work:



Sub test()
'
Dim cn As New Connection
Dim dt As Date
Dim rs As Recordset
With cn

    .ConnectionString = "Provider=Oraoledb.oracle;data source=<tnsnamesentry>;user id=<username>;password=<password>;"

    .Open
End With

Set rs = cn.Execute("select sysdate from dual")

dt = rs.Fields(0).Value

Selection.InsertAfter dt
End Sub



Compiler stops at "Dim cn As New Connection" instruction with the "Unknown user-defined type" error, under the word "Connection".

I wonder how, I wonder why...

...and nobody yesterday told me about the blue blue sky...

Regards Received on Fri Jan 23 2004 - 05:05:41 CST

Original text of this message

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