Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 594319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:56:26+00:00 2026-05-13T15:56:26+00:00

I need to copy data from one database to another using a VB.NET program.

  • 0

I need to copy data from one database to another using a VB.NET program.
The target database is SQL Server the source database is some proprietary ODBC compliant database.

I need to loop through a list of table to copy. Read the data from the source database table for a given modified date. Delete the corresponding date from the target database table and insert the records from the source table. The databases are of the same structure i.e. table names and field names, but the data types may differ (however they are compliant e.g. double in source, float in target). No primary keys exist.

Heres how I may do it :

Firstly execute a Delete command to the target.
I could then use a DataReader to obtain data from the source, loop through the Items and create an Insert Command for each row. Add Parameters to the Command with the appropriate values and execute. And wrap the whole thing in a Transaction.

I was just wondering if I am missing a trick here. Any Suggestions

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:56:27+00:00Added an answer on May 13, 2026 at 3:56 pm

    The trick would be to use set based operations and not the ‘row at a time’ concept which we programmers were first taught 🙂

    Here’s some pseudocode

    INSERT INTO DestTable (columns, columns...)
    (Select ModifiedRow from SourceTable where date = Modified)
    

    Perhaps your requirements are more complicated and may need the row by row approach, but this is normally not the case.

    I’d opt to put this code in a job step and schedule on SQL. It could also be a stored procedure run from .net.

    Also, using SSIS for a db to db transfer is most likely overkill unless you are going to be using some of the special transformations in there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 535k
  • Answers 535k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I guess the "sdfasdfsfd" is something random: $text = preg_replace(… May 17, 2026 at 1:07 am
  • Editorial Team
    Editorial Team added an answer What you have described above in terms of using the… May 17, 2026 at 1:07 am
  • Editorial Team
    Editorial Team added an answer You don't "sort" by range... I assume you mean filter?… May 17, 2026 at 1:07 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Using C# (vs2005) I need to copy a table from one database to another.
I need to copy about 40 databases from one server to another. The new
I need to copy data from one database into my own database, because i
I am trying to copy data from an old database into a new one,
I have a basic/simple need to create a pipeline transfer process from one SQL
I have a largish table of data pulled from my database (~1500 rows, each
My main question is how to copy a whole database having a English collation
Is it possible to get the values for a TestCaseAttribute from an external data
I want to pull large amount of data, frequently from different third party API
I've a mobile application. My client has a large data set ~100.000 records. It's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.