Re: Text Delimiters
- From: Adam <spamcut@xxxxx>
- Date: Mon, 16 Apr 2007 23:57:30 +0200
Dnia Mon, 16 Apr 2007 21:58:07 +0100, Nigel Vandyk napisał(a):
I am sure that lots of people must know the answer to this but I can't find
it anywhere.
In Access I would use chr(34) to delimit the strings. Is there a way round
this in SQLSERVERCE?
Use Parameters
SQL = "INSERT INTO USERS (name, surname) VALUES (?, ?)";
zapytanieSQL = new SqlCeCommand(SQL, polaczenie);
zapytanieSQL.Parameters.Add(new SqlCeParameter("name",
SqlDbType.nvarchar));
zapytanieSQL.Parameters.Add(new SqlCeParameter("surname",
SqlDbType.nvarchar));
zapytanieSQL.Prepare();
zapytanieSQL.Parameters["name"].Value = your string
zapytanieSQL.Parameters["surname"].Value = your string
zapytanieSQL.ExecuteNonQuery();
zapytanieSQL.Parameters.Clear();
.
- References:
- Text Delimiters
- From: Nigel Vandyk
- Text Delimiters
- Prev by Date: Re: Text Delimiters
- Next by Date: Re: Update from SQL 2000 to SQL 2005 SP1 Express
- Previous by thread: Re: Text Delimiters
- Index(es):
Loading