Re: Create Table in SQL server (Visual basic.Net )
- From: "Patrice" <nobody@xxxxxxxxxxx>
- Date: Fri, 15 Apr 2005 16:47:32 +0200
You could try to generalize by creatingh the target tables by inspecting the
source tables.
This way you'll be ablt to use the same code for all tables (do you hardcode
for now the structure for each table ?)
Patrice
--
"Ben" <Ben@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le message de
news:210615D9-0262-492E-8819-D98A6C57044D@xxxxxxxxxxxxxxxx
> Hi everyone,
>
> Now I am using Visual Basic.net to write a program but having some
> headaches. The situation is as follows:
>
> I am using ODBC connection to connect one database( non-SQL server) ,
which
> has over 20 tables and each table has lot of fields. My aim is to setup
a
> button, everytime when the button is clicked, the selected tables through
> the ODBC connection will be copied to a SQL server 2000 ( Both the data
and
> table structure), which means a table will be created on SQL server and
all
> the data will be inserted accordingly. If the created table has already
> existed on the SQL server 2000, a drop action will be done before
creating.
>
> Is there a simplest way to fulfill above aim in Visual Basic code? I am
> trying to use SQL-DMO , but it is too tedious as I need to write the code
to
> setup each table structure and insert the data , which is too tedious .
>
> Thanks in advanced.
> Ben
>
.
- Follow-Ups:
- References:
- Prev by Date: Re: Is this correct OO design?
- Next by Date: Re: Obfuscator - Know a Good One?
- Previous by thread: Create Table in SQL server (Visual basic.Net )
- Next by thread: Re: Create Table in SQL server (Visual basic.Net )
- Index(es):