When writing SQL statements in the Advanced DataSet dialog box, there are conditions specific to ASP.NET that you must be aware of. These conditions are described in the next sections.
The syntax you use to reference parameters varies depending on the database connection in use (for example, OLE DB or Microsoft SQL Server).
OLE DB
When connecting to a database using OLE DB, parameters must be referenced using a question mark (?). For example:
SELECT * FROM Employees WHERE HireDate > ?
Microsoft SQL Server
When connecting to Microsoft SQL Server using the Managed Data Provider for SQL Server supplied with the .NET Framework, all parameters must be named. For example:
SELECT * FROM Employees WHERE HireDate > @hireDate
When inserting code within SQL statements written for ASP.NET, you must enclose all strings in quotes (" "), and enclose the code in parentheses ( ).
SELECT * FROM Employees WHERE HireDate > "+ (Request.queryString("hireDate"))