Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Thursday, March 22, 2012

ASP Code to Monitor Scheduled SQL Jobs via the web

Hi Guys,

I'm Hoping some one could help me out, I'm in need of creating a web interface to monitor scheduled SQL Jobs, both on sql 2000 & 2005.

I'm new to asp, Can anyone point me in the right direction.Really appreciate it.

Regards

This should get you started for SQL2005.

<%@. Page Language="VB" EnableTheming="False" %><%@. ImportNamespace="System.Data" %><%@. ImportNamespace="System.Data.SqlClient" %><!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">Protected Sub Page_Load(ByVal senderAs Object,ByVal eAs System.EventArgs)If Not Page.IsPostBackThen JobHistory_GridView.DataSource = FJobHistory_GridView() JobHistory_GridView.DataBind()End If End Sub Function FJobHistory_GridView()As System.Data.IDataReaderDim SelectConnAs New SqlConnection("SQL_Server_ConnectionString_With_User_That_Can_Access_MSDB_Database")Dim SelectCmdAs New SqlCommand() SelectCmd.CommandText ="msdb.dbo.sp_help_jobactivity" SelectCmd.CommandType = CommandType.StoredProcedure SelectCmd.Connection = SelectConn SelectConn.Open()Dim dataReaderAs IDataReader = SelectCmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)Return dataReaderEnd Function </script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>SQL Job History</title></head><body> <form id="form1" runat="server"> <div> <asp:GridView ID="JobHistory_GridView" runat="server" AutoGenerateColumns="True"> </asp:GridView> </div> </form></body></html>
|||

Thanks a mil Brad,

This will def come in handy, I'm new at this company, i've noticed that they already have a web interface set up to monitor sql jobs, at present it is setup to monitor jobs on sql 2000, I need to now get this working with sql2005, I've configured everything neccessary on the config & aspx pages. I get a connection to sql 2005, I know this because as part of the monitoring tool you are able to view proccesser info as well, I can view this information of the the sql 2005 server however it does not display the jobs. (Just Blank)

Any idea why this might be? I could post the code if that would help.

Thanks again for your assistance.

BR

|||

Try this for the gridview instead

 <asp:GridView ID="JobHistory_GridView" runat="server" AutoGenerateColumns="False" DataKeyNames="session_id,job_id"> <Columns> <asp:BoundField DataField="session_id" HeaderText="session_id"ReadOnly="True" /> <asp:BoundField DataField="job_id" HeaderText="job_id"ReadOnly="True" /> <asp:BoundField DataField="job_name" HeaderText="job_name" /> <asp:BoundField DataField="run_requested_date" HeaderText="run_requested_date" /> <asp:BoundField DataField="run_requested_source" HeaderText="run_requested_source" /> <asp:BoundField DataField="queued_date" HeaderText="queued_date" /> <asp:BoundField DataField="start_execution_date" HeaderText="start_execution_date" /> <asp:BoundField DataField="last_executed_step_id" HeaderText="last_executed_step_id" /> <asp:BoundField DataField="last_executed_step_date" HeaderText="last_executed_step_date" /> <asp:BoundField DataField="stop_execution_date" HeaderText="stop_execution_date" /> <asp:BoundField DataField="next_scheduled_run_date" HeaderText="next_scheduled_run_date" /> <asp:BoundField DataField="job_history_id" HeaderText="job_history_id" /> <asp:BoundField DataField="message" HeaderText="message" /> <asp:BoundField DataField="run_status" HeaderText="run_status" /> <asp:BoundField DataField="operator_id_emailed" HeaderText="operator_id_emailed" /> <asp:BoundField DataField="operator_id_netsent" HeaderText="operator_id_netsent" /> <asp:BoundField DataField="operator_id_paged" HeaderText="operator_id_paged" /> </Columns> </asp:GridView>
If that doesnt work, post your code.

Sunday, March 11, 2012

AS400 DB2 connection strings

I am trying to construct a connection string via iSeries OleDb provider. The default list of libraries on the AS400 for my user is fine for production. But in test scenarios the code/data libraries are rolled out through a sequence of test libraries. How do I specify the additional libraries for testing.

I connect fine and can execute sql. the statements like insert into TestLibrary.Table work fine, but the associated trigger code isn't called.

