Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Friday, March 30, 2012

Invisible controls durig runtime

Hi,
Do you know why when I run my ssis packages in the dev machine, the diagrams are not visible during run time.
I can design the package but not sure why when I start the package, the diagrams in the control flow can not be viewed.
Please note that if I do this on the server, I can see the diagrams during run time.

Thanks

The controls or the diagram indicating the control/data flows? You change nouns between the subject and the body of this post. ("controls" versus "diagrams")

If the latter, are you sure you don't just need to scroll to the left, up, down, or to the right to see them?|||

Hi,

I mean the controls such as flat file source, ...

Thanks

INVERT vs UPDATE

Hi
why does an UPDATE triggers itself at the same time as the INSERT trigger?
thanksHow about a bit more information here - at least the code for the triggers.
TheSQLGuru
President
Indicium Resources, Inc.
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:S8dXh.43563$q97.244799@.wagner.videotron.net...
> Hi
> why does an UPDATE triggers itself at the same time as the INSERT trigger?
> thanks
>sql

INVERT vs UPDATE

Hi
why does an UPDATE triggers itself at the same time as the INSERT trigger?
thanksHow about a bit more information here - at least the code for the triggers.
TheSQLGuru
President
Indicium Resources, Inc.
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:S8dXh.43563$q97.244799@.wagner.videotron.net...
> Hi
> why does an UPDATE triggers itself at the same time as the INSERT trigger?
> thanks
>

INVERT vs UPDATE

Hi
why does an UPDATE triggers itself at the same time as the INSERT trigger?
thanks
How about a bit more information here - at least the code for the triggers.
TheSQLGuru
President
Indicium Resources, Inc.
"Fernand St-Georges" <fernand.st-georges@.videotron.ca> wrote in message
news:S8dXh.43563$q97.244799@.wagner.videotron.net.. .
> Hi
> why does an UPDATE triggers itself at the same time as the INSERT trigger?
> thanks
>

Wednesday, March 28, 2012

Inventory Cube

How have other tackled the Inventory Cube? I am thinking
along the lines of
these two strategies
1. 1 and only one snap shot at a time that we decide
accurately reflects
realistic inventory levels. Meaning not necessarily at
the end of the month
when they could be low.
or
2. Take 4 snapshots a month and average those 4 together
giving me my
inventory snap shot for the month. Does anyone have other
ideas? I'm
interested in hearing how you have solved this interesting
situation.
-mikeHi Michael,
I noticed that the issue was posted in the following groups
microsoft.public.sqlserver.datawarehouse and
microsoft.public.sqlserver.olap. We have added a reply to you at
http://support.microsoft.com/newsgr...&NewsGroup=micr
osoft.public.sqlserver.olap
If you have follow up questions, please post there and we will work with
you. Thanks.
Regards.
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.sql

Monday, March 19, 2012

Invalid Cursor State - Column Rename/Move

Hi,
I am trying to rename columns or move column in a simple table that has data
in it.
Each time I am getting an "Invalid Cursor State" error message.
I am doing that all the time in Access 97/2000/2002/2003. Why is it not
working in SQL Server 2000?
Any idea?
Thanks
vbdev
OK. Forget it. Found the issue:
The Hotfix that you have to install to get the report services on your
server is causing this odd behavior.
Solution is to install Hotfix 878...
vbdev

Invalid Cursor State - Column Rename/Move

Hi,
I am trying to rename columns or move column in a simple table that has data
in it.
Each time I am getting an "Invalid Cursor State" error message.
I am doing that all the time in Access 97/2000/2002/2003. Why is it not
working in SQL Server 2000?
Any idea?
Thanks
vbdevOK. Forget it. Found the issue:
The Hotfix that you have to install to get the report services on your
server is causing this odd behavior.
Solution is to install Hotfix 878...
vbdev

Wednesday, March 7, 2012

Invalid attempt to read when no data is present

I am using a standard dbreader type of loop in a query to retrieve data. I am running over what should be end of record set, every time.

I have altered my read procedures to use while dbreader.read() and if dbreader.read(), to attempt to avoid getting the error. Neither is stopping it.

While debugging it, as I get to the last item and actually get the error, if I check the dbreader status, it still indicates that it has rows.

Anyone have any ideas on how to get around this?

TIA, Tom

Can you post your code?
|||

Sure can. The below posted is the whole thing. The sqlcommand, connection, etc. should be irrelavant.

' get the data from the database and pass it back.

Function getTheData(ByVal cmd As String) As DataTable

' note that the passed cmd is the below sqlString

