![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | executing sql stored procedure Hi, I would like to know if it possible to have a login vbs script that picks up the username and computer name and then passes this into to a stored procedure that exists on a mssql 2005 box. I had the syntax of dim network set network = wscript.createobject("wscript.network") Set WshShell = WScript.CreateObject("WScript.Shell") Set WshSysEnv = WshShell.Environment("PROCESS") 'The server name is SERVER the database is DB and the proc is SQLStoredProc WshShell.Run "osql -S SERVER -E -Q""EXEC DB..SQLStoredProc Network.username,network.computername"" " but I understand that oqsl does not work with sql2005 and I cannot get sqlcmd to work in the same manner. I hope someone can come to my rescue. Ta |
My System Specs![]() |
| | #2 (permalink) |
| | Re: executing sql stored procedure november_hotel wrote: Quote: > Hi, > > I would like to know if it possible to have a login vbs script that > picks up the username and computer name and then passes this into to a > stored procedure that exists on a mssql 2005 box. > > I had the syntax of > > dim network > > set network = wscript.createobject("wscript.network") > > Set WshShell = WScript.CreateObject("WScript.Shell") > > Set WshSysEnv = WshShell.Environment("PROCESS") > > > 'The server name is SERVER the database is DB and the proc is > SQLStoredProc > > WshShell.Run "osql -S SERVER -E -Q""EXEC DB..SQLStoredProc > Network.username,network.computername"" " > > but I understand that oqsl does not work with sql2005 and I cannot get > sqlcmd to work in the same manner. > > I hope someone can come to my rescue. > Ta http://groups.google.com/group/micro...fedf4e1efd63a6 -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Streamreader and BCP vs SqlConnection and a Stored Procedure | PowerShell | |||
| Could not find Stored Procedure error in VB script | VB Script | |||
| How can a Record type be returned by a stored procedure? | VB Script | |||
| Calling a stored procedure from powershell | PowerShell | |||
| Executing Stored Procedure from Powershell | PowerShell | |||