|
-
Mar 25th, 2004, 03:30 PM
#1
Thread Starter
Fanatic Member
User Profile Problem - Not machine Specific?
I have a user that is getting the following SQL exception when trying to run a stored procedure that has a date parameter as input:
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."
The interesting thing is that any machine that this user logs into and runs the application the same thing happens. It only happens to this user. But someone else can log into the same machine and it works fine.
Is there some master NT profile that is set up within the domain that might be causing this?
Any help or suggestions would be greatly appreciated.
-
Mar 25th, 2004, 06:43 PM
#2
I wonder how many charact
Strange indeed... could you post the code?
Certainly people can set up their culture-specific time information... as you do in Control Panel, Regional Language Options.. never realized it was specific to the user though.
-
Mar 26th, 2004, 08:45 AM
#3
Thread Starter
Fanatic Member
Maybe it is a regional setting on the SQL Server for this persons login? My thought was that the month and day in the date format was being thrown off because the users regional settings were different than English. The stored procedure is:
VB Code:
CREATE PROCEDURE dbo.xxxxx
(
@customernum as integer,
@sometype as char(1),
@startdate as datetime,
@anothertype as char(2),
@numweeks as integer
)
AS
Set NoCount On
if @numweeks != 0
begin
select @startdate = DATEADD(wk,-@numweeks,{ fn curdate()})
end
select x, y, z
from sometable
where CustomerNum = @customernum
and Sometype = @sometype
and Anothertype = @anothertype
and xDate >= @startdate
order by xDate desc
GO
I have verified that the format of the date being passed in is dd/mm/yyyy 12:00:00 AM, which should be ok.
Any ideas?
-
Mar 26th, 2004, 09:12 AM
#4
Thread Starter
Fanatic Member
Ah, I have found the problem at last!
If anyone is interested, it was that the users login in the SQL Server had the default language set to Italian instead of English! Having limited access to the database (not being able to see this information) made it a bit harder for me to solve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|