Johnny Prescott
Johnny Prescott

Reputation: 271

Exec with .. (Double dot)

I need to fetch data from a database but I need to use the query from an old in-house software.

I have trouble understanding the query and know where it fetch the data from.

I am working with VB and the below goes into the OleDbCommand. However, it looks to me like it only SQL understanding...

The Query:

exec securid..SecurIdFinderNew  '" & AccountChecker_Searchbar.Text & "', '', '', '', '', '', '', '', '' "

How does that Query work and how can I know what is the table and DB in that? There is a DB called "securid" but there is no table / view called "SecurIDFinderNew" in it.

I want to be able to list the columns name and create a normal Query with it.

P.S.:Somehow, the connection string does not connect to the "securid" DB so I guess that .. go one step backward. If that's the case, I should see "SecurIDFinderNew" when I list the tables in "securid" but i do not.

Been trying to figure this out for hours but can't find anything on google. I foung some information on ".." but can't make it work.

thanks for the help.

Upvotes: 1

Views: 597

Answers (1)

Siyual
Siyual

Reputation: 16917

EXEC (or EXECUTE) is used to call a STORED PROCEDURE. In the script you've provided, you are executing the securid..SecurIdFinderNew stored procedure.

This is the fully qualified name of the stored procedure ([Database].[Schema].[Object]), with the database name being securid, the schema being the default (hence the ..), and the procedure being SecurIdFinderNew.

If you look in the securid database from SSMS, and drill into Programmability and Stored Procedures, you should find that procedure listed there.

As for the rest of the script you've provided, these are the parameters that the procedure accepts.

I'm not sure what you mean by "I want to be able to list the columns name and create a normal query with it." If you want to change what the procedure does, you'll need to Modify (ALTER) the SecurIdFinderNew procedure.

Upvotes: 2

Related Questions