Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Pervasive.SQL > Pervasive SQL 9.5 dynamic parameters in SELECT problem.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-08, 14:58
genius2003 genius2003 is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
Pervasive SQL 9.5 dynamic parameters in SELECT problem.

Hello.

I have to use dynamic parameters in my SELECT statement as follows

Code:
SELECT person0_.Id as Id0_0_, person0_.First_Name as First2_0_0_ FROM Person person0_ WHERE person0_.Id=?p0; p0 = '104101361'

Unfortunately, this leads to

Code:
[LNA][Pervasive][ODBC Engine Interface]Syntax Error: SELECT person0_.Id as Id0_0_, person0_.First_Name as First2_0_0_ FROM Person person0_ WHERE person0_.Id=?p<< ??? >>0

If anyone has an idea of how it could be overcome, please let me know.

P.S. Select statement looks cryptic, because it is generated by one tool (NHibernate, in particular).

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 03-03-08, 17:31
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
Pervasive does support parameters in queries but the syntax is different. For example:
SELECT * FROM CLASS WHERE ID = ?
It seems that NHibernate is generating a query that isn't supported by PSQL. You'll probably need to create your own dialect for NHibernate. A quick search shows that PSQL isn't supported natively.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 03-03-08, 19:44
genius2003 genius2003 is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
Thank you.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On