Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SQL Insert Statement without a value[SOLVED]
Next Topic: SQL Error[SOLVED]
Goto Forum:
  


Current Time: Tue Aug 12 18:34:24 CEST 2025

Total time taken to generate the page: 0.05479 seconds