You are here: Re: Help with calling a job from Stored P and VBA......HELP « MsSQL Server « IT news, forums, messages
Re: Help with calling a job from Stored P and VBA......HELP

Posted by nicolec on 09/26/25 11:26

Here's a sample that pulls the variable from a form and passes it to a
stored procedure:

'Declare variables
Dim cmd As ADODB.Command
Dim prm As Parameter

'Set connection and command properties
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "spMyProcedure"

'Set parameters
Set prm = cmd.CreateParameter("@myVariable", adInteger, adParamInput)
cmd.Parameters.Append prm
prm.Value = Forms!myForm.myVariable.Value

'Run Command
cmd.Execute

'Cleanup resources
Set cmd = Nothing
Set prm = Nothing

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация