Calling A Stored Procedure From Script
Thu 23 Jan 2020 - 16:00
Is it possible to call a stored procedure from script?
Thanks,
Gareth
___________________________________________________________________________________________________________________________________
Cheers Graham. Given it a go with the following code and get an error (below, line 36 is the last line of the code):
Gareth
___________________________________________________________________________________________________________________________________
Massive thanks to both, working great now. Thanks.Gareth
Thanks,
Gareth
___________________________________________________________________________________________________________________________________
- Code:
Dim DL As FWBS.OMS.EnquiryEngine.DataLists = New FWBS.OMS.EnquiryEngine.DataLists("MYSPDL")
Dim params As FWBS.Common.KeyValueCollection = New FWBS.Common.KeyValueCollection
'Set the params
params.Add("Param1", SomeValue)
params.Add("Param2", FileID)
'Load the params
DL.ChangeParameters(params)
'Run the Datalist
DT = DL.Run(False)
G
Cheers Graham. Given it a go with the following code and get an error (below, line 36 is the last line of the code):
- Code:
FWBS.OMS.OMSFile CurrentFile = Enquiry.Object as FWBS.OMS.OMSFile;
System.Data.DataTable _dt = new System.Data.DataTable();
FWBS.OMS.EnquiryEngine.DataLists _dl = new FWBS.OMS.EnquiryEngine.DataLists("UDDSUPDSPECDAM");
FWBS.Common.KeyValueCollection _kvc = new FWBS.Common.KeyValueCollection();
_kvc.Add("fileid", CurrentFile.ID);
_dl.ChangeParameters(_kvc);
_dt = _dl.Run(false);
"error: Cannot implicitly convert type 'object' to 'System.Data.DataTable'. An explicit conversion exists (are you missing a cast?) Line 36"
Gareth
___________________________________________________________________________________________________________________________________
- Code:
_dt = _dl.Run(false);
//Would need to be cast into the DataTable object
_dt = (System.Data.DataTable)_dl.Run(false);
Massive thanks to both, working great now. Thanks.Gareth
Permissions in this forum:
You cannot reply to topics in this forum
|
|