× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am trying to do prepare a CREATE TABLE statement
(code is below) using parameter markers for the table
name and the record length.  I get a runtime error
that the token ? is invalid.

Have I done something wrong here or is it not
permissible to use parameter markers for these values?

Thanks,

Phil

P SQLCrtTable    b
D SQLCrtTable     pi
D  file                         10    value
D  length                        3  0 value
D len             s              3
D SQLStmt         s            256
D prepared        s               n   static
C                   if        prepared = *off
C                   eval      len = %editc(length:'X')
C                   eval      SQLStmt =
C                             'create table qtemp/? +
C                             (record character ( ? )
+
C                              not null with +
C                              default)'
C/exec sql
C+ prepare crtTblStmt from :SQLStmt
C/end-exec
C                   eval      prepared = *on
C                   endif
C/exec sql
C+ execute crtTblStmt
C+    using :file, :len
C/end-exec
C                   return
P SQLCrtTable     e

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.