Re: Interfacing Oracle and Visual Basic

From: Jochen Pege <pege_at_kespretlang.de>
Date: Mon, 20 Nov 2000 12:31:49 +0100
Message-ID: <8vb263$c5o$1_at_news10.roka.net>


I dont know if this would solve your problem but mybe. First do not use VB Data Controls they are not very flexible for manipuliating your Data.
and second, the cause for the Errormessage maybe depends on your Oracle Table. If there is no Primary Key or at least one field with an index, it is impossible for VB to add/update any data.

Jochen

Charles Newman <newmanc_at_hotmail.com> schrieb in im Newsbeitrag: 8v2r1e$27k$1_at_nnrp1.deja.com...
> In article <8up4bo$1h4$1_at_nnrp1.deja.com>,
> srramaraj_at_my-deja.com wrote:
> > In article <8uo7gh$ae5$1_at_nnrp1.deja.com>,
> > Charles Newman <newmanc_at_hotmail.com> wrote:
> >
> > ORADC1.DatabaseName will be the name of ur oracle service as defined
 in
> > the TNSNAMES.ora, If you are not working on a personal server.
> > Otherwise it should be empty i.e. ""
>
> I put the service name in, and it still gave me an error, so I have
> to leave it empty.
>
> I am doing:
>
> po8.world =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS =
> (PROTOCOL = TCP)
> (Host = 127.0.0.1)
> (Port = 1521)
> )
> )
> (CONNECT_DATA = (SID = ORCL)
> )
> )
>
> But when I put in "po8" into the "Database Name" field, it gives me an
> error. I get an error message from Oracle listener that the service name
> cannot be found, but "po8" works OK in the "Connect" field, when I log
> on from SQL Plus.
>
>
> But now I have another problem, when I go to write a data record, I
> get "Invalid Fieldname" Error, I am doing
>
>
> ORADC1.RecordSet.AddNew
>
>
> ....Insert data into record fields
>
> ORADC1.RecordSet.Update
>
>
> Oracle gives me back the "Invalid Fieldname" error. I have checked,
> and I have all the fieldnames defined correctly to all text and label
> fields that reference thed database, yet I still get this error.
>
>
> >
> > hope this helps you
> >
> > > In article <IQBP5.1928$Mf4.330090_at_news.shore.net>,
> > > "Snezana Sonje" <sonje1_at_shore.net> wrote:
> > > > Here is what you need:
> > > > ORADC1.Connect = "scott / tiger"
> > > > ORADC1.DatabaseName = "mydata"
> > > > ORADC1.RecordSource = " select * from dual"
> > > > ORADC1.Refresh
> > >
> > > I figured out what was wrong with your instructions,
> > >
> > > ORADC1.DatabaseName need to be left blank. You will get an error
 saying
> > > that Oracle cannot resolve the service name, if you do not leave it
> > > blank.
> > >
> > > >
> > > > Charles Newman wrote in message <8t8hf3$prg$1_at_nnrp1.deja.com>...
> > > > >
> > > > >
> > > > >
> > > > > What do I need to key for for the "database name" and
 "connect"
> > > > >fields of an Oracle Data Control in Visual Basic. I want Visual
 Basic
 6
> > > > >to connect to an Oracle 8i database.
> > > > > For those of you who are seeing this post a second time, I do
> > > > >apologize, but my first attempt at posting this seems to have
 gotten
> > > > >lost or something.
> > > > >
> > > > >
> > > > >Sent via Deja.com http://www.deja.com/
> > > > >Before you buy.
> > > >
> > > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Nov 20 2000 - 12:31:49 CET

Original text of this message