JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
I've looked into the manipulation of the SqlBulkCopy() which seems to be effective for some of what I'm wanting to do, but I was curious about two things:
In the initial example of the SqlBulkCopy() Class, it appears that one performs a SELECT statement in a SqlCommand as the Source, and then set a destination table name. Now they use one with matching columns, and I did see and understand the usage of the ColumnMappings collection, but for the usage of transferring data, does the SqlBulkCopy() create? Basically, is the SqlBulkCopy only an INSERT INTO, or can it also do a SELECT INTO?
Also, as much as I can use the SqlBulkCopy() for many things it is limited in others. I like (especially for large operations) to provide feedback to the user. when loading 12000 rows from an excel file via OLEDB Ad Hoc query, it takes a few seconds, and it is nice to let them know I'm processing it. Is there any linkage to the server itself (for I know that SqlCommand doesn't have them) that can allow a "Current Process Progress" or some other such update?
Most DB Servers don't have it (Oracle didn't), but I thought I'd ask just in case as I am new to the VB db programming (and sql server), and it has always been, in all my DB experience, a little frustrating to execute a INSERT statement and pretty much walk away cause you don't know how long it's going to take.![Big grin :D :D](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Anyway, thanks for the help.![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
In the initial example of the SqlBulkCopy() Class, it appears that one performs a SELECT statement in a SqlCommand as the Source, and then set a destination table name. Now they use one with matching columns, and I did see and understand the usage of the ColumnMappings collection, but for the usage of transferring data, does the SqlBulkCopy() create? Basically, is the SqlBulkCopy only an INSERT INTO, or can it also do a SELECT INTO?
Also, as much as I can use the SqlBulkCopy() for many things it is limited in others. I like (especially for large operations) to provide feedback to the user. when loading 12000 rows from an excel file via OLEDB Ad Hoc query, it takes a few seconds, and it is nice to let them know I'm processing it. Is there any linkage to the server itself (for I know that SqlCommand doesn't have them) that can allow a "Current Process Progress" or some other such update?
Most DB Servers don't have it (Oracle didn't), but I thought I'd ask just in case as I am new to the VB db programming (and sql server), and it has always been, in all my DB experience, a little frustrating to execute a INSERT statement and pretty much walk away cause you don't know how long it's going to take.
Anyway, thanks for the help.