Ask a Question

How to add an IN PARAMETER Type TimeStamps in Stored Procedures calls?

Frequent Visitor

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.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.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-";
// Running the procedure




Please I need help!!

Community Hero

What error did you get?  The exact message will help us help you.

[Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
Esteemed Contributor

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
Showing results for 
Search instead for 
Did you mean: