Will

What's your end point?

If you're trying to get an enquiry-like set of data and then mess around
with it in Basic, you can use UniVerse SQL to generate a data set then
iterate through it programmatically. 

That's quick and unlike the external SQL access (e.g. ODBC) it doesn't try
to normalize it so you end up with sensible multivalued entries if you need.

Something along the lines of:

      SQL = "SELECT col1, col2 FROM some_file WHERE some_criteria ORDER BY
some_fields"

      Ok = SQLExecDirect(@HSTMT, SQL)
      Ok = SQLNumResultCols(@HSTMT, NumColumns)

      DIM COLS(NumColumns)
* bind these for each fetch
      For I = 1 To NumColumns
         Ok = SQLBindCol(@HSTMT, I, SQL.B.DEFAULT, COLS(I))
      Next
      Loop
         Ok = SQLFetch(@HSTMT)
      Until Ok = SQL.NO.DATA.FOUND Do
* COLS() now has the data for this row
         For I = 1 To NumColumns
            Crt COLS(I):"|":
         Next
         Crt
      Repeat
      
      Ok = SQLFreeStmt(@HSTMT, SQL.DROP)


-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: 10 October 2012 15:25
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Wouldn't it be nice if

Hmm I'd say build the structure.
I already have a verb WALK where you can give it a filename on the
commandline and it will build a BASIC program to select and readnext and
read each record in order.

But it's not yet smart enough to handle a request to SORT... BY that might
be a simple additional tweak.... not sure.

 

 

 

-----Original Message-----
From: Buss, Troy (Contractor, Logitek Systems) (Contractor, Logitek Systems)
<troy.b...@nordsonasymtek.com>
To: U2 Users List <u2-users@listserver.u2ug.org>
Sent: Wed, Oct 10, 2012 2:13 am
Subject: Re: [U2] Wouldn't it be nice if


Hmm, I tend to work the other way and take basic programs that would be far
less maintenance being a query, even if it takes a little idescriptor work
to get it right.

What is your tweakery challenge?

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org]
On Behalf Of Wjhonson
Sent: Tuesday, October 09, 2012 1:51 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Wouldn't it be nice if

We had a vendor provided command which would turn a Query statement into a
BASIC program ?

For those situations where you just want to make some tweaks to a query
that's basically working ok just not perfectly.


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

____________________________________________________________________________
_
Scanned by IBM Email Security Management Services powered by MessageLabs.
For 
more information please visit http://www.ers.ibm.com

This email is intended only for the use of the party to which it is
addressed 
and may contain information that is privileged, confidential, or protected
by 
law.  If you are not the intended recipient you are hereby notified that any

dissemination, copying or distribution of the email or its contents is
strictly 
prohibited.  If you have received this message in error, please notify us 
immediately, by replying to the message and deleting it from your computer.

WARNING: Internet communications are not assured to be secure or clear of 
inaccuracies as information could be intercepted, corrupted, lost,
destroyed, 
arrive late or incomplete, or contain viruses.  Therefore, we do not accept 
responsibility for any errors or omissions that are present in this email,
or 
any attachment, that have arisen as a result of e-mail transmission.
____________________________________________________________________________
_
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

 
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to