Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing a script from VFP
Message
 
 
To
10/09/2006 17:44:24
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01152673
Message ID:
01152686
Views:
17
Charles,

Is this under SQL2000? The rest of this reply is for SQL2000, if it's 2005 (I don't have that locally installed yet) this might point you in the right direction. If so make sure the user you are connecting with has got DDL Admin rights. In Enterprise Manager go to the Security/Logins tree item, select the user you are connecting with, rightclick and properties, on the Database Access tab, check the databases the user is allowed to access, select the one you are trying to change and make sure db_ddladmin is checked on. Alernatively the user can be set to db_owner but that givee it additional features which you may not want to allow.

>I would like to run sql scripts to alter a sql table from VFP 9.0.
>
>I have a script that adds a timestamp field - cut and pasted from change script. Works fine running script in Management Console.
>
>Same script run with sqlexec(nhandle,lcscript) from VFP returns -1
>
>SQL Profiler shows the script was sent and it looks correct. Nothing I can see in sql profiler shows an error, but there is definitely no change to the table.
>
>The only thing I can see as a difference is that my odbc uses a trusted connection ( which works fine for otherwise adding data etc from VFP ) which is my windows log in ( everything is on the same box ) Could this be an issue of permissions? I looked at database permissions and don't see my login there under the choices I get when I try to browse login objects. It is the primary login on that box and the way I was logged in when I created the database. Other logins show up. Obviously I don't know what I am doing.
>
>I am on Windows XP. No domain. Can anyone shed some light on all this for me or direct me to something I should read to straighten out windows security working with SQL security under these circumstances once and for all. I am sure this lack of understanding is also why I am having a hard time connecting via tcp ip to my sqlserver2005 ( where I did not seem to have a problem in 2000)
>
>Most of what I look at in help on this stuff seems to presuppose a domain or that I know more about either sql or windows than I do, so I think the time has come to start filling some serious knowledge holes.
>
>TIA for any light anyone can shed on a question this scattered or a questioner this clueless.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform