Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts

Monday, March 26, 2012

more date problems...

I have a high number of computers that at logon write some information
to a sql 2005 database. Information such as computer name, user name,
logon date and logon time are entered.

Because computers use different regional options, I notice that queries
to this database return inconsistent results due to different date
formatting. For example I see computers entering 1/3/2006 and 1/3/6 or
1/3/06.

How can I modify my query so that it reformats the date. This is my
current query I execute from within an ASP application:

RS.Open "Select * from PCLogs.dbo.logs WHERE Note = '" &
Request.Form("date") & "' ", dbConn, 1

The date is a variable that refers to a dd/mm/yyyy format. The date
column is of type text.

I'm a novice in SQL so any help would be greatly appreciated !
TIA and Regards--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1

The date column should not be a "text" column (I assume you mean a
VARCHAR column). It should be a Date data type column. Change that, if
you can.

I don't know if VBScript has the Format() function, but try that. E.g.:

Format(Request.Form("date"),"YYYYMMDD")

This will format the date in a format that SQL understands.

If you can't change the data type of the column you should be using a
stored procedure (SP) to save the data into the table. The SP should
format the date data to a default format, preferrably YYYYMMDD, that the
VBScript command can "know" to use when querying the table.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

--BEGIN PGP SIGNATURE--
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRAYOA4echKqOuFEgEQJ51wCfdi5FGvlY/cT7wCe6qLzaciAya7IAoNdh
WjXzm/NNtiUAJdhiVpFCZTMh
=c6LY
--END PGP SIGNATURE--

zerbie45@.gmail.com wrote:
> I have a high number of computers that at logon write some information
> to a sql 2005 database. Information such as computer name, user name,
> logon date and logon time are entered.
> Because computers use different regional options, I notice that queries
> to this database return inconsistent results due to different date
> formatting. For example I see computers entering 1/3/2006 and 1/3/6 or
> 1/3/06.
> How can I modify my query so that it reformats the date. This is my
> current query I execute from within an ASP application:
> RS.Open "Select * from PCLogs.dbo.logs WHERE Note = '" &
> Request.Form("date") & "' ", dbConn, 1
> The date is a variable that refers to a dd/mm/yyyy format. The date
> column is of type text.
> I'm a novice in SQL so any help would be greatly appreciated !
> TIA and Regards

Monday, March 12, 2012

Monitoring netwrok traffic

Dear All,
I have 2 SQL Server 2000 computers. Each server contains data for one of
regional divisions. Company employees currently use a single data entry
application on client
computers. After the new application is installed, query response times
slow. My IT Manager ask me to monitor server traffic during business
hours to help him diagnose this problem. What should I do?
Thanks
Robert LieHi,
You can install a tool like MRTG to monitor network traffic or use the
windows performance monitor to track the number of bytes send/received per
second.
Erik
"robert lie" <robert.lie24@.gmail.com> wrote in message
news:OoShX$RZFHA.2884@.tk2msftngp13.phx.gbl...
> Dear All,
> I have 2 SQL Server 2000 computers. Each server contains data for one of
> regional divisions. Company employees currently use a single data entry
> application on client
> computers. After the new application is installed, query response times
> slow. My IT Manager ask me to monitor server traffic during business
> hours to help him diagnose this problem. What should I do?
> Thanks
> Robert Lie

Monitoring netwrok traffic

Dear All,
I have 2 SQL Server 2000 computers. Each server contains data for one of
regional divisions. Company employees currently use a single data entry
application on client
computers. After the new application is installed, query response times
slow. My IT Manager ask me to monitor server traffic during business
hours to help him diagnose this problem. What should I do?
Thanks
Robert LieHi,
You can install a tool like MRTG to monitor network traffic or use the
windows performance monitor to track the number of bytes send/received per
second.
Erik
"robert lie" <robert.lie24@.gmail.com> wrote in message
news:OoShX$RZFHA.2884@.tk2msftngp13.phx.gbl...
> Dear All,
> I have 2 SQL Server 2000 computers. Each server contains data for one of
> regional divisions. Company employees currently use a single data entry
> application on client
> computers. After the new application is installed, query response times
> slow. My IT Manager ask me to monitor server traffic during business
> hours to help him diagnose this problem. What should I do?
> Thanks
> Robert Lie

Monitoring netwrok traffic

Dear All,
I have 2 SQL Server 2000 computers. Each server contains data for one of
regional divisions. Company employees currently use a single data entry
application on client
computers. After the new application is installed, query response times
slow. My IT Manager ask me to monitor server traffic during business
hours to help him diagnose this problem. What should I do?
Thanks
Robert Lie
Hi,
You can install a tool like MRTG to monitor network traffic or use the
windows performance monitor to track the number of bytes send/received per
second.
Erik
"robert lie" <robert.lie24@.gmail.com> wrote in message
news:OoShX$RZFHA.2884@.tk2msftngp13.phx.gbl...
> Dear All,
> I have 2 SQL Server 2000 computers. Each server contains data for one of
> regional divisions. Company employees currently use a single data entry
> application on client
> computers. After the new application is installed, query response times
> slow. My IT Manager ask me to monitor server traffic during business
> hours to help him diagnose this problem. What should I do?
> Thanks
> Robert Lie