Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection and Logins
Message
 
 
À
08/09/2001 22:26:39
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00553501
Message ID:
00554399
Vues:
10
Hi!

This is default behaviour of ODBC driver.

First of all, Trusted Connection option is always checked by default no matter what you do, even when you try to include "TRUSTEDCONNECTION = NO" into the SQLStringConnect() string.

Then, another thing I did found is: when user ONLY ONCE connected to the SQL Server using it Windows NT authentification name as a name for logon to SQL Server, this is remembered by ODBC by some way. I did following:

nn = SQLStringConnect("Driver=SQL Server;Server=MyServer;")

This opened me the dialog box to enter the rest of connection properties.

Ok, now I used another thing:

nn = SQLStringConnect("Driver=SQL Server;Server=MyServer;user=vgryn")

This told me that such user cannot logon to SQL Server and opened me the same dialog box.

Next time I tried [nn = SQLStringConnect("Driver=SQL Server;Server=MyServer;")] again, and it tells me... user vgryn cannot logon!!!

Now I do not know how to get rid of that message other way but setting DispLogin property to 2 (Always show dialog).

Will be glad to know how to get rid of that user remembering or just find where it is stored...

HTH.

>>>Hi All,
>>>
>>>When I create a DSN and set it to use SQL Security and then I connect to that DSN with VFP it seems that it tries to use NT Authenticatin first, and after that fails I get an error message and then the login screen.
>>>
>>>Is this a VFP thing? Why doesn't it respect the login method and just give me a sql server login?
>>>
>>>BOb
>>
>>I just created a system DSN with sql login, and ran the following at the command prompt...
>>?sqlconnect('sqltest') -- prompts me for a sql login - if I enter the information it logs me in
>>
>>?sqlconnect('sqltest','sa','') -- just logs me in
>
>Was the SQL server you connected to running on NT?
>
>Also, I am using a connection that is set to use the DSN. The connection is set to SQL Login... I use SQLConnect('myconnection') and I am logged in without a sql login prompt. The connectino has NO userid or password in it, and is set to reguest login when necessary.
>
>So, it seems to me, if it didn't prompt for a login, then I was connected trusted.
>
>When I do this on a server that I DON'T have NT Access to, I get an error:
>
>Connectin Failed:
>SQL State: '28000'
>SQL Server Error: 18456
>Login failed for user 'ENTERPRISE\Administrator'
>
>Enterprise is the server, and Administrator is my NT login name. Then, when I press OK, it gives me a login screen, with 'Trusted' checked ON! So, that tells me it tried to connect trusted, even though the DSN was set up for SQL Login.
>
>The other weird thing is, if I change the connection to 'always' for ODBC Login prompts, and I try to connect with the connection, it prompts for a DSN then for the password, which is also weird since the DSN is specified in the connection.
>
>Any help on this would be great, cause my user that want to use SQL Logins are sick of getting the error message!!!
>
>BOb
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform