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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Stored Procedure Call

Status
Not open for further replies.

gbaughma

IS-IT--Management
Staff member
Nov 21, 2003
4,772
US
I'm trying to write a little script that will create users on our web page from our accounting software.

The concept is that the salesperson would click on a button that would create the web account, using the email as the user ID, and a randomly-generated password that would be changed the first time they log on.

The issue is that the SQL server that has the stored procedures to create the accounts is NOT on the same server that the accounting software is running.

So the question is this: How can I call a stored procedure on a different server and pass parameters, preferably as a command line?

Something like "SQLCMD EXEC Server.Database.dbo.StoredProcedure UserName,Password,Etc...."

Any thoughts? Or am I approaching this incorrectly?

The button in our accounting software would essentially call a VBScript with parameters from the User Account screen passed to it.



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
the salesperson would click on a button" What are you using as your front end and why couldn't your front end call the appropriate SQL server?

Simi
 
I agree with Simi. If you are going to use SQLCMD, then you should just connect to the server you need to connect to by using the -S command line argument.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
  • Thread starter
  • Moderator
  • #4
I'm using MAS90. The button would call a VBScript. The SQL server is on a different machine.

I think the solution is to call the SP with an ADODB.command from my vbscript.

Sorry if I'm not making much sense... killer headache today... can't even focus.


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
  • Thread starter
  • Moderator
  • #5
... something like thread329-1456528



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top