RE: Is this correct syntax for OLE DB for ODBC parameter query?
- From: Pak-Ming Cheung [MSFT] <PakMingCheungMSFT@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Feb 2008 02:42:00 -0800
It seems that the syntax is correct - it is ok to use "select col1 from
table1 where column2 = ?"
(Just a brief review of that SQL statement)
You may have more information from ASP .NET team.
Ming.
MDAC Team, Microsoft.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
"Brian J. Matuschak" wrote:
Greetings:.
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
elatlas @ eskimo.com
- Prev by Date: RE: Determine actual size of binary column in result set
- Next by Date: RE: ODBC SQL Select Problem Vista only
- Previous by thread: RE: Determine actual size of binary column in result set
- Next by thread: RE: ODBC SQL Select Problem Vista only
- Index(es):