Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Cetin Basoz
 To: Jill Lindgren
  Where is Jill Lindgren?
 Massachusetts - United States
 Jill Lindgren
Subject: RE: Connectivity Error SQL Connection
Thread ID: 288766 Message ID: 288856 # Views: 28 # Ratings: 1
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Friday, December 24, 2010 4:26:46 PM         

> I have a DBC with a connection to the SQL server. In the DBC is a view which I call on the SQL box and it downloads some records into the view so i can use them in Fox. I put it on the client's machine, created an ODBC connection in windows and all was well.
> They then wanted to give someone else the ability to run the program. I went through the same steps, created the exact ODBC connection on the computer but when they get to the line of code that access the view they get:
> Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]The SELECT permission was denided on the object 'v_EbayOrders', database "MMM", schema 'dbo'.
> I checked to make sure the user had full rights to the folder the DBC is in and they do.
> Why can one computer successfully use the view and the other cannot?
> Thanks!
> Jill Lindgren

SQL server database security have nothing to do with folder security. Even an administrator on a computer, connecting to an SQL server instance on the same computer may be denied to do some operations (or any operation on a database) depending on how she/he connects. Probably your ODBC connection had windows authentication (which is the recommended one - no user id, pwd on connection string. Connection uses user's windows NT logon information instead) and the user connected was not granted to select on that database. Ask your SQL DBA to check logins and rights.

Cetin Basoz

.Net has got better.Think about moving - check my blog:
Blog (main)
Blog (mirror)


Connectivity Error SQL Connection Posted by Jill Lindgren @ 12/23/2010 8:55:46 PM
RE: Connectivity Error SQL Connection Posted by Alex Grima @ 12/23/2010 10:03:44 PM
RE: Connectivity Error SQL Connection Posted by Mike Gagnon @ 12/24/2010 12:41:25 PM
RE: Connectivity Error SQL Connection Posted by Cetin Basoz @ 12/24/2010 4:26:46 PM