What prefix and suffix for parameterized Access query?

thomas10001

Well-known member
Joined
Jun 22, 2003
Messages
57
Location
Samoa & Sweden
I am using an Access database (.mdb) and I read I must set the prefix and the suffix character using named parameters to query the database. I dont know what characters that should be used:

I have tried with these combinations, but none was working

Prefix Suffix
:
: :
%
% %
(no characters at all)
[ ]


:confused:
 
It is the wizard-something that gives an error. But if I use ? as parameter, even if I have more than one it works without setting the prefix and suffix char.
 
No, when utilizing parameters with OleDbData Sources (like Access), you must use the ? place holder and add the parameters to the parameters collection. Prefixed parameters are necessary for the named parameters in sqlserver/msde and they do utilize the @ symbol.

Heres a good link in ms help:
ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vbconParametersInDataAdapterCommands.htm

and a thread that addresses the issue is here:

http://www.computerhelp.forum/showthread.php?s=&threadid=72691&perpage=5&pagenumber=1

Check them out, write some code and post back here for help.

Jon
 
>No, when utilizing parameters with OleDbData Sources (like >Access), you must use the ? place holder and add the >parameters to the parameters collection.

Thanks! Thats what I did and it works!
 
Back
Top