Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7178901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:01:03+00:00 2026-05-28T17:01:03+00:00

I am using BDS 2006 with PostgreSQL for my application. I have the following

  • 0

I am using BDS 2006 with PostgreSQL for my application.
I have the following code consisting of the query for finding the Primary key values inside my Table.

 Query.SQL.Clear;
 Query.SQL.Add('SELECT pg_attribute.attname,format_type(pg_attribute.atttypid, pg_attribute.atttypmod)FROM pg_index, pg_class, pg_attribute WHERE pg_class.oid = '+#39+'tablename'+#39+' ::regclass AND indrelid = pg_class.oid AND pg_attribute.attrelid = pg_class.oid AND pg_attribute.attnum = any(pg_index.indkey)AND indisprimary');
 Query.Open;

I get an syntax error message

 General SQL error.  
 ERROR: syntax error at or near ":";  

I tried using #58 in place of : but results the same.
The following query works fine inside my PostgreSQL.

Any views on how do i get it working

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:01:04+00:00Added an answer on May 28, 2026 at 5:01 pm

    1) If you put BDE tag, then I am expecting that you used BDE + BDE ODBC SQLLink + PgSQL ODBC driver. BDE components expect ':' as param marker, and '::' as an escape sequence which is translated into ':'. You have two basic options:

    • set TQuery.ParamCheck to False and fill in Params collection by hands;
    • double every one ':', which is not a parameter marker. So, it will be '::::'.

    2) You can use 3d party libraries, like AnyDAC, which are understanding what PgSQL '::' means. So, they will not recognize '::' as a parameter marker.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
In the following code I'm using 3 foreach statements. I'm just looking to populate
I'm installing a BPL (without dll) Delphi Expert using this Windows registry key HKEY_CURRENT_USER\Software\Embarcadero\BDS\x.0\Known
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using Android TelephonyManager an application can obtain the state of data activity over the
Using MVC2 I have an AJAX form which is posting to a bound model.
Using report builder 3.0, I have a report that queries a cube. How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.