Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLEXEC statement fails 1

Status
Not open for further replies.

carolx

Programmer
Jul 22, 2003
75
JM
What is wrong with this statement:

lnResult = SQLEXEC(oGv.pnConnhandle, 'EXEC ClientSecurity.UsersCloneSP','userz')

The stored procedure is qualified by a schema name.
 
In the SQL Server forum, you can ask for possible reasons why an [tt]EXEC ClientSecurity.UsersCloneSP[/tt] fails when [tt]ClientSecurity.UsersCloneSP[/tt] is a fully qualified name, but not about VFP code. You already also posted to the Foxpro Forum, so that's fine, but when you also want to get the expertise from SQL Server experts you have to ask about the core SQL Server code and nothing client side surrounding this.

Do this directly in MSSQL Management Studio connected to the same server with the same user you'll be getting an error message displayed.

The important point is you're making the exact same connection. It could be as simple as this database or schema not existing at this server, the user having no execution permission or the stored proc needing non-optional parameters.

And before you cross-post the same question at least in two sites and 3 forums, then perhaps first wait, what answers are coming back and are sufficiently explaining your problem, before asking at 3 or more places and then most likely not coming back to some or even most of them.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Olaf I did what you suggested. The message was connectivity error - could not find the stored procedure. I was just fishing around for other opinions. It worked when I qualified the stored procedure with the database name. Thanks 100 percent.
 
OK, if you don't specify the database in your connection string, your fully qualified name must contain that, too, not just the schema. SQL Server fully qualified names (in short FQNs) are database.schema.procedure, database.schema.table or more general database.schema.object.

Most general you can get a list of FQNs from the SQL Server master data:


Bye, Olaf.

Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top