Dim sqlString As String = "SELECT CONVERT(char(20), Date, 107) AS Date, City, State, Company, Position, JobNumber, Row_Number() Over (ORDER BY JobNumber DESC) as Item FROM JobsDB "

' define the new datatable to hold our results

dt = New DataTable("Jobs")

' define the columns we will be saving

Dim dcIt As New DataColumn("Item", GetType(String))

Dim dcDt As New DataColumn("Date", GetType(String))

Dim dcCt As New DataColumn("City", GetType(String))

Dim dcSt As New DataColumn("State", GetType(String))

Dim dcJN As New DataColumn("JobNumber", GetType(Integer))

Dim dcKW As New DataColumn("KeyWords", GetType(String))

Dim dcPos As New DataColumn("Position", GetType(String))

Dim dcCo As New DataColumn("Company", GetType(String))

' add columns

dt.Columns.Add(dcIt)

dt.Columns.Add(dcDt)

dt.Columns.Add(dcCt)

dt.Columns.Add(dcSt)

dt.Columns.Add(dcJN)

dt.Columns.Add(dcKW)

dt.Columns.Add(dcPos)

dt.Columns.Add(dcCo)

' define datarow

Dim dr As DataRow

' build sql command info

sqlCmd = New SqlCommand

sqlCmd.Connection = sqlConn

sqlCmd.CommandType = CommandType.Text

sqlCmd.CommandText = sqlString

Try

sqlConn.Open()

dbReader = sqlCmd.ExecuteReader()

If dbReader.HasRows Then

While dbReader.Read() 'this can be changed to if dbreader.read(), no diff

' build the data table item from the database

dr = dt.NewRow()

dr("Item") = dbReader.Item("Item").ToString()

dr("Date") = dbReader.Item("Date").ToString()

dr("City") = dbReader.Item("City").ToString()

dr("State") = dbReader.Item("State").ToString()

dr("JobNumber") = dbReader.Item("JobNumber").ToString()

dr("Position") = dbReader.Item("Position").ToString()

dr("Company") = dbReader.Item("Company").ToString()

dr("KeyWords") = keywords

dt.Rows.Add(dr)

End While

Else

lblNoData.Visible = True

End If

Catch ex As Exception

Dim exMsg As String = Request.ServerVariables("Script_Name") + ", getTheData(cmd=" & sqlString & "): msg=" + ex.Message.ToString()

utils.writeApplicationLog(exMsg, System.Configuration.ConfigurationManager.AppSettings("UtilityDbName"))

Response.Redirect(ConfigurationManager.AppSettings("errorPage") & ConfigurationManager.AppSettings("errCatchAll") & "&return=" & Request.ServerVariables("Script_Host"))

End Try

Return dt.Copy

End Function

Thanks, Tom

|||The code worked for me using sample data.

Some thoughts: Make the declarations of sqlConn, sqlCmd, and dbReader local to the function instead of global. Add a Finally section that contains dbReader.Close, sqlConn.Close, and sqlConn.Dispose.

If that doesn't change anything, is it possible that there's something in your data that is causing the problem?

Invalid Argument provided

Error message I get is:
"Invalid Argument provided Details: Object reference not set to an instance of an object."

I get this message every time I run the report. If I verify database before runing report, message is gone and report runs fine. Data connection is done using a VB file datasets (DLL). There are few subreports on this file which use same DLL but different datasets. If reports are removed report runs fine no error messages.

Any ideas would be much appreciated.

RobertFound the issue, one of Crystal dll was not properly registered (by install), once you re-install everything works fine.

Cheers|||Found the issue, one of Crystal dll was not properly registered (by install), once you re-install everything works fine.

Cheers
It is appreciable that you shared the solution :)

Intra-query parallelism

I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?
Intra-query parallelism uses multiple threads to service a single query.
You can just add the OPTION (MAXDOP 1) to your SELECT/INSERT/UPDATE/DELETE
statement to suppress parallelism for that one query.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Ron Hinds" <billg@.microsoft.com> wrote in message
news:OViL%23ns2HHA.4184@.TK2MSFTNGP06.phx.gbl...
I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?

Intra-query parallelism

I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?Intra-query parallelism uses multiple threads to service a single query.
You can just add the OPTION (MAXDOP 1) to your SELECT/INSERT/UPDATE/DELETE
statement to suppress parallelism for that one query.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Ron Hinds" <billg@.microsoft.com> wrote in message
news:OViL%23ns2HHA.4184@.TK2MSFTNGP06.phx.gbl...
I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?

Friday, February 24, 2012

Intra-query parallelism