Would it be better to use the .Net Connection set of classes instead. I switched from ODBC to OleDb because of assumed thread safety issues.I don't understand what you're looking for. Can you be more specific? If trigger code isn't called, how is that an SSIS issue?|||Maybe not.

The problem is building a connection string to communicate withe as400 db2. I found other threads in this forum dealing with other issues on this connectivity. The point about the trigger code not executing is because the library on the as400 that contains the trigger code is not part of the default library list for the connecting user.

the question is how to construct the connection string to add additional libraries into the scope of the connection. I was able to do so using ODBC. I wanted to use either the OleDb or the ADO clone iSeries connection stuff to do it as well.|||This link might help: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1061900&SiteID=1

AS2005: write a cube to a local .cub via xmla?

Hi,

i wonder if it is possible to write a cube (in AS2005) to a local .CUB file using xmla instead of the "old" CREATE GLOBAL CUBE statement ...
I haven't found anything in the msdn ... perhaps I've been blind?

background of this question:
http://forums.microsoft.com/msdn/ShowPost.aspx?postid=463952&siteid=1

Thanks for your answers and for tolerating my bad english
best regards,
Sven

Yes, it is possible. The easiest way to get an example of how to do it is to run a CREATE GLOBAL CUBE statement on your cube while you have a Profiler trace running - the CREATE GLOBAL CUBE statement gets translated to AS's XML/A scripting language in the background and you'll see that script in the trace. You can then change it as you need and possibly fix your problem.

Chris

|||Thanks for your quick reply!

We used the Profiler before and found the xmla-statement that is used

to create the new cube ... no problem so far; it creates a new database

with the cube as we want it to be.

But we didn't find the xmla-statement that writes the cube into the .cub file.

There are 3 lines in the Profiler where the filename of the .cub

appears: 2 times in the context of a copy of the original CREATE GLOBAL

CUBE statement and the last time in the line where we found the

statement that creates the cube.

The Profiler says something like this:

"CREATE GLOBAL CUBE-Instruction | FILENAME=c:\newcube.cub | DDL | <batch>...</batch>"

The <batch> we can extract to create our cube, but the part before is no scripting-language we know.

Perhaps it makes sense for you? ;)

Greetings,

Sven|||I think it's just extra information flagging the fact that this is a local cube being created and where the .cub file is located, and not DDL. Certainly when I remove it and just run the Batch statement (in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube) then it all works ok.|||

Hi, Can you explain how exactly you run the BATCH statement in order to get the .CUB file?

I am using ADOMD.NET.

When I run the statement using management studio, the query succeed but nothing is created and there is no place to set the local file location.

Thanks,

Ofer

|||Hi Chris,
I'm reading your book on MDX (MDX Solutions 2ndEd.) and am currently struggling with the creation of local cubes. I want to create a local cube in Excel via VBA, but notice that the CREATE CLOBAL CUBE statement doesn't correctly save all data, so I'm experimenting with the ASSL approach.
In your book you write (p. 528) "...to create a local cube using ASSL,...:You open a connection to your target (in this case a .cub file), then execute your ASSL statement."
I'm wondering how you do this, apparently not with the MDX Sample app.?
What kind of connection is that if I need to do this using VB(A), or should I use .NET?|||

Hi Christopher,

Take a look at:
http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!877.entry

Regards,

Chris

|||

in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube

The reason is that local cubes don't support more than one connection to the cube file, and Management Studio usually wants to open two connections (one for AMO), even if you only want to send MDX queries.

AS2005: write a cube to a local .cub via xmla?

Hi,

i wonder if it is possible to write a cube (in AS2005) to a local .CUB file using xmla instead of the "old" CREATE GLOBAL CUBE statement ...
I haven't found anything in the msdn ... perhaps I've been blind?

background of this question:
http://forums.microsoft.com/msdn/ShowPost.aspx?postid=463952&siteid=1

Thanks for your answers and for tolerating my bad english
best regards,
Sven

Yes, it is possible. The easiest way to get an example of how to do it is to run a CREATE GLOBAL CUBE statement on your cube while you have a Profiler trace running - the CREATE GLOBAL CUBE statement gets translated to AS's XML/A scripting language in the background and you'll see that script in the trace. You can then change it as you need and possibly fix your problem.

