123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
Using a Stored Procedure with ADO

--------------------------------------------------------------------------------

Description : This will connect to your specified Stored Procedure, refresh the parameters, add each parameter, and then execute it. Optionally, it has a return value, as a parameter. This is always useful when inserting, and using @@identity

Dim cn As New ADODB.Connection
cn.Open sConStr
Dim cmd As New ADODB.Command
cn.CursorLocation = adUseClient
Set cmd.ActiveConnection = cn
cmd.CommandText = "addNew_Service"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Refresh
cmd.Parameters.Item("@wsdlfilename") = CStr(services(serviceId).wsdlfilename)
cmd.Parameters.Item("@WSMLFileName") = CStr(services(serviceId).WSMLFileName)
cmd.Parameters.Item("@name") = CStr(services(serviceId).name)
cmd.Parameters.Item("@description") = CStr(services(serviceId).description)
cmd.Parameters.Item("@uuid") = CStr(sUUID)
cmd.Parameters.Item("@Service_ID") = 0
cmd.Execute
Debug.Print Err.description
newService_ID = cmd.Parameters("@Service_ID").Value
 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG