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.
| 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 '+ @yourDataSET @cmd = 'echo ' + '"|' + @var + '|"' + ' >> d:\Data\log_out.txt'SET @Command_string = 'EXEC master..xp_cmdshell ''' + @cmd + ''', NO_OUTPUT'Good LuckBrett8-) |
 |
|
|
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.Brett8-) |
 |
|
|
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?PHPhil HegedusichSenior Web DeveloperIIMAKhttp://www.iimak.comThe best thermal transfer printer ribbons on the planet |
 |
|
|
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. |
 |
|
|
|
|
|
|
|