Chris

|||Thanks for your quick reply!
We used the Profiler before and found the xmla-statement that is used to create the new cube ... no problem so far; it creates a new database with the cube as we want it to be.
But we didn't find the xmla-statement that writes the cube into the .cub file.
There are 3 lines in the Profiler where the filename of the .cub appears: 2 times in the context of a copy of the original CREATE GLOBAL CUBE statement and the last time in the line where we found the statement that creates the cube.
The Profiler says something like this:
"CREATE GLOBAL CUBE-Instruction | FILENAME=c:\newcube.cub | DDL | <batch>...</batch>"
The <batch> we can extract to create our cube, but the part before is no scripting-language we know.
Perhaps it makes sense for you? ;)
Greetings,
Sven
|||I think it's just extra information flagging the fact that this is a local cube being created and where the .cub file is located, and not DDL. Certainly when I remove it and just run the Batch statement (in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube) then it all works ok.|||

Hi, Can you explain how exactly you run the BATCH statement in order to get the .CUB file?

I am using ADOMD.NET.

When I run the statement using management studio, the query succeed but nothing is created and there is no place to set the local file location.

Thanks,

Ofer

|||Hi Chris,
I'm reading your book on MDX (MDX Solutions 2ndEd.) and am currently struggling with the creation of local cubes. I want to create a local cube in Excel via VBA, but notice that the CREATE CLOBAL CUBE statement doesn't correctly save all data, so I'm experimenting with the ASSL approach.
In your book you write (p. 528) "...to create a local cube using ASSL,...:You open a connection to your target (in this case a .cub file), then execute your ASSL statement."
I'm wondering how you do this, apparently not with the MDX Sample app.?
What kind of connection is that if I need to do this using VB(A), or should I use .NET?|||

Hi Christopher,

Take a look at:
http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!877.entry

Regards,

Chris

|||

in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube

The reason is that local cubes don't support more than one connection to the cube file, and Management Studio usually wants to open two connections (one for AMO), even if you only want to send MDX queries.

AS2005: write a cube to a local .cub via xmla?

Hi,

i wonder if it is possible to write a cube (in AS2005) to a local .CUB file using xmla instead of the "old" CREATE GLOBAL CUBE statement ...
I haven't found anything in the msdn ... perhaps I've been blind?

background of this question:
http://forums.microsoft.com/msdn/ShowPost.aspx?postid=463952&siteid=1

Thanks for your answers and for tolerating my bad english
best regards,
Sven

Yes, it is possible. The easiest way to get an example of how to do it is to run a CREATE GLOBAL CUBE statement on your cube while you have a Profiler trace running - the CREATE GLOBAL CUBE statement gets translated to AS's XML/A scripting language in the background and you'll see that script in the trace. You can then change it as you need and possibly fix your problem.

Chris

|||Thanks for your quick reply!

We used the Profiler before and found the xmla-statement that is used

to create the new cube ... no problem so far; it creates a new database

with the cube as we want it to be.

But we didn't find the xmla-statement that writes the cube into the .cub file.

There are 3 lines in the Profiler where the filename of the .cub

appears: 2 times in the context of a copy of the original CREATE GLOBAL

CUBE statement and the last time in the line where we found the

statement that creates the cube.

The Profiler says something like this:

"CREATE GLOBAL CUBE-Instruction | FILENAME=c:\newcube.cub | DDL | <batch>...</batch>"

The <batch> we can extract to create our cube, but the part before is no scripting-language we know.

Perhaps it makes sense for you? ;)

Greetings,

Sven|||I think it's just extra information flagging the fact that this is a local cube being created and where the .cub file is located, and not DDL. Certainly when I remove it and just run the Batch statement (in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube) then it all works ok.|||

Hi, Can you explain how exactly you run the BATCH statement in order to get the .CUB file?

I am using ADOMD.NET.

When I run the statement using management studio, the query succeed but nothing is created and there is no place to set the local file location.

Thanks,

Ofer

