Contributor
3532 Points
1348 Posts
Jun 06, 2015 08:06 PM|Lannie|LINK
Parameters are used to pass variable values to the select statement.. most often to a filtering WHERE clause...
we call these parameters BIND variable on the database side of the application.
In your example EMAIL is a COLUMN NAME, which is not a parameter value.
Select name, phone, email from my_aspnet_membership where email = :email
the :email is the call to the parameter you named parameter "email" in your pararmeter statement.
The COLON symbol tells MySQL and Oracle SQL client... that is a BIND variable awaiting population with parameter value.
To keep things separate from column names you might call your bind variable something else like bind_email or p_email
Also note when you have more than one parameter, they must be listed in the same order they are used.
Contributor
3532 Points
1348 Posts
Re: SQLDataSource will not connect to MYSQL DB.
Jun 06, 2015 08:06 PM|Lannie|LINK
Parameters are used to pass variable values to the select statement.. most often to a filtering WHERE clause...
we call these parameters BIND variable on the database side of the application.
In your example EMAIL is a COLUMN NAME, which is not a parameter value.
Select name, phone, email from my_aspnet_membership where email = :email
the :email is the call to the parameter you named parameter "email" in your pararmeter statement.
The COLON symbol tells MySQL and Oracle SQL client... that is a BIND variable awaiting population with parameter value.
To keep things separate from column names you might call your bind variable something else like bind_email or p_email
Also note when you have more than one parameter, they must be listed in the same order they are used.