William Vaughn
3/25/2008 5:38:00 PM
Access parses the SQL to deal with it's own SQL extensions (expressions)
that are not implemented by JET or the OLE DB provider.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker???s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"Kerry Moorman" <KerryMoorman@discussions.microsoft.com> wrote in message
news:EF899339-6B30-4547-B356-1BAF3E9996A4@microsoft.com...
> Bill,
>
> I don't understand what you mean by this comment.
>
> Kerry Moorman
>
>
> "William Vaughn [MVP]" wrote:
>
>> Access has its own SQL parser.
>>
>> --
>> __________________________________________________________________________
>> William R. Vaughn
>> President and Founder Beta V Corporation
>> Author, Mentor, Dad, Grandpa
>> Microsoft MVP
>> (425) 556-9205 (Pacific time)
>> Hitchhiker???s Guide to Visual Studio and SQL Server (7th Edition)
>> ____________________________________________________________________________________________
>> "Kerry Moorman" <KerryMoorman@discussions.microsoft.com> wrote in message
>> news:BA27B309-CFBF-49AD-A9F9-1269755D7242@microsoft.com...
>> > peter,
>> >
>> > This parametrized query works with Access:
>> >
>> > cmd.CommandText = "Select * From Customers Where City = @City"
>> > cmd.Parameters.AddWithValue("@City", myCity)
>> >
>> > So does this one:
>> >
>> > cmd.CommandText = "Select * From Customers Where City = ?"
>> > cmd.Parameters.AddWithValue("@City", myCity)
>> >
>> > And this one:
>> >
>> > cmd.CommandText = "Select * From Customers Where City = ?"
>> > cmd.Parameters.AddWithValue("City", myCity)
>> >
>> > Kerry Moorman
>> >
>> > "peter.taslimi@hotmail.com" wrote:
>> >
>> >> I am trying to create a parametrized query based on City on the
>> >> customers
>> >> table in Northwind.mdb. The sql version on Northwnd.mdf works fine
>> >> using
>> >> @City in the query, but when I try to create it for the access
>> >> dataset,
>> >> it
>> >> puts single quotes around the '@City'. Is there another character one
>> >> has
>> >> to
>> >> use for access?
>> >>
>> >> I am using Vb.net 2008
>> >>
>> >> Thanks for any help,
>> >> Peter
>> >>
>> >>
>>