Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Posts
    2

    Unanswered: 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.

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    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.

  3. #3
    Join Date
    Mar 2008
    Posts
    2
    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •