My goal is to synchronize the contents of a offline access database with a
online sql-server. In order to do this in a robust manner i'm trying to
implement to following steps:
1. Clone Table to Table2 in the sql-server
2. fill Table2 with the data from the access database
3. rename Table to Table1 (sql-server)
4. rename Table2 to Table (sql-server)
5. remove Table1 (sql-server)
The problems start with the cloning. I am currently trying to do this using
ADOX via interop but i am running into various problems here. I need a full
clone of the original table with all its columns, indexes, keys and
properties.
My questions to this group:
1. Is ADOX the way to do this?
2. the Columns.Append method expects either: (ADOX.Column) or (string,
DataTypeEnum, long). I'm trying to use the first one but i can't seem to get
the optional parameters working (in c# they are not optional and i can't
find the correct values). I'm having the same problems with Indexes.Append
etc
Any help would be highly apreciated,
Remco Hulshoff
> My questions to this group:
> 1. Is ADOX the way to do this?
> 2. the Columns.Append method expects either: (ADOX.Column) or (string,
> DataTypeEnum, long). I'm trying to use the first one but i can't seem to
get
> the optional parameters working (in c# they are not optional and i can't
> find the correct values). I'm having the same problems with Indexes.Append
> etc
>
> Any help would be highly apreciated,
Why don't you use native SQL stataments to modify schema?
IMO it should be easier.
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
>> My questions to this group:
>> 1. Is ADOX the way to do this?
>> 2. the Columns.Append method expects either: (ADOX.Column) or
>> (string, DataTypeEnum, long). I'm trying to use the first one but i
>> can't seem to get the optional parameters working (in c# they are
>> not optional and i can't find the correct values). I'm having the
>> same problems with Indexes.Append etc
>>
>> Any help would be highly apreciated,
>
> Why don't you use native SQL stataments to modify schema?
> IMO it should be easier.
I would love a simple solution. however i am also rather new to sql-server.
could you give me a view pointers on how to do this?
thx,
Remco Hulshoff
Hope this requires just only two database operations.
thanks
srinivas moorthy
>.
>
Although i like your solution, for my scenario it is not an option. the
system wich will be running the synchronisation process will almost
certainly be a bandwidth impaired system (ie modem). Retrieving all the data
from the sql-server to the client and then possibly transferring it all back
is thus not an appealing idea. This is why i opted for the temptable
solution in the first place.
Thanks for your input,
Remco Hulshoff
Have you looked into Data Transformation Services (DTS) This is a SQL Server
service specifically designed to do what I understand you atre attempting to
do. If I read you right, you are not really synchronizing the two
databases, but only cloning an Access table to a SQL-Server database, right?
DTS is the way to go..imho
Ibrahim
"Remco Hulshoff" <r.hul...@heritas.nl> wrote in message
news:eM$BwCKwD...@TK2MSFTNGP09.phx.gbl...
>.
>
Thank you,
Remco Hulshoff
Thank you,
Remco Hulshoff