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 » SQLITE3: Bind parameter by name
Re: SQLITE3: Bind parameter by name [message #26650 is a reply to message #26631] Tue, 18 May 2010 07:22 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

luzr wrote on Mon, 17 May 2010 15:48

tojocky wrote on Wed, 12 May 2010 09:55

Hello all,

How about to implement in SQLITE bind parameter by name? not only by index.

example of sqlite text:
"SELECT * from sqlite_master where type=table and name =:table_name"

in SQL class need to add meber:
Sql::SetParamName(String p_name, int p_index);
or add direct:
Sql::SetParam(int i, const Value& val, String p_name)
or
Sql::SetParam(String p_name, const Value& val) // auto increment parameter index
by using:
const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);

Can I add this functionality and propose for adding in library?

Any opinion are welcome!

Best regards, Ion Lupascu (tojocky)


As SqlExp seems to be dominant choice for doing SQL, I see little benefit here. Also, not every DB engine supports this and you would require a common interface.

I am strongly opposed to this.

Mirek


I use classic version of Sql because: in a function I can construct the sql text, but in other I can pass the parameters.
Parameters support SQLITE, PostgreSQL, Oracle. Not sure about MySQL.
Other databases?

I can do the common interface and propose for acceptance.

Best regards, Ion Lupascu (tojocky)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Patch: Reconnecting PostgreSQL Automatically on Unstable Networks
Next Topic: Oracle8: Insert a long RAW Value
Goto Forum:
  


Current Time: Fri Jul 04 20:12:05 CEST 2025

Total time taken to generate the page: 0.03808 seconds