Problem populating dropdownlist control

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
 
C

Cowboy \(Gregory A. Beamer\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top