SACommand cmd = new SACommand( "SET TEMPORARY OPTION connection_authentication='Company=XXX Inc;Application=XXXX;Signature=010fa55157edb8e14z813eb4fe3db41447846f1571g6470c2dce685f48eae9e472027825d02d41gc206';", connPC); cmd.ExecuteNonQuery(); above is how I have my .net app attempting to authenticate.... I always get a -218 error.. This is pretty much identical to the example in the Sybase documentation..... Any ideas what is wrong... Note: The Signiture above has been changed from my actual one.... I use copy and paste to get the proper one into my application thus I am sure I do not have a typo... |
The error -218 indicates that there is some problem with the authentication string. Try the following:
If you continue to have problems, you will likely need to work with support who can review the option values in more detail. |
I think this was my bad: After going through this over again 3 times : being much more careful on the copy / paste. It appears to work. At least 3 test cases without error. Keeping myfingers crossed.... It is definitly extreamly sensitive to being exact format........ Thanks for the feedback.... Been there, too - I remember to have fiddled around with a DSN with the authentication string as part of the InitString - and then to find out that I just had silently omitted the last character while copying the authentication string...
(04 Jan '12, 11:53)
Volker Barth
We have also seen times where copying and pasting from a program where the text went more than one line copied the line breaks, which are not part of the string.
(04 Jan '12, 14:40)
Siger Matt
|
IMHO, the string looks resaonable. What happens when you use that statement to authenticate within DBISQL or dbisqlc?
Have you checked that the database itself is authenticated correctly, say with
To authenticate the connexion, I use the InitString property of the connexion object. Something as :
myConn = new SAConnection("my_connexion_string");
myConn.InitString = "SET TEMPORARY OPTION CONNECTION_AUTHENTICATION = 'my_authentication_string'";
myConn.Open();
Which build of 12 are you using? We also had authentication issues because our Application name has a single quote on it. This was addressed in a later build of SA12.