Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble Getting Recordset Back From SQL Stored Proc
Message
From
12/02/2004 16:43:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Trouble Getting Recordset Back From SQL Stored Proc
Miscellaneous
Thread ID:
00876871
Message ID:
00876871
Views:
60
Hi All,

I know this is a pretty open ending question, but I'm having trouble getting a populated recordset returned from a SQL Server stored procedure (which executes fine in SQL Query Analyzer). I've tried calling the stored procedure using the Connection object, Command object, Command object with named parameters, just about any example I could find on the net to no avail. I'm wondering if it's something as simple as a setting that I'm missing...

Here are the various ways that I've tried:
** oConn is already created and Open()

oRS = oConn.Execute("spSecurity_GetObjectsForUser @ObjectIDStart=1000, @Depth=-1, @UserAccountID=13, @ObjectTypeCSV='2', @MinimumPermissionLevel=100")
* No Errors, oRS state is 0 

oRS = oConn.Execute("spSecurity_GetObjectsForUser 1000, -1, 13, '2', 100")
* No Errors, oRS state is 0 

oRS = CREATEOBJECT("ADODB.Recordset")
oConn.spSecurity_GetObjectsForUser(1000, -1, 13, '2', 100, oRS)
* No Errors, oRS state is 0 

oRS = oConn.spSecurity_GetObjectsForUser(1000, -1, 13, '2', 100)
* No Errors, oRS state is 0 
The SQL Profiler shows the executing command which again, looks fine and executes in the SQL Query Analyzer.

Does anyone have an idea of what I can look for?


Thanks,

- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Next
Reply
Map
View

Click here to load this message in the networking platform