Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create indexes with TBatchMove ?

Status
Not open for further replies.

Karen99

Programmer
Aug 5, 2003
113
0
0
ZA
HI

I used TBatchMove to copy a table from onse Sql server 2000 db to another Sql server 2000 db.

It created the table and copied all the records. So that works fine.

My problem is that it does not create primary keys or any indexes.

Or must I use another component for this ?

Please Help !!

Karen

PS. I am using Delphi 3.
 
Hello Karen,

I already responded to this earlier in your quesion on my thread about using ADO and inserting records.

However, now that I see that you're going from one SQL2k to another, I would suggest perhaps that you invoke a DTS (which would copy your indexes) or, if you still simply create the table and indexes using SQL, if you are not manipulating the data in a dataset before going from database A to database B, I would simply recommend you use and Insert Into Sql statement as SQL server will handle this more quickly than having delphi move the data out of the database and back into another. Of course if you are doing an intermediate manipulation of the data then of course this is not a valid argument....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top