Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Copy a row from Table A to position 0 in Table B

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dave@softwareonline.com - 24 Mar 2008 20:21 GMT
I've tried various things for the last two hours, and I give up!  What
I really need is ImportRowAt(), and it would solve my issue, but since
that doesn't exist:

I have two tables with identical schema.  I run through TableB and if
I find a row that matches my criteria, I want to insert it as the
FIRST row of TableA, which already contains items.

If I could clone the row, it'd meet my needs.  If I could InsertAt(0)
without the "row is already in another table error", it'd meet my
needs.

Any help would be appreciated... so far I've seen a TON of posts on
this very issue, but they never get resolved, so I'm not the first to
hit this, but those who solve it don't report back :-)

...so, any of these three will work:

1) Create a true clone of the row from TableB that I am free to
InsertAt(0) into TableA
2) ImportRow into TableA, then swap it within TableB (from the end of
the table to the start)
3) Accomplish what ImportAt() would if such a method existed

Thanks,
Dave
Lloyd Sheen - 24 Mar 2008 21:14 GMT
> I've tried various things for the last two hours, and I give up!  What
> I really need is ImportRowAt(), and it would solve my issue, but since
[quoted text clipped - 22 lines]
> Thanks,
> Dave

When you say table do you mean database table.

If you do then there is no such thing as position in the table.  A database
table is just a set of rows.  You can sort them using something like order
by but the order is only on the select, not on the table.

LS

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.