OLE DB for ODBC parameter query won"t populate dropdownlist
am 28.11.2007 21:33:00 von BrianJMatuschakGreetings:
I am attempting to use one dropdownlist to filter the contents of another as
demonstrated within this MSDN article:
http://msdn2.microsoft.com/en-us/library/aa581791.aspx. Oracle 10 is the
backend in this case, and it is my understanding that the OLE DB provider in
Oracle for Visual Studio 2005 supports V8. So, I'm using the OLE DB provider
for ODBC.
However, I'm using ASP .NET as the interface, and my table adapter populates
the first list correctly and I have "postback" enabled. But I don't get any
data showing up in the second list when the page loads or I make a selection
from the first list; I can test the parameter for the dataset just fine in
the designer.
One thing that looks suspicious is that the syntax looks a little different
than expected for the parameter: It leaves out the "?" in my GetData method,
i.e., (LABEL_IDNUM) instead of (?LABEL_IDNUM), but when configuring my
datasource, it recognizes there is a parameter based on the given SQL. (I
had to define it as a filter for it to show as a parameter.)
SELECT SND_PROD1.LABELS.LABEL_IDNUM, SND_PROD1.CATEGORY.CATEGORY_IDNUM,
SND_PROD1.DEVICE_UNDER_TEST.DUT_TRACKNO
FROM SND_PROD1.LABELS, SND_PROD1.DEVICE_FAMILY, SND_PROD1.CATEGORY,
SND_PROD1.DEVICE_CONFIG,
SND_PROD1.DEVICE_UNDER_TEST
WHERE SND_PROD1.LABELS.LABEL_IDNUM = SND_PROD1.DEVICE_FAMILY.LABEL_IDNUM
AND
SND_PROD1.DEVICE_FAMILY.CATEGORY_IDNUM =
SND_PROD1.CATEGORY.CATEGORY_IDNUM AND
SND_PROD1.DEVICE_FAMILY.DEVFAM_IDNUM =
SND_PROD1.DEVICE_CONFIG.DEVFAM_IDNUM AND
SND_PROD1.DEVICE_CONFIG.DEVCFG_IDNUM =
SND_PROD1.DEVICE_UNDER_TEST.DEVCFG_IDNUM AND
(SND_PROD1.CATEGORY.CATEGORY_IDNUM = 21) AND
(SND_PROD1.LABELS.LABEL_IDNUM = ?)
Any suggestions to try to get the second list to display data?
--
Brian J. Matuschak
brian@electronic-atlas.com