|||Hi Chris,
I'm reading your book on MDX (MDX Solutions 2ndEd.) and am currently struggling with the creation of local cubes. I want to create a local cube in Excel via VBA, but notice that the CREATE CLOBAL CUBE statement doesn't correctly save all data, so I'm experimenting with the ASSL approach.
In your book you write (p. 528) "...to create a local cube using ASSL,...:You open a connection to your target (in this case a .cub file), then execute your ASSL statement."
I'm wondering how you do this, apparently not with the MDX Sample app.?
What kind of connection is that if I need to do this using VB(A), or should I use .NET?|||

Hi Christopher,

Take a look at:
http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!877.entry

Regards,

Chris

|||

in MDX Sample app - not SQLMS, where for some reason I can't connect to an empty .cub file to run the DDL to create the local cube

The reason is that local cubes don't support more than one connection to the cube file, and Management Studio usually wants to open two connections (one for AMO), even if you only want to send MDX queries.

Thursday, March 8, 2012

AS2005 Member Properties - MDX Query

Hi,

I am having a bit of a problem with retreiving member properties from our AS2005 cube. I'm using MDX query's in a VBA Excel app via ADO (not ADOMD). I've been prototyping the queries in the SQL Server Management Studio.

I currently have the following query:

WITH

MEMBER [Measures].[Portfolio] AS '[Trade].[Trade By Source System].CurrentMember.Properties("Portfolio")'

SELECT NON EMPTY {

[Measures].[Portfolio],

[Measures].[CR 01 Net Skw Adj USD],

[Measures].[JTD 01 USD]

} ON COLUMNS,

NonEmpty(Exists({[Trade].[Trade By Source System].[Trade Id].MEMBERS},[Trade].[Trade By Source System].[Source System].&[Calypso]))

ON ROWS

FROM [GCD]

WHERE ([Close Date].[Close Date].[Day].[01 Dec 2006], [Trade].[Trade By Business Unit].[Book Group].[LNCT])

This works fine, however I now want to CrossJoin the measures [CR 01 Net Skw Adj USD] and [JTD 01 USD] with a dimension called CS Tenor in order to give me a seperate value for each Tenor.

So far the only way I can do this is with the following query:

WITH

MEMBER [Measures].[Portfolio] AS '[Trade].[Trade By Source System].CurrentMember.Properties("Portfolio")'

SELECT NON EMPTY {

[Measures].[Portfolio],

[Measures].[CR 01 Net Skw Adj USD],

[Measures].[JTD 01 USD]

} * {[CSTenor].[CS Tenor].MEMBERS}

ON COLUMNS,

NonEmpty(Exists({[Trade].[Trade By Source System].[Trade Id].MEMBERS},[Trade].[Trade By Source System].[Source System].&[Calypso]))

ON ROWS

FROM [GCD]

WHERE ([Close Date].[Close Date].[Day].[01 Dec 2006], [Trade].[Trade By Business Unit].[Book Group].[LNCT])

This has the unfortunate side effect of CrossJoining the Portfolio member property with Tenor as well, resulting in 9 unwanted Portfolio columns (there are 9 members in CS Tenor). In reality the problem is more severe as I have around 10 member properties in the query, I reduced it to 1 here for simplicity.

My question is: Can I bring back member properties on the Rows axis? and a seperate question is: Can I CrossJoin some measures and not other on the columns axis, for example, could I CrossJoin [CR 01 Net Skw Adj USD] with CS Tenor, but not [JTD 01 USD] ?

Many thanks!

I don't believe you can cross join some measures and not other on the column axis but assuminng portfolio is an attribute of your Trade dimension the you can try this on your rows axis:

NonEmpty(Exists({[Trade].[Trade By Source System].[Trade Id].MEMBERS},[Trade].[Trade By Source System].[Source System].&[Calypso],strtomember("[Trade].[Portfolio].[" + [Trade].[Trade By Source System].CurrentMember.Properties("Portfolio") + "]") ))

Hope this helps.

V

|||

Actually, you should be able to do what you want on the column axis by simply constructing the full set of tuples that you want back. Here's an example from Adventure Works:

select

{ [Date].[Calendar Year].Members } on rows,

{ { [Measures].[Internet Sales Amount] } * { [Product].[Category].Members }, ( [Measures].[Internet Gross Profit], [Product].[Category].[All Products] ) } on columns

from

[Adventure Works]

In this query, I'm just pulling back calendar years on rows. On the columns, I'm pulling back the [Internet Sales Amount] measure cross joined with the product categories along with the [Internet Gross Profit] measure -- but with it coming back only with [All Products], not all the product cateogries. The only caveat is that all the tuples returned have to have the same dimensionality. Thus the need to return [Internet Gross Profit] with a member (in this case, the [All Products] member) of the same hierarchy used in the cross join that generates the first set of tuples.

In your case, you'd want something like this (not knowing exactly what your [All] member is, I just called it [All CS Tenors]):

{ { [Measures].[CR 01 Net Skw Adj USD] * [CSTenor].[CS Tenor].Members }, ( [Measures].[JTD 01 USD], [CSTenor].[CS Tenor].[All CS Tenors] ) } on columns

HTH,

Dave Fackler

|||

Hi,

Sorry for the delay in replying, I've been on vaction.

Many many thanks for this solution, it works perfectly!

Happy New Year,

Stuart

Wednesday, March 7, 2012

AS/400 Linked Server

Hello. Anyone know how what's needed to connect to an
AS/400 from SQL Server via a Linked Server? Any special
Provider softwre need to be in place? Any references on
this would help. THanks a lot... BruceBruce,
Try the MS Host Integration Server Administration Client .What you should be
installing is Microsoft ODBC Driver for DB2.
Refer
INF: Configuring Data Sources for the Microsoft OLE DB Provider for AS/400
and VSAM
http://support.microsoft.com/?id=219077
INF: Configuring Data Sources for the Microsoft OLE DB Provider for DB2
http://support.microsoft.com/?id=218590
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:016701c35218$f63188c0$a501280a@.phx.gbl...
> Hello. Anyone know how what's needed to connect to an
> AS/400 from SQL Server via a Linked Server? Any special
> Provider softwre need to be in place? Any references on
> this would help. THanks a lot... Bruce|||Excellent info Dinesh. I'll check it out... THanks, Bruce
>--Original Message--
>Bruce,
>Try the MS Host Integration Server Administration
Client .What you should be
>installing is Microsoft ODBC Driver for DB2.
>Refer
>INF: Configuring Data Sources for the Microsoft OLE DB
Provider for AS/400
>and VSAM
>http://support.microsoft.com/?id=219077
>INF: Configuring Data Sources for the Microsoft OLE DB
Provider for DB2
>http://support.microsoft.com/?id=218590
>
>--
>Dinesh.
>SQL Server FAQ at
>http://www.tkdinesh.com
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:016701c35218$f63188c0$a501280a@.phx.gbl...
>> Hello. Anyone know how what's needed to connect to an
>> AS/400 from SQL Server via a Linked Server? Any special
>> Provider softwre need to be in place? Any references on
>> this would help. THanks a lot... Bruce
>
>.
>

Saturday, February 25, 2012

AS 2000 DSO loses connection

We use DSO with ASP.NET 1.1 via COM layer through interop. However, sometimes after awhile the connection can no longer be established. The error occurs somewhere in the following code, most likely the first line:

dsoServer.Connect ServerName
Set m_dsoServer = dsoServer

If m_dsoServer.MDStores.Find(mvarDBName) Then
Set m_dsoDatabase = m_dsoServer.MDStores(mvarDBName)
Else
' Dont do nothing for now
End If

The error reads: Error: Cannot connect to the repository.

Restarting IIS fixes this problem until it recurs. Any idea?

Thanks,
Boris Zakharin

Calling DSO from ASP.NET is not really a supported scenario :(

Is your repository in Access or migrated to SQL Server ?

|||Access|||Then please migrate it to SQL Server. There are plenty of benefits in doing so, and it also might help in your scenario, although as I already mentioned, it is not supported one.|||Could you point me to where it says that using DSO from ASP.NET is not supported?
I have found at least one KB article talking about how to do this very thing (http://support.microsoft.com/kb/823066). Does this not mean that it is in fact supported?|||It's more like there is no documentation which states that DSO is supported from ASP.NET. (And up to AS2000 it wasn't supported even for ASP.) Microsoft doesn't ship PIA for DSO, so using DSO from any .NET application is not supported, although technically you can build interop assembly yourself. Remember, DSO was built in VB6 for VB6 programmers, before .NET was invented, and there are many potential issues around integration between the two.|||So, what is the supported way to access AS 2000 data from ASP.NET?|||In order to access data you should use ADOMD.NET. DSO is for the administrator operations.|||I assume things like creating a cube and changing a filter are considered administrative. We allow users to do that from our web application.|||

I am not sure what you mean by "changing a filter".

Creating cubes from web application is a loaded operation. You may want to consider migrating to AS2005, where you could either use AMO from ASP.NET or generate XMLA scripts directly.

Friday, February 24, 2012

Array was not long enough. Check destIndex and length, and the array's lower bounds

When I try to export a report via Excel, I get an error of :

"Array was not long enough. Check destIndex and length, and the array's lower bounds."

Is this because the cell within Excel contains too many characters? There are two detail bands which could contain several pages worth of text.

I can export fine in HTML or PDF.

Thanks!

Hello,

We fix some problems with long text values in excel renderer and a hotfix is avaialble for RS2000 SP2.

Thank you,

Nico

|||

Nicoleta,

We already installed that SP2 since we were missing the printer icon when we first tried running the reports.

Is there a way to actually see which SP is on the server?

I tried looking at the Add / Remove Programs, and didn't see anything.

Thanks!

Monday, February 13, 2012

Argghh ..

OK. I'm officially insane.
I've managed to create an orphaned push subscription. I deleted the
subscribers from EM via the publisher screen, then I deleted the publishers.
But under replication|subscribers there is still a subscriber to a
publication that does not exist.
It seems my efforts to discover ways to break replication are paying off.
Bob Castleman
Replicating Suicidal Tendencies
Try sp_dropsubscriber and sp_dropsubscription.
"Bob Castleman" <nomail@.here> wrote in message
news:uuGDxaNrFHA.3720@.TK2MSFTNGP14.phx.gbl...
> OK. I'm officially insane.
> I've managed to create an orphaned push subscription. I deleted the
> subscribers from EM via the publisher screen, then I deleted the
> publishers. But under replication|subscribers there is still a subscriber
> to a publication that does not exist.
> It seems my efforts to discover ways to break replication are paying off.
> Bob Castleman
> Replicating Suicidal Tendencies
>
>
|||Had already tried that. Didn't work. Ultimately used sp_dropdistributor.
Development servers are so much fun.
Any clue as to how I can end up with orphaned subscriptions? It seems
dropping things through EM would be relatively safe and it would clean up
after itself.
"ChrisR" <noemail@.bla.com> wrote in message
news:eWaSy3XrFHA.1032@.TK2MSFTNGP12.phx.gbl...
> Try sp_dropsubscriber and sp_dropsubscription.
>
> "Bob Castleman" <nomail@.here> wrote in message
> news:uuGDxaNrFHA.3720@.TK2MSFTNGP14.phx.gbl...
>

Thursday, February 9, 2012

Are there any built in aritmetic capabilities on the Date and Time type?

Simply put, I have a 'Date and Time', (06/03/2006 11:40:00), passed to the SelectCommand via the QueryString. I would like to gain data that is between the supplied time and 1 hour prior.
Is there a simple way to take 1 hr off the 'Date and Time" value or is it necessary to build code that parses the string then adjusts it?

The 'Time' and 'TimeStamp' entities below are both of type 'Date and Time' and all values are gained from the same sql database. I.e. the time used as the basis for selecting the hr period is from the same database as the one where the hour period will be selected from.

Any help would be great.

SelectCommand="SELECT [Timestamp], [Volume] FROM [out8$] WHERE (([CustomerLvl1] = @.CustomerLvl1) AND ([Timestamp] = @.Timestamp))">

<SelectParameters>

<asp:QueryStringParameterDefaultValue="TNT Express"Name="CustomerLvl1"QueryStringField="Cust"

Type="String"/>

<asp:QueryStringParameterDefaultValue="20/02/2006 22:20:00"Name="Timestamp"QueryStringField="Time"

Type="DateTime"/>

Perhaps you could do something like this:

SELECT [Timestamp], [Volume] FROM [out8$] WHERE
[CustomerLvl1] = @.CustomerLvl1) AND [Timestamp] >= @.Timestamp ANDDATEDIFF(hh, [TimeStamp],getdate()) =1

|||For future reference, you can view all the Date and Time functions onMSDN here.