Home All Groups Group Topic Archive Search About
Author
10 Oct 2006 3:28 PM
jonathandrott
I'm new to using two databases at the same time with my vb program.  I
have a db named InvoiceProcessing that has two fields UPC and ItemDesc.
UPC is populated, but ItemDesc needs to be filled from db2 (ILSA)
(with fields PLU_NUM and PLU_DESC)  i need to fill ItemDesc with the
info in PLU_DESC based on the comparison of UPC and PLU_NUM.  I don't
even know where to start.  Thanks.

Author
10 Oct 2006 3:33 PM
rowe_newsgroups
Check out the System.Data.ODBC namespace and also lookup the keywords
"dataset" and "dataadapter"

Thanks,

Seth Rowe


jonathandr***@gmail.com wrote:
Show quoteHide quote
> I'm new to using two databases at the same time with my vb program.  I
> have a db named InvoiceProcessing that has two fields UPC and ItemDesc.
>  UPC is populated, but ItemDesc needs to be filled from db2 (ILSA)
> (with fields PLU_NUM and PLU_DESC)  i need to fill ItemDesc with the
> info in PLU_DESC based on the comparison of UPC and PLU_NUM.  I don't
> even know where to start.  Thanks.
Author
10 Oct 2006 3:36 PM
jonathandrott
I actually know how to connect to the databases through odbc.  I need
help with the sql syntax.  sorry for being vague :)
rowe_newsgroups wrote:
Show quoteHide quote
> Check out the System.Data.ODBC namespace and also lookup the keywords
> "dataset" and "dataadapter"
>
> Thanks,
>
> Seth Rowe
>
>
> jonathandr***@gmail.com wrote:
> > I'm new to using two databases at the same time with my vb program.  I
> > have a db named InvoiceProcessing that has two fields UPC and ItemDesc.
> >  UPC is populated, but ItemDesc needs to be filled from db2 (ILSA)
> > (with fields PLU_NUM and PLU_DESC)  i need to fill ItemDesc with the
> > info in PLU_DESC based on the comparison of UPC and PLU_NUM.  I don't
> > even know where to start.  Thanks.
Author
10 Oct 2006 4:19 PM
rowe_newsgroups
Just to clarify: Do you have one database with two tables
(InvoiceProcessing and ILSA)? If so what type of database are you using
(SQL Server, Access, Oracle, etc...)?

Thanks,

Seth Rowe


jonathandr***@gmail.com wrote:
Show quoteHide quote
> I actually know how to connect to the databases through odbc.  I need
> help with the sql syntax.  sorry for being vague :)
> rowe_newsgroups wrote:
> > Check out the System.Data.ODBC namespace and also lookup the keywords
> > "dataset" and "dataadapter"
> >
> > Thanks,
> >
> > Seth Rowe
> >
> >
> > jonathandr***@gmail.com wrote:
> > > I'm new to using two databases at the same time with my vb program.  I
> > > have a db named InvoiceProcessing that has two fields UPC and ItemDesc.
> > >  UPC is populated, but ItemDesc needs to be filled from db2 (ILSA)
> > > (with fields PLU_NUM and PLU_DESC)  i need to fill ItemDesc with the
> > > info in PLU_DESC based on the comparison of UPC and PLU_NUM.  I don't
> > > even know where to start.  Thanks.
Author
10 Oct 2006 4:27 PM
jonathandrott
two seperate db's and they are both access
rowe_newsgroups wrote:
Show quoteHide quote
> Just to clarify: Do you have one database with two tables
> (InvoiceProcessing and ILSA)? If so what type of database are you using
> (SQL Server, Access, Oracle, etc...)?
>
> Thanks,
>
> Seth Rowe
>
>
> jonathandr***@gmail.com wrote:
> > I actually know how to connect to the databases through odbc.  I need
> > help with the sql syntax.  sorry for being vague :)
> > rowe_newsgroups wrote:
> > > Check out the System.Data.ODBC namespace and also lookup the keywords
> > > "dataset" and "dataadapter"
> > >
> > > Thanks,
> > >
> > > Seth Rowe
> > >
> > >
> > > jonathandr***@gmail.com wrote:
> > > > I'm new to using two databases at the same time with my vb program.  I
> > > > have a db named InvoiceProcessing that has two fields UPC and ItemDesc.
> > > >  UPC is populated, but ItemDesc needs to be filled from db2 (ILSA)
> > > > (with fields PLU_NUM and PLU_DESC)  i need to fill ItemDesc with the
> > > > info in PLU_DESC based on the comparison of UPC and PLU_NUM.  I don't
> > > > even know where to start.  Thanks.
Author
10 Oct 2006 4:57 PM
rowe_newsgroups
Since you don't seem to comfortable with SQL, I'll teach you a little
trick. Open up one of the access databases and add a linked table that
points to the other table in the other database. Then build your query
in "design view" making sure you set the query type to update. After
you get what you want then switch to SQL view and voila - you have your
SQL string. Basically, if I read your post right your sql should be
something like:

<pseudocode>

UPDATE InvoiceProcessing
  SET ItemDesc = PLU_DESC
  WHERE UPC = PLU_NUM
       AND UPC = 'Your Condition'

</pseudocode>

Just a warning - I wrote that really quick so be careful. Also you
might want to use the OleDb namespace instead of Odbc for Access
connections.

Thanks,

Seth Rowe


jonathandr***@gmail.com wrote:
Show quoteHide quote
> two seperate db's and they are both access
> rowe_newsgroups wrote:
> > Just to clarify: Do you have one database with two tables
> > (InvoiceProcessing and ILSA)? If so what type of database are you using
> > (SQL Server, Access, Oracle, etc...)?
> >
> > Thanks,
> >
> > Seth Rowe
> >
> >
> > jonathandr***@gmail.com wrote:
> > > I actually know how to connect to the databases through odbc.  I need
> > > help with the sql syntax.  sorry for being vague :)
> > > rowe_newsgroups wrote:
> > > > Check out the System.Data.ODBC namespace and also lookup the keywords
> > > > "dataset" and "dataadapter"
> > > >
> > > > Thanks,
> > > >
> > > > Seth Rowe
> > > >
> > > >
> > > > jonathandr***@gmail.com wrote:
> > > > > I'm new to using two databases at the same time with my vb program.  I
> > > > > have a db named InvoiceProcessing that has two fields UPC and ItemDesc.
> > > > >  UPC is populated, but ItemDesc needs to be filled from db2 (ILSA)
> > > > > (with fields PLU_NUM and PLU_DESC)  i need to fill ItemDesc with the
> > > > > info in PLU_DESC based on the comparison of UPC and PLU_NUM.  I don't
> > > > > even know where to start.  Thanks.
Author
10 Oct 2006 10:59 PM
Steve Long
Access is so sweet for that. It will usually, at least, get you started in
the right direction.


Show quoteHide quote
"rowe_newsgroups" <rowe_em***@yahoo.com> wrote in message
news:1160499426.515872.13850@i42g2000cwa.googlegroups.com...
> Since you don't seem to comfortable with SQL, I'll teach you a little
> trick. Open up one of the access databases and add a linked table that
> points to the other table in the other database. Then build your query
> in "design view" making sure you set the query type to update. After
> you get what you want then switch to SQL view and voila - you have your
> SQL string. Basically, if I read your post right your sql should be
> something like:
>
> <pseudocode>
>
> UPDATE InvoiceProcessing
>  SET ItemDesc = PLU_DESC
>  WHERE UPC = PLU_NUM
>       AND UPC = 'Your Condition'
>
> </pseudocode>
>
> Just a warning - I wrote that really quick so be careful. Also you
> might want to use the OleDb namespace instead of Odbc for Access
> connections.
>
> Thanks,
>
> Seth Rowe
>
>
> jonathandr***@gmail.com wrote:
>> two seperate db's and they are both access
>> rowe_newsgroups wrote:
>> > Just to clarify: Do you have one database with two tables
>> > (InvoiceProcessing and ILSA)? If so what type of database are you using
>> > (SQL Server, Access, Oracle, etc...)?
>> >
>> > Thanks,
>> >
>> > Seth Rowe
>> >
>> >
>> > jonathandr***@gmail.com wrote:
>> > > I actually know how to connect to the databases through odbc.  I need
>> > > help with the sql syntax.  sorry for being vague :)
>> > > rowe_newsgroups wrote:
>> > > > Check out the System.Data.ODBC namespace and also lookup the
>> > > > keywords
>> > > > "dataset" and "dataadapter"
>> > > >
>> > > > Thanks,
>> > > >
>> > > > Seth Rowe
>> > > >
>> > > >
>> > > > jonathandr***@gmail.com wrote:
>> > > > > I'm new to using two databases at the same time with my vb
>> > > > > program.  I
>> > > > > have a db named InvoiceProcessing that has two fields UPC and
>> > > > > ItemDesc.
>> > > > >  UPC is populated, but ItemDesc needs to be filled from db2
>> > > > > (ILSA)
>> > > > > (with fields PLU_NUM and PLU_DESC)  i need to fill ItemDesc with
>> > > > > the
>> > > > > info in PLU_DESC based on the comparison of UPC and PLU_NUM.  I
>> > > > > don't
>> > > > > even know where to start.  Thanks.
>