Firstly I apologize if this has already been brought up - and if it has I would appreciate a link to said topic :)
My scenario:
I have a SQL database, containing 1 sizable table (550+ rows) with 5 columns. I have no problem adding this to a form and so on - and can implement what I want to achieve using multiple data connections (and manually editing the SQL). But this solution isn't very flexible if new rows with different data are added to the database.
What I want to achieve is when an item is selected from a drop-down listbox, a subsequent drop-down listbox is made visible to the user that filters the data from the database to fit to parameters set by the first drop-down listbox, and so on propagating to the subsequent list boxes.
eg.
//during initialization of the form
sql_query as string; //global var
sql_query = "SELECT col_name FROM tbl_name WHERE col1 = 'item'"
dropdown_list_changedevent(.....)
{
dim col_name as string; //holds what the column name is, will be different for each changedevent
col_name = "col1"
buildquery(e.NewValue, col_name)
//do something to make the query run
}
function buildquery( NewValue as XmlEventArgs, col_name as string)
{
sql_query += " AND " & col_name & " = '" & NewValue.ToString
}
It may also be worth mentioning this would be for use as a form from SharePoint, and therefore would have the reduced functionality associated with the browser-only forms.
Is such functionality possible or would I have to resort to using my previous solution?
Regards