Problem populating dropdownlist control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am unable to puoplate my dropdownlist control witht he correct data. I am tying to load the dates from a column in sql server via a stored proc. The date is appearing as 12/01/2001 12:00 am. I want it to be 12/01/2004. I used the convert function in sql server but i get an error loading the page. If I don't use the convert function the page loads but with the date as 12/01/2001 12:00 am

This is my S

create procedure sevenIssues
@productName varchar(50)

a

declare @productNumber varchar(10

exec POS_GetProductNumber @productName, @productNumber OUTPU

select Cover_Date from global_sales wher
Product_Number = @productNumbe

return
 
Unless you are using Strongly Typed Datasets, you should be able to do
something like:

select CAST(Cover_Date AS VARCHAR(11)) from global_sales where
Product_Number = @productNumber

Not sure how you were using CONVERT(), but it should work, as well without
strongly typed DataSets.

What error are you getting.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
CHRIS said:
Hi,
I am unable to puoplate my dropdownlist control witht he correct data. I
am tying to load the dates from a column in sql server via a stored proc.
The date is appearing as 12/01/2001 12:00 am. I want it to be 12/01/2004. I
used the convert function in sql server but i get an error loading the page.
If I don't use the convert function the page loads but with the date as
12/01/2001 12:00 am.
 
Back
Top