How to add an IN PARAMETER Type TimeStamps in Stored Procedures calls?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to add an IN PARAMETER Type TimeStamps in Stored Procedures calls?
I'm having problems calling a stored procedures from script, the error ocurred exactly when I try to add an in parameter type DBtimestamp.
this is the code:
var SProc;
SProc = ADO.CreateADOStoredProc();
CnnString = ProjectSuite.Variables.connectionString;
SProc.ConnectionString = CnnString;
SProc.ProcedureName = "SPRCOBJ.ASOLINGTER";
// Adding an in parameter:
SProc.Parameters.AddParameter();
SProc.Parameters.Items(0).name = "AUVI";
SProc.Parameters.Items(0).DataType = ftFixedChar;
SProc.Parameters.Items(0).Size = 5;
SProc.Parameters.Items(0).Value = "19709";
.
.
.
.
/* This is the problem */
// Adding an in parameter:
SProc.Parameters.AddParameter();
SProc.Parameters.Items(55).name = "TFHVGM";
SProc.Parameters.Items(55).DataType = adDBTime; //The error occurred exactly in this line of code.
//SProc.Parameters.Items(2).Size = 26;
SProc.Parameters.Items(55).Value = "2017-01-05-08.36.44.311000";
.
.
.
.
// Running the procedure
SProc.ExecProc();
Please I need help!!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What error did you get? The exact message will help us help you.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error message would help, for sure... but question: You are apparently assigning a full date and time to the parameter. Shouldn't you be using adDBTimeStamp instead? I'm not sure if that would cause your error, but it seems odd to be using a time only datatype when you are passing in a full date time
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
