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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Manipulate Oracle with Access97

Re: Manipulate Oracle with Access97

From: Phil <phg3113_at_hotmail.com>
Date: 2000/04/12
Message-ID: <YnZI4.57$sN5.701@nreader3.kpnqwest.net>#1/1

Hi Pedro,

I'm very interested by the ODBC example. It would be gratefulfy apreciated.

Note that I've copied your example with ADO, and it works! I've a stupid question: what is the difference between ADO & ODBC ?

Phil

Pedro Gil wrote in message <38f43f46.2298906_at_news.telepac.pt>...
>Hi Phil,
>
>I do have a example right at hand, but it use ADO instead of ODBC, if
>you wish I could try and make a small example with ODBC later.
>
>Function CreateTable_Person()
>Dim cnn As ADODB.Connection
>Dim cmd As ADODB.Command
>Dim strConnect As String
>Dim strCommand As String
>
> Set cnn = New ADODB.Connection
> With cnn
> .Provider = "MSDAORA"
> strConnect = "Data Source=testes;User ID=**;Password=**"
> .ConnectionString = strConnect
> .Open
> End With
>
> Set cmd = New ADODB.Command
> With cmd
> Set .ActiveConnection = cnn
> .CommandType = adCmdText
> 'SQL to delete the table
> strCommand = "DROP TABLE person"
> Debug.Print strCommand
> .CommandText = strCommand
> .Execute
> 'SQL to Create the table
> strCommand = "CREATE TABLE person "
> strCommand = strCommand & "(ssn NUMBER(9) PRIMARY KEY,fname
>VARCHAR2(15),lname VARCHAR2(20))"
> Debug.Print strCommand
> .CommandText = strCommand
> .Execute
> 'SQL to insert some demo values
> strCommand = "INSERT INTO person
>VALUES(555662222,'Sam','Goodwin')"
> Debug.Print strCommand
> .CommandText = strCommand
> .Execute
> 'SQL to Commint the values (I don't known if I really do need
>this?)
> strCommand = "COMMIT"
> Debug.Print strCommand
> .CommandText = strCommand
> .Execute
> End With
> 'Clean Up
> cnn.Close
> Set cnn = Nothing
> Set cmd = Nothing
>End Function
>On Wed, 12 Apr 2000 08:59:14 GMT, "Phil" <phg3113_at_hotmail.com> wrote:
>
Received on Wed Apr 12 2000 - 00:00:00 CDT

Original text of this message

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