Solved

Need server side SQL commands for Telerik Listbox Update/Insert/Delete

Posted on 2011-09-09
3
287 Views
Last Modified: 2012-05-12
Hi!

I'm using 2 listboxes to manage add/reorder/delete of records in a linking table.
Table 1 is the feeder table -Table1.ID, Table1.Descrip fills Listbox1
Table 2 is the linking table - Table2.KeyID, Table1ID, Table3ID, Table2SortOrderInt
Table 3 is the other feeder table - Table3.ID, Table3.Descrip

Since it uses a LinkTable, Telerik's basic drag/drop automatic updates don't support it.  The listbox on left works fine, showing Table1 info.  The listbox2 works fine and refreshes with postbacks but nothing is saved to SQL yet.

I need help writing the code behind, vb.net, to commit the changes in Listbox2 please.  Is it something that can be done on Unload each time?

Thanks,
Jo


0
Comment
Question by:BothWorldsJo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 36853762
BothWorldsJo,

The challenge as you identified is due to the JOIN involved. At least that is what I understood from question that Listbox 2 is based on a combination of the three tables or at least the second two based on the Table1ID selected in first Listbox. What you can do, is create a VIEW on the SQL side representing that data. Then set up an INSTEAD OF triggers for INSERT, UPDATE, and DELETE on the view. The .NET side will see this as simplified case like Table1 and so should be simple to maintain. From the SQL side, see this reference: http://msdn.microsoft.com/en-us/library/ms179288.aspx

Kevin
0
 

Author Comment

by:BothWorldsJo
ID: 36860800
Didn't know views could do that. Thanks very much!
Jo
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 36872341
You are most welcome!
Best regards and happy coding,

Kevin
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how the fundamental information of how to create a table.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question