U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » SQL, U++, and Escape Characters[SOLVED]
Re: SQL, U++, and Escape Characters [message #3301 is a reply to message #3300] Thu, 18 May 2006 19:58 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Justin wrote on Thu, 18 May 2006 13:50

Hey Guys,

I am writing a database application that is having problems inserting text into the database with special characters such as the single quote charater ' . This is typical and I have experience in PHP with this situation. In PHP, you would need to use a function that would add the escape character '\' before any character that required it so that the database would not have an issue. Is there anyway to have this done in U++ so that I can insert a single quote and other special characters without having to create some validation function?



Jusitn


Well, this is quite RDBMS specific.

In general, using "SetParam" inteface (means, no SqlExp), things should work without escaping, at least for MySql. In Oracle, we are using SqlRaw datatype...

Unfortunately, it seems like SqlExp does not yet account for this problem. My guess is that this should be done inside SqlExp (constructor SqlVal from String), based on current "SQL dialect".

MIrek
 
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: Thu Sep 17 01:49:37 GMT+2 2026

Total time taken to generate the page: 0.02216 seconds