I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?Intra-query parallelism uses multiple threads to service a single query.
You can just add the OPTION (MAXDOP 1) to your SELECT/INSERT/UPDATE/DELETE
statement to suppress parallelism for that one query.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Ron Hinds" <billg@.microsoft.com> wrote in message
news:OViL%23ns2HHA.4184@.TK2MSFTNGP06.phx.gbl...
I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?

interval dates

i want to create a user-defined function that accepts 2 dates and returns
the time difference in days, hours, minutes, and seconds-
for example, a possible result would be something like:
2 days, 17 hours, 46 minutes, 12 seconds
has anyone out there done this before in sql server? any help would be much
appreciated.
thanks,
jtjtl
CREATE FUNCTION dbo.dates_range
(
@.date1 DATETIME,
@.date2 DATETIME
)
RETURNS VARCHAR(32)
AS
BEGIN
DECLARE @.sD INT, @.sR INT, @.mD INT, @.mR INT, @.hR INT
SET @.sD = DATEDIFF(SECOND, @.date1, @.date2)
SET @.sR = @.sD % 60
SET @.mD = (@.sD - @.sR) / 60
SET @.mR = @.mD % 60
SET @.hR = (@.mD - @.mR) / 60
RETURN CONVERT(VARCHAR, @.hR)
+':'+RIGHT('00'+CONVERT(VARCHAR, @.mR), 2)
+':'+RIGHT('00'+CONVERT(VARCHAR, @.sR), 2)
END
"JTL" <jliautaud@.hotmail.com> wrote in message
news:uo90dQFDGHA.2908@.TK2MSFTNGP09.phx.gbl...
>i want to create a user-defined function that accepts 2 dates and returns
>the time difference in days, hours, minutes, and seconds-
> for example, a possible result would be something like:
> 2 days, 17 hours, 46 minutes, 12 seconds
> has anyone out there done this before in sql server? any help would be
> much appreciated.
> thanks,
> jt
>|||thanks!
do you know how i can return days as well?
jtl
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23rZKdUFDGHA.1312@.TK2MSFTNGP09.phx.gbl...
> jtl
> CREATE FUNCTION dbo.dates_range
> (
> @.date1 DATETIME,
> @.date2 DATETIME
> )
> RETURNS VARCHAR(32)
> AS
> BEGIN
> DECLARE @.sD INT, @.sR INT, @.mD INT, @.mR INT, @.hR INT
> SET @.sD = DATEDIFF(SECOND, @.date1, @.date2)
> SET @.sR = @.sD % 60
> SET @.mD = (@.sD - @.sR) / 60
> SET @.mR = @.mD % 60
> SET @.hR = (@.mD - @.mR) / 60
> RETURN CONVERT(VARCHAR, @.hR)
> +':'+RIGHT('00'+CONVERT(VARCHAR, @.mR), 2)
> +':'+RIGHT('00'+CONVERT(VARCHAR, @.sR), 2)
> END
>
>
> "JTL" <jliautaud@.hotmail.com> wrote in message
> news:uo90dQFDGHA.2908@.TK2MSFTNGP09.phx.gbl...
>|||You could do something like this with my TTimeSpan UDT at [0]:
declare @.ts TTimeSpan
set @.ts = TTimeSpan::FromDates('1/1/2005 2:00', '1/12/2005 14:6')
select @.ts.ToString(), @.ts.ToLongString()
Output:
-- ---
11.12:6:0 11 Days 12 Hours 6 Minutes 0 Seconds 0 Milliseconds
[0] - http://channel9.msdn.com/ShowPost.aspx?PostID=147390
William Stacey [MVP]
"JTL" <jliautaud@.hotmail.com> wrote in message
news:%23APwXiFDGHA.2700@.TK2MSFTNGP14.phx.gbl...
> thanks!
> do you know how i can return days as well?
> jtl
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%23rZKdUFDGHA.1312@.TK2MSFTNGP09.phx.gbl...
>|||i didn't see where to get the source for TTimeSpan- can you help?
jt
"William Stacey [MVP]" <william.stacey@.gmail.com> wrote in message
news:uctoCXQDGHA.2436@.TK2MSFTNGP15.phx.gbl...
> You could do something like this with my TTimeSpan UDT at [0]:
> declare @.ts TTimeSpan
> set @.ts = TTimeSpan::FromDates('1/1/2005 2:00', '1/12/2005 14:6')
> select @.ts.ToString(), @.ts.ToLongString()
> Output:
> -- ---
--
> 11.12:6:0 11 Days 12 Hours 6 Minutes 0 Seconds 0 Milliseconds
> [0] - http://channel9.msdn.com/ShowPost.aspx?PostID=147390
> --
> William Stacey [MVP]
> "JTL" <jliautaud@.hotmail.com> wrote in message
> news:%23APwXiFDGHA.2700@.TK2MSFTNGP14.phx.gbl...
>|||JTL (jliautaud@.hotmail.com) writes:
> i didn't see where to get the source for TTimeSpan- can you help?
What about reading William's post in full?
> "William Stacey [MVP]" <william.stacey@.gmail.com> wrote in message
> news:uctoCXQDGHA.2436@.TK2MSFTNGP15.phx.gbl...
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

