- Michael Kramer
- PowerBuilder
- Monday, 1 October 2018 03:42 PM UTC
Hi, any of you seen similar behavior where CONNECT using Windows authentication requires repeated CONNECT attempts?
What I have:
Setup :: PB 2017 R3, #1858 using ADO.NET with MSSQL.
Code :: See below
Successful each time
Fails often, but repeating succeeds each time.
...
this.DBMS = 'ADO'
this.DBParm = "NameSpace='System.Data.SqlClient'"
this.DBParm += ",DataSource= ..."
...
this.DBParm += ",TrustedConnection=1"
this.LogId = ''
this.LogPass = ''
...
CONNECT USING this;
if this.SQLCode 0 then
...
Error info here is as follows:
this.SQLCode = -1
this.SQLDBCode = 999
this.SQLErrText = System.Exception: Failed to get current user name.
at Sybase.PowerBuilder.Db.Block.SqlBlock.Connect(Object[] input, Dbms& dbms, DBVersion& dbVer, String& user)
at Sybase.PowerBuilder.Db.DbRoutine.Connect(DbDrivers type, Object[] input, Dbms& dbms, DBVersion& dbVer, String& user)
It is the CONNECT statement itself that fails with this error message. No embedded SQL form the PowerBuilder app has executed yet.
First attempt at CONNECT using TrustedConnection has approx 50% success rate.
Second attempt has so far had a 100% success rate. We need first attempt to show same success rate.
Any suggestions greatly appreciated!
/Michael
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.