× 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.



Hi Steven,

Here are some excerpts of my code to do it:

#define NULL  0
SQLHDBC hdbc = SQL_NULL_HDBC; 
SQLCHAR server[] = "*LOCAL";

/* code to allocate the environment & connection handles etc */

iRetcode = SQLConnect(hdbc, 
                      server,
                      SQL_NTS,
                      NULL,
                      SQL_NTS,
                      NULL,
                      SQL_NTS);

Regards,

Kevin Wright

> -----Original Message-----
> From: Steven Newson [mailto:steven.newson@chp.co.uk]
> Sent: Wednesday, 12 February 2003 4:35
> To: C400-L@midrange.com
> Subject: [C400-L] SQL CLI
> 
> 
> I've been playing around with the SQL CLI interface on the 
> iSeries. What
> I'd really like to do is to avoid having to ask the user for 
> their login
> details when doing an SQL query. The database I'm connecting 
> to is local
> and the program will be run interactively so it would seem a little
> pointless to ask the user to log in again. I've only really used this
> interface before in an ODBC environment, connecting to the AS/400 in
> which case you would always have to specify the u/p combination. 
>  
> Does anybody have any suggestions as to how I can do a series 
> of dynamic
> SQL queries on the AS/400 without this login information 
> being required?
>  
> Steve.
> _______________________________________________
> This is the C programming iSeries / AS400 (C400-L) mailing list
> To post a message email: C400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/c400-l
> or email: C400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/c400-l.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.