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 » SQLite and Instr problem
SQLite and Instr problem [message #43885] Fri, 14 November 2014 08:46 Go to previous message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi,

I've got problem with sql query using instr function with SQLite. Code below create ASSERT but SQL query working fine. Is Instr function supported in U++?

Table:
TABLE_(STMTRNFILTER)
	INT64_  (FILTER_ID) PRIMARY_KEY AUTO_INCREMENT
	STRING_ (FILTER_MEMO_FROM, 255)
	INT64_  (FILTER_FK_ACCOUNT_ID_FROM) SQLDEFAULT(0)
END_TABLE


SQL query:
select FILTER_ID from STMTRNFILTER where INSTR('Test string', FILTER_MEMO_FROM) > 0) or FILTER_FK_ACCOUNT_ID_FROM == -1


Code:
Sql sql;
sql * Select(FILTER_ID).From(STMTRNFILTER).Where((Instr(memo, FILTER_MEMO_FROM) > 0) || (FILTER_FK_ACCOUNT_ID_FROM == account_id));


ASSERT:
ERROR no such function: INSTR(0): Preparing: select FILTER_ID from STMTRNFILTER where INSTR('Test string', FILTER_MEMO_FROM) > 0 or FILTER_FK_ACCOUNT_ID_FROM = -1
****************** ASSERT FAILED: Assertion failed in /home/malcirad/upp/uppsrc/plugin/sqlite3/Sqlite3upp.cpp, line 257
NULL != current_stmt


Thanks, Radek
 
Read Message
Read Message
Read Message
Previous Topic: Firebird - Update
Next Topic: Firebird Database integration
Goto Forum:
  


Current Time: Sat Apr 27 19:36:24 CEST 2024

Total time taken to generate the page: 0.05244 seconds