H
Homa
Hi,
I read the document saying that OleDB cannot use named parameters, so
the command must be in the form:
"Select z from foo_T where b = ? And c = ?"
I thought this is the limitation of the database, but I found out when
I use Access, I can actually use named parameter to do the query, but
the OleDBCommand does not allow me to do it 'normally'
For example, when I create a OleDBDataAdapter (I'm using VS.NET 03),
when configuring it using the wizard, I can do this:
"Select a from foo_T where b = @b And c = @c Or c = @c And d = @d"
And when I run this in the query builder, the correct result comes
out.
So it seems like the "cannot use named parameters" is a limitation of
OleDBCommand rather than the database itself
Is there a way to get around this?
What do you think?
Best Regards,
Homa Wong
I read the document saying that OleDB cannot use named parameters, so
the command must be in the form:
"Select z from foo_T where b = ? And c = ?"
I thought this is the limitation of the database, but I found out when
I use Access, I can actually use named parameter to do the query, but
the OleDBCommand does not allow me to do it 'normally'
For example, when I create a OleDBDataAdapter (I'm using VS.NET 03),
when configuring it using the wizard, I can do this:
"Select a from foo_T where b = @b And c = @c Or c = @c And d = @d"
And when I run this in the query builder, the correct result comes
out.
So it seems like the "cannot use named parameters" is a limitation of
OleDBCommand rather than the database itself
Is there a way to get around this?
What do you think?
Best Regards,
Homa Wong