dotnetdevcsharp
dotnetdevcsharp

Reputation: 3980

Query Runs fine in MS-Access but doesn't execute in .net through jet 4

Can anyone please for the love of god tell me why this query would fire fine in ms access 97 but not through .net jet 4.0 driver ?

Update SkechersPricat, Map_Size Set SkechersPricat.Size=Map_Size.GeminiSize,   
SkechersPricat.ourScale=3, SkechersPricat.OurSizeCol=Map_Size.GeminiSequence Where
SkechersPricat.Gender=Map_Size.Gender AND SkechersPricat.size=Map_Size.[size] and 
SkechersPricat.Gender in ('G','B') and Map_Size.GeminiScaletype=3 and 
SkechersPricat.SkechersStyleNumber like '*L' 

Edit Ps I copied the code as is from the .net retvalue I used which is just a string varaible.

Upvotes: 1

Views: 83

Answers (1)

Gord Thompson
Gord Thompson

Reputation: 123474

You are getting tripped up by the difference in LIKE wildcard characters between queries run in Access itself and queries run from an external application.

When running a query from within Access itself you need to use the asterisk as the wildcard character: LIKE '*L'.

When running a query from an external application (like your VB.NET app) you need to use the percent sign as the wildcard character: LIKE '%L'.

Upvotes: 2

Related Questions