RE: [gnome-db] parameters in SQL commands
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Daniel Morgan <danmorg sc rr com>
- Cc: Gonzalo Paniagua Javier <gonzalo gnome-db org>, GDA <gnome-db-list gnome org>
- Subject: RE: [gnome-db] parameters in SQL commands
- Date: 02 Oct 2002 10:53:38 +0200
On Wed, 2002-10-02 at 00:07, Daniel Morgan wrote:
> The System.Data.SqlClient (MS SQL Server 7/2000) .NET Data Provider uses the
> @ (at) symbol to denote a named parameter.
>
> SELECT NAME
> FROM ADDRESS
> WHERE POSTAL_CODE = @postal_code
>
> The System.Data.OleDb (ADO/OLE-DB) .NET Data Provider uses the ? (question
> mark) symbol to
> denote a parameter.
>
> Maybe, we should allow this parameter marker character(s) to be changed via
> some libgda API. However, it should have a default parameter marker. What
> would the default be? Will every provider have the same default?
>
yes, the thing is to have a standard for clients to send parameterized
commands, and then have the providers do whatever they like with them,
such as replacing the placeholders with values, converting them to their
specific placeholders, etc
> Here are the four parameter markers:
> 1. @ (at) named parameter
> 2. : (colon) named parameter
> 3. [] (square bracketers) delimited named parameter
> 4. ? (question mark) positioned parameter
>
> Are there anymore?
>
not that I can remember right now. Maybe we could just make sure we try
to understand all of them, although, of course, I'd start by using just
a default one (:name ?) and then go to support the other ones later on.
cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]