By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,563 Members | 1,307 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,563 IT Pros & Developers. It's quick & easy.

Parameter Query, Link Oracle Table

P: n/a
I have an Oracle 7x table linked to an Access 97 database. I am trying
to write a parameter query but can't seem to get it to work.

When I explicitly specify the parameter in the query it works fine.
Something like this:
SELECT *
FROM MYTABLE
WHERE ACC_NUM = 'XYZ123' ;

The following returns no rows:
PARAMETERS ACCOUNT Text;
SELECT *
FROM MYTABLE
WHERE ACC_NUM = CHR(39) & [ACCOUNT] & CHR(39);

Does anyone have pointers on this? Thanks in advance.
--
Smartin
Mar 9 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
try it w/o the CHR(39)s

"Smartin" <sm********@yahoo.com> wrote in message news:3O********************@giganews.com...
I have an Oracle 7x table linked to an Access 97 database. I am trying to write a parameter query but can't seem to get it to work.

When I explicitly specify the parameter in the query it works fine. Something like this:
SELECT *
FROM MYTABLE
WHERE ACC_NUM = 'XYZ123' ;

The following returns no rows:
PARAMETERS ACCOUNT Text;
SELECT *
FROM MYTABLE
WHERE ACC_NUM = CHR(39) & [ACCOUNT] & CHR(39);

Does anyone have pointers on this? Thanks in advance.
--
Smartin

Mar 9 '06 #2

P: n/a
Malcolm Cook wrote:
try it w/o the CHR(39)s


Thanks for the suggestion, but it doesn't work with CHR(39), CHR(34), or
no delimiters.
--
Smartin
Mar 10 '06 #3

P: n/a
Smartin wrote:
I have an Oracle 7x table linked to an Access 97 database. I am trying
to write a parameter query but can't seem to get it to work.

When I explicitly specify the parameter in the query it works fine.
Something like this:
SELECT *
FROM MYTABLE
WHERE ACC_NUM = 'XYZ123' ;

The following returns no rows:
PARAMETERS ACCOUNT Text;
SELECT *
FROM MYTABLE
WHERE ACC_NUM = CHR(39) & [ACCOUNT] & CHR(39);

Does anyone have pointers on this? Thanks in advance.


No matter, I've devised a work-around by setting the
CurrentDb.QueryDefs("MyQuery").SQL property in VBA on the fly with
parameters from a form. Works great.

Thanks anyway!

--
Smartin
Mar 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.