views:

22

answers:

1

I'm currently trying to set up my TableAdapters, but it doesn't allow me to use parameters (what makes it quite useless) - When I create a new Query

SELECT     users.*
FROM         users
WHERE name LIKE @name

It tells me there is a SQL-Error near '@'...

I'm using VS08 with C# and an Access-Database using OleDB-Driver

+1  A: 

Look here:

How to: Create Parameterized TableAdapter Queries

When constructing a parameterized query, use the parameter notation specific to the database you are coding against. For example, Access and OleDb data sources use the question mark '?' to denote parameters, so the WHERE clause would look like this: WHERE City = ?.

Try to substitute @ with ? and see if your query compiles.

Leniel Macaferi
Well okay, explains a lot... I used to use MSSQL-Databases and was used to the `@` - thanks a bunch.
ApoY2k