|
It would be possible to create the connection string for the user after
credential validation.
Public Function Connect(ByVal iSeries_SystemName As String, Optional
ByVal UserID As String = "", Optional ByVal Password As String = "") As
Boolean
If Not m_isConnected Then
m_SystemName = iSeries_SystemName
m_LastError = cwbCO_CreateSystem(m_SystemName,
m_Handle_System)
If m_LastError = CWB_OK Then
m_isConnected = True
m_LastError = cwbSV_CreateErrHandle(m_Handle_Error) '
TODO: check rc
If UserID.Length > 0 Then
'm_LastError = cwbCO_GetPromptMode(m_Handle_System,
promptMode)
m_LastError = cwbCO_SetPromptMode(m_Handle_System,
enumCwbCoPromptMode.CWBCO_PROMPT_NEVER)
m_LastError = cwbCO_SetUserIDEx(m_Handle_System,
UserID)
If m_LastError = CWB_OK Then
m_LastError = cwbCO_SetPassword(m_Handle_System,
Password)
Password = ""
If m_LastError = CWB_OK Then
m_LastError = cwbCO_Signon(m_Handle_System,
m_Handle_Error)
If m_LastError = CWB_OK Then
m_LastError =
cwbCO_Connect(m_Handle_System, enumCwbCoService.CWBCO_SERVICE_CENTRAL,
m_Handle_Error)
Else
Call Disconnect()
End If
'Call RetrieveError() ' todo : fails at this
point
Else
Call Disconnect()
End If
Else
Call Disconnect()
End If
End If
Return m_isConnected
Else
m_isConnected = False
Return m_isConnected
End If
Else
Return m_isConnected
End If
End Function
Or use ODBC APIs instead of the .NET provider:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/r
zaik/rzaikcwbobjopenlist.htm<http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/r%0Azaik/rzaikcwbobjopenlist.htm>
-----Original Message-----
From: systemidotnet-bounces@xxxxxxxxxxxx
[mailto:systemidotnet-bounces@xxxxxxxxxxxx] On Behalf Of Mike
Sent: Tuesday, November 17, 2009 8:23 AM
To: .net use with the System i
Subject: Re: [SystemiDotNet] Authenticating against the i
This is how I assumed it would work (or something similar). I wanted to
see
what others where doing. *heads off to write a login page*
--
Mike Wills
http://mikewills.info
P: (507) 933-0880 | Skype: koldark
On Tue, Nov 17, 2009 at 8:11 AM, ibm <ibm@xxxxxxxxxx> wrote:
Craig,users?
I looked through your article. It looks like the connection to the db
is established with 'quser', meaning that all calls to the db will be
performed as the 'quser'. The user validation on the login page only
checks if the user/pass combo is valid but is never used in any db
calls. Am I seeing this right?
chris
-----Original Message-----
From: systemidotnet-bounces@xxxxxxxxxxxx
[mailto:systemidotnet-bounces@xxxxxxxxxxxx] On Behalf Of Craig Pelkie
Sent: Monday, November 16, 2009 5:15 PM
To: .net use with the System i
Subject: Re: [SystemiDotNet] Authenticating against the i
Here is an example of authenticating to IBM i uid/pwd:
http://www.web400.com/Penton/Authenticate.pdf
Craig Pelkie
----- Original Message -----
From: "Mike" <koldark@xxxxxxxxx>
To: <systemidotnet@xxxxxxxxxxxx>
Sent: Monday, November 16, 2009 2:03 PM
Subject: [SystemiDotNet] Authenticating against the i
Has anyone successfully set up authentication against the IBM i
How--
did you implement it?la
Also, have you use said authentication to connect to the database (a
connection string)?
--
Mike Wills
http://mikewills.info
P: (507) 933-0880 | Skype: koldark
--
This is the .net use with the System i (SystemiDotNet) mailing list
To post a message email: SystemiDotNet@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/systemidotnet
or email: SystemiDotNet-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/systemidotnet.
--
This is the .net use with the System i (SystemiDotNet) mailing list
To post a message email: SystemiDotNet@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/systemidotnet
or email: SystemiDotNet-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/systemidotnet.
--
This is the .net use with the System i (SystemiDotNet) mailing list
To post a message email: SystemiDotNet@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/systemidotnet
or email: SystemiDotNet-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/systemidotnet.
This is the .net use with the System i (SystemiDotNet) mailing list
To post a message email: SystemiDotNet@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/systemidotnet
or email: SystemiDotNet-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/systemidotnet.
--
This is the .net use with the System i (SystemiDotNet) mailing list
To post a message email: SystemiDotNet@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/systemidotnet
or email: SystemiDotNet-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/systemidotnet.
As an Amazon Associate we earn from qualifying purchases.
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.