[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2011-09-09
3
Medium Priority
?
292 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

649 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