SQLCLI & iASPs
Kelly Beard <[email protected]>
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Message-ID | <CAOvM2St_9eRSZ__Kyg701iyeaaBoBoeY2obNoKgupYA6_vbn9A@mail.gmail.com> |
I have a wrapper-type class for some SQLCLI stuff. I call it FTPDatabase.
I have a constructor where you pass in a data source name, default library,
user & password. On our old Power7 systems we didn't have any iASPs at
all. We simply used *SYSBASE and the default database that came configured
with the system. I had coded in all of my programs for the data source
name to be "*LOCAL". Being new to the IBMi at the time, I probably got
"*LOCAL" from some web page or IBM manual.
Here is a snippet of code that connects to the database.
sqlRet = SQLConnect(iv_ConnectionHandle, (char *)
iv_DataSourceName.c_str(), SQL_NTS, (char *) userName.c_str(), SQL_NTS,
(char *) password.c_str(), SQL_NTS);
On our Power8 system, we're going to have iASPs and our data is going to be
separated from *SYSBASE. I had a sample program laying around that just
did a SELECT from a well-known table/file & spit the results out. This
library/schema exists on iASP "DATADEV". I compiled this program, which
still connected to *LOCAL on the new system, expecting it to fail because
(I thought) "*LOCAL" would connect to *SYSBASE.
Can anyone shed some light? I cannot find a difference between
FTPDatabase m_dbConnection("*LOCAL", "", "", "");
or
FTPDatabase m_dbConnection("DATADEV", "", "", "");
Both work. Why is this? My user profile is set to use DATADEV as my
initial ASP. I did not execute any command that changed my working ASP
group.
--
Kelly Beard
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.