fadiel ras
asked on
How do I pass a Date value from a Calendar column using a Stored Procedure
I have a DateTimePicker as a calendar column inside a datagrid.
testing the parameter with "Today.Date" then the record commits.
When trying to use the date time Picker, it fails.
my question is "How do I pass a parameter to a Stored Procedure using a DateTimePicker from a calendar column (The calendar colum is obviously inside a datagridview)
This is my current test code to pass the SP to the SQL table:
testing the parameter with "Today.Date" then the record commits.
When trying to use the date time Picker, it fails.
my question is "How do I pass a parameter to a Stored Procedure using a DateTimePicker from a calendar column (The calendar colum is obviously inside a datagridview)
This is my current test code to pass the SP to the SQL table:
AddParamater("@EffectiveDate", Today.Date, DbType.Date)
ASKER
Thanks Pawan, this works to also pass today's date. I need to pass the selected date from the DateTimePicker.
I tested it. so when I select a date, the value in the table defaults to today's date, which is my exact problem.
thanks, please try to assist further, thanks
I tested it. so when I select a date, the value in the table defaults to today's date, which is my exact problem.
thanks, please try to assist further, thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found my problem
AddParamater("@EffectiveDa
Data Type in Database should be - DATETIME