Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CONNECTING SQL Serverf
Message
 
To
23/10/2002 19:02:18
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00714592
Message ID:
00714603
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform