Brian
Wed Apr 28 14:23:57 CDT 2004
This is a multi-part message in MIME format.
------=_NextPart_000_0040_01C42D2C.713B2910
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Miha - Thanks for your response. I tried this method previously but the =
table has to exist. My problem is that our provider ships the data in a =
generic format and then we import it to our SQL. I need to have a table =
in their database for the relationships to properly setup the table =
datas for import.
In essence, I need to create a new table and then add the data to this =
table. We get a new database every 2 months so it would be nice to =
automate this process. Our database provider will add a table for us =
for a nominal fee but will get costly.
Thanks,
Brian
--=20
Brian P. Hammer
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message =
news:%23TUB7oRLEHA.2704@TK2MSFTNGP10.phx.gbl...
Hi Brian,
You might use an OleDbDataAdapter with SelectCommand (make sure that
AccceptChangesDuringFill is set to false) to fill a DataTable.
Once you have filled DataTable all rows will be marked as Added.
Then use another OleDbDataAdapter with InsertCommand to store data =
into
another database with Update method.
--=20
Miha Markic [MVP C#] - RightHand .NET consulting & software =
development
miha at rthand com
www.rthand.com
"Brian P. Hammer" <bphammer@email.uophx.edu> wrote in message
news:e2NrQXwKEHA.892@TK2MSFTNGP09.phx.gbl...
All - I have the need to import an Access table from one database to
another. On my form, I have it set up so the user chooses the source
database and the destination database. The table to be imported is set =
in
code.
Anyone have links or code on where I can start? I don't even know =
where to
begin after getting a connection to the databases.
Thanks,
Brian P. Hammer
------=_NextPart_000_0040_01C42D2C.713B2910
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 http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>Miha - Thanks for your response. I =
tried this=20
method previously but the table has to exist. My problem is that =
our=20
provider ships the data in a generic format and then we import it to our =
SQL. I need to have a table in their database for the =
relationships to=20
properly setup the table datas for import.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>In essence, I need to create a new table and =
then add the=20
data to this table. We get a new database every 2 months so it =
would be=20
nice to automate this process. Our database provider will add a =
table for=20
us for a nominal fee but will get costly.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial>Brian</FONT></DIV>
<DIV><FONT face=3DArial></FONT><BR>-- <BR>Brian P. Hammer</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Miha Markic [MVP C#]" <miha at rthand com> wrote in =
message <A=20
=
href=3D"news:%23TUB7oRLEHA.2704@TK2MSFTNGP10.phx.gbl">news:%23TUB7oRLEHA.=
2704@TK2MSFTNGP10.phx.gbl</A>...</DIV>Hi=20
Brian,<BR><BR>You might use an OleDbDataAdapter with SelectCommand =
(make sure=20
that<BR>AccceptChangesDuringFill is set to false) to fill a =
DataTable.<BR>Once=20
you have filled DataTable all rows will be marked as Added.<BR>Then =
use=20
another OleDbDataAdapter with InsertCommand to store data =
into<BR>another=20
database with Update method.<BR><BR>-- <BR>Miha Markic [MVP C#] - =
RightHand=20
.NET consulting & software development<BR>miha at rthand com<BR><A =
href=3D"
http://www.rthand.com">www.rthand.com</A><BR><BR>"Brian P. =
Hammer"=20
<<A =
href=3D"mailto:bphammer@email.uophx.edu">bphammer@email.uophx.edu</A>>=
=20
wrote in message<BR><A=20
=
href=3D"news:e2NrQXwKEHA.892@TK2MSFTNGP09.phx.gbl">news:e2NrQXwKEHA.892@T=
K2MSFTNGP09.phx.gbl</A>...<BR>All=20
- I have the need to import an Access table from one database =
to<BR>another.=20
On my form, I have it set up so the user chooses the =
source<BR>database and=20
the destination database. The table to be imported is set=20
in<BR>code.<BR><BR>Anyone have links or code on where I can start? I =
don't=20
even know where to<BR>begin after getting a connection to the=20
databases.<BR><BR>Thanks,<BR>Brian P. =
Hammer<BR><BR></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0040_01C42D2C.713B2910--