cvboucher
Posts: 191
|
| Posted: 03/03/2011, 12:13 PM |
|
ASP.Net VB InMotion/SQL Server.
I have a dependent list box on a search form. If I change the parent list box the dependent list box refreshes properly. When I click on the Search button (without selecting a value from the dependent list box) I get the following error:
The value in field s_FromInstanceID is not valid.
If I select a value in the dependent list box then I don't get the error.
Since this is a search form I wanted to retain the "Select Value" option after the dependent list box was refreshed. To accomplish this I created a view where I union the parent and dependent table together and hardcode 'Select Value' for the Text Column in the parent table. See below for the view. Could this view be causing the problem?
ALTER VIEW [dbo].[InstanceDropListVw] AS
SELECT 1 As Sequence, NULL As InstanceID, SystemID, 'Select Value' As InstanceName, NULL As PeopleSoftVersion, NULL As PeopleToolsVersion, 0 As Inactive
FROM System
UNION ALL
SELECT 2 As Sequence, InstanceID, SystemID, InstanceName, PeopleSoftVersion, PeopleToolsVersion, Inactive
FROM Instance
Thanks,
Craig
|