|
 |
asp_databases thread: Help needed.... DateTime....Time retrieval
Message #1 by "Nagesh" <nagesh5286@h...> on Fri, 29 Sep 2000 10:58:04 +0100
|
|
To whom who can help me..please
I have problem here,I have a webpage using ASP to update a database, SQL
Server 7.0.And I am sharing the database with another applicaton which is
developed with VB6.
The problem is, when I update the database, it is supposed to check
whether there is a record in the database by checking the date and time.
If the record is not there then it is supposed to add a new record but if
it is there it is supposed to update the fields in the record.
But,when a new time is added via the application(VB6),my web version is
not able to retrieve that particular record with that time.So, when I add
a same time with that previous time,instead of giving me notice that the
time already exist ..it updates for me a new record with the time format
as 01/01/1999 13:00:00(where 13:00:00 is the time that I requested),the
strange date(01/01/1999) appears in front of the time.But if my friend
updates the record through the application version,it updates as 13:00:00
And also,the application version can see my updates but I cannot see their
updates.I select my time as below:
-------------------------------the code-----------------------------------
set RS = createobject("ADODB.Recordset")
RS.Open "select * from tbk_sheet where service_id = '" & varService & "'
and Route_id = '" & varRoute & "' and Ddate = ' " & varDate & " ' and
CONVERT(varchar,Dtime, 108) = '" & vartime & "' ",
"dsn=express_SQL;uid=sa;pwd=;"
---------------------------------------------------------------------------
I do hope somebody or anybody can help me as soon as possible because it
is already my deadline.I thank in advance.
Waiting eagerly for a solution,
Nagesh
Message #2 by Toby Anscombe <tanscombe@m...> on Fri, 29 Sep 2000 13:59:12 +0100
|
|
Change the sp that does the insert to use GetDate() as it's value, this will
cure one potential problem by always having the same time reference and
avoiding any regional settings on the webserver.
HTH
Regards
T
-----Original Message-----
From: Nagesh [mailto:nagesh5286@h...]
Sent: 29 September 2000 10:58
To: ASP Databases
Subject: [asp_databases] Help needed.... DateTime....Time retrieval
To whom who can help me..please
I have problem here,I have a webpage using ASP to update a database, SQL
Server 7.0.And I am sharing the database with another applicaton which is
developed with VB6.
The problem is, when I update the database, it is supposed to check
whether there is a record in the database by checking the date and time.
If the record is not there then it is supposed to add a new record but if
it is there it is supposed to update the fields in the record.
But,when a new time is added via the application(VB6),my web version is
not able to retrieve that particular record with that time.So, when I add
a same time with that previous time,instead of giving me notice that the
time already exist ..it updates for me a new record with the time format
as 01/01/1999 13:00:00(where 13:00:00 is the time that I requested),the
strange date(01/01/1999) appears in front of the time.But if my friend
updates the record through the application version,it updates as 13:00:00
And also,the application version can see my updates but I cannot see their
updates.I select my time as below:
-------------------------------the code-----------------------------------
set RS = createobject("ADODB.Recordset")
RS.Open "select * from tbk_sheet where service_id = '" & varService & "'
and Route_id = '" & varRoute & "' and Ddate = ' " & varDate & " ' and
CONVERT(varchar,Dtime, 108) = '" & vartime & "' ",
"dsn=express_SQL;uid=sa;pwd=;"
---------------------------------------------------------------------------
I do hope somebody or anybody can help me as soon as possible because it
is already my deadline.I thank in advance.
Waiting eagerly for a solution,
Nagesh
|
|
 |