Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CONNECTING SQL Serverf
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00714592
Message ID:
00714603
Vues:
17
>Anyone can explain me how i connect to SQL Server with Windows Authentication with This type of connection..
>
>.oConnection.OPEN( "DRIVER={SQL Server};" + ;
>	           "Server=localhost;"+ ;
>                   "DATABASE=JBEMPRESAS;"+ ;
>                   ......
>
>
>I try with Trusted_Connection=YES but no luck, and i can't find any papers that explain this connection type.

Hi João

As far as I know, that kind of connection (via ODBC, with DRIVER={SQL Server}) uses integrated security by default, unless you specify a UID / PWD
And in any case, "Trusted_Connection=Yes;" would do the job.

Why don't you try the OLEDB connection string:
o.Open("Provider=SQLOLEDB;Data Source=(local);Initial Catalog=Northwind;Integrated Security=SSPI")
(At least try it to verify if the current user really has the required permissions, if you don't want to switch permanently to the OLEDB provider)
Maybe your code is executing with another identity (i.e. Anonymous user on an ASP page)

Hope this helps
Regards,
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform