Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Saturday, December 30, 1899 problem

Author  Topic 

sql2003
Starting Member

1 Post

Posted - 2003-02-05 : 00:41:45
Hi,

I have problem to collect inputs time data from an HTML page and save this into the SQL database despite the SQL table data field is defined as text field. Somehow, it's added the Saturday, December 30, 1899 to the actual text data. If I run the same stored procedure to insert a record from the SQL Analyzer, the problem doesn't occur.

I did use response.write to display the collected value and it doesn't included the Saturday, December 30, 1899. Somehow only when the stored procedure is invoked from the asp page, that when the problem occurs.

Note: The web server runs on WIN2K, IIS5 and database server runs on WIN2K with SQL 2000.

Thanks.




X002548
Not Just a Number

15586 Posts

Posted - 2003-02-05 : 14:36:04
There are no miracles (quirks perhaps), but no miracles. I'd say that whatever app is calling the s/p, it's placing the incorrect value in it...esp since you indivate it's working fine from EM...
Maybe you can log the transaction to a text file...

i.e.

SET @var = 'Message: The Values are '+ @yourData
SET @cmd = 'echo ' + '"|' + @var + '|"' + ' >> d:\Data\log_out.txt'
SET @Command_string = 'EXEC master..xp_cmdshell ''' + @cmd + ''', NO_OUTPUT'

Good Luck

Brett

8-)

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-02-05 : 14:37:40
You'll have to add The following as well. Sorry.

Exec(@Command_String)

Put this after the statements.

Brett

8-)

Go to Top of Page

philh
Starting Member

18 Posts

Posted - 2003-02-05 : 16:28:14
Just as an aside, 12/30/1899 is the default "blank" date for FoxPro date fields. Maybe you're getting it from there?

PH

Phil Hegedusich
Senior Web Developer
IIMAK
http://www.iimak.com
The best thermal transfer printer ribbons on the planet
Go to Top of Page

slacker
Posting Yak Master

115 Posts

Posted - 2003-02-05 : 19:32:05
Response.Write the date in your asp page. If it is the correct date try using cdate() on it or something. vbscript is known to be wierd with variants.

Go to Top of Page
   

- Advertisement -