interupt JDBC SQL query connection

Hi

I using Java and JDBC to connect to MS SQL server 2000 (using the MS
drivers msbase,msutil and mssqlserver.jars).

Sometimes it takes a long time for statement.executeQuery
to return and start returning the resultset
(full DB scan can take 30-40 minutes).

Does anyone know if it's possible to interupt/halt the query before
it eventually comes back. The setQueryTimeout works OK but this has to be
set quite high to allow real queries to run correctly. What I'm trying
to do is allow users to halt their query if they've realised they
want to alter it or its taking too long. The query is running in a
separate thread and I've tried using the main thread to close the
connection or stop the query but this still waits until the resultset
is returned.

Maybe it's a driver issue or ....

Thanks
MikeHi

I am not sure about the JDBC driver itself, but you could use a timer thread
to kill it off.

John

"Mike Read" <mar@.roe.ac.uk> wrote in message
news:Pine.OSF.4.58.0406091501320.263861@.reaxp06.ro e.ac.uk...
> Hi
> I using Java and JDBC to connect to MS SQL server 2000 (using the MS
> drivers msbase,msutil and mssqlserver.jars).
> Sometimes it takes a long time for statement.executeQuery
> to return and start returning the resultset
> (full DB scan can take 30-40 minutes).
> Does anyone know if it's possible to interupt/halt the query before
> it eventually comes back. The setQueryTimeout works OK but this has to be
> set quite high to allow real queries to run correctly. What I'm trying
> to do is allow users to halt their query if they've realised they
> want to alter it or its taking too long. The query is running in a
> separate thread and I've tried using the main thread to close the
> connection or stop the query but this still waits until the resultset
> is returned.
> Maybe it's a driver issue or ....
> Thanks
> Mike|||how many people here get the luxery of creating and maintaining apps in
jbuilder and together everyday? care to share any stories, either great
or not so great! i just got an eval of the latest and greatest installed
and after using previous versions for years, what i see now looks really
great. just was wondering about your experiences.

cheers

- perry|||I'm just new in the Java World and also JBuilder X Enterprise IDE. I'm
making a servlet client , using Struts , because the MVC pattern is just what
we need for our application.
Until now this is working just fine. I like the IDE, autocompletion, colors,
indent, etc.
The progam gives a lots of tips and help using class, packages, etc.

Greetings....

In comp.lang.java perry <perry@.cplusplus.org> wrote:
: how many people here get the luxery of creating and maintaining apps in
: jbuilder and together everyday? care to share any stories, either great
: or not so great! i just got an eval of the latest and greatest installed
: and after using previous versions for years, what i see now looks really
: great. just was wondering about your experiences.

: cheers

: - perry

--
Alfredo Diaz
================
School of Engineering and Science, University of Chile
Beaucheff 850, P.O. Box 2777, Santiago, CHILE
mailto:aadiaz@.dcc.uchile.cl.nospam|||Mike Read (mar@.roe.ac.uk) writes:
> I using Java and JDBC to connect to MS SQL server 2000 (using the MS
> drivers msbase,msutil and mssqlserver.jars).
> Sometimes it takes a long time for statement.executeQuery
> to return and start returning the resultset
> (full DB scan can take 30-40 minutes).
> Does anyone know if it's possible to interupt/halt the query before
> it eventually comes back. The setQueryTimeout works OK but this has to be
> set quite high to allow real queries to run correctly. What I'm trying
> to do is allow users to halt their query if they've realised they
> want to alter it or its taking too long. The query is running in a
> separate thread and I've tried using the main thread to close the
> connection or stop the query but this still waits until the resultset
> is returned.

You will have to examine the documetation for the JDBC driver. Most
client APIs for SQL Server supplies functions for asynchronous calls.
With a asynch call, you could then issue a cancel request (again this
is offered by most client APIs).

microsoft.public.sqlserver.jdbcdriver may offer more exact answers with
regards to that driver.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp