Home » U++ Library support » U++ SQL » SQL, U++, and Escape Characters[SOLVED]
Re: SQL, U++, and Escape Characters [message #3305 is a reply to message #3302] |
Thu, 18 May 2006 23:00   |
 |
mirek
Messages: 14267 Registered: November 2005
|
Ultimate Member |
|
|
sql * Update(TABLE)(COLUMN, value).Where(KEY == key_value)
When called within GUI widget, you canot use plain "Update", because Update is one of Ctrl member functions; use "::Update" or "SqlUpdate" instead.
Note also that you can create insert and update in more steps:
SqlSet ins = Insert(TABLE);
ins(COLUMN, val);
ins(COL2, val);
...
That is quite useful when values and names of columns are in some sort of array (or something like that).
As for that raw data / escape problem, the best bet is to use "SetParam" syntax:
SQL.Execute("update MYTAB set RAWCOLUMN = ?", raw_value);
but, unfortunately, it is quite RDBMS specific (at there is little that can be done with it).
Anyway, I am all for altering SqlExp to perform escaping of string data. The only trouble is that we should not make SqlExp depend on specific RDBMS libraries; means we should make that escaping code ourselves.
Mirek
[Updated on: Thu, 18 May 2006 23:01] Report message to a moderator
|
|
|
 |
|
SQL, U++, and Escape Characters[SOLVED]
By: Justin on Thu, 18 May 2006 19:50
|
 |
|
Re: SQL, U++, and Escape Characters
By: mirek on Thu, 18 May 2006 19:58
|
 |
|
Re: SQL, U++, and Escape Characters
By: Justin on Thu, 18 May 2006 20:05
|
 |
|
Re: SQL, U++, and Escape Characters
By: mirek on Thu, 18 May 2006 23:00
|
 |
|
Re: SQL, U++, and Escape Characters
By: Justin on Thu, 18 May 2006 23:16
|
Goto Forum:
Current Time: Tue Aug 12 18:34:24 CEST 2025
Total time taken to generate the page: 0.05479 seconds
|