Skip to Content
author's profile photo Former Member
Former Member

syntaxfromsql fails if column is blob

I am creating a datawindow at run time where i don't know the column types or names.

ls_sql = "select * from <tablename>'

SyntaxFromSQL(ls_sql, 'Style(Type=Form)', ls_error)

I don't suppose there is a setting to create the syntax from sql while ignoring columns that it can't handle (such as blobs). I get the error: "This column's data type (columname) requires the use of an embedded SQL statement."

Powerbuilder itself can do this when it creates a datawindow via the ide.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2013 at 03:27 PM

    Hi M;

    No, you would have to read the DBMS's System Tables and determine which column types to exclude before you issue the "SyntaxFromSQL" command.

    regards .. Chris

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2013 at 01:05 PM

    There is a system proc called sp_columns that can give you the column names, data types etc if you pass it the table name.

    hth,

    Mark

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks.

      My general goal is to build an import process that can handle any source via a database driver, so having to code for every conceivable database isn't an option. The particular import that i am working on is ever worse - it is from a foxpro/DBF source, which does not have system tables that allow you to inquire as to the columns of a table and their types.

      Since powerbuilder can already do this in the IDE (and possibly the pipeline object?), i was hoping that sap/sybase could have made it available to our programs as well.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.