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:
01152675
Views:
17
When SQLEXEC() returns -1, you should use AERROR() to get detailed info about ODBC error.

>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.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform