Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Friday, March 30, 2012

Invoice Detail

Hi

I have a invoice that displays the company name in a rectangle on top then it has a list in the list it has details tables my problem is that the invoice detail goes on the next page I need to have the company name as well on the second page I cant put it in the same table as the detail because I have a few tables in the detail so it is actually no header is it possible to have Repeated the Company name information on the next page?

Thanks

Try this:

http://blogs.msdn.com/ChrisHays/

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.

cheers,

Andrew

|||<<

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.>>

Hi Thanks Andrew

can you please explain a little bit more how you do this?

Thanks

|||A bit of a hack, but how about just creating another rectangle with visibility property =IIF(Globals!PageNumber.Value > 2)

Not sure if that will work though since the body does not know about page numbers.

Did you try Chris Hays's fix?

http://blogs.msdn.com/ChrisHays/

By passing in the RowNumber to a function, you should be able to toggle hidden property using something like =IIF(Code.RowCount(RowNumber(Nothing)) = 25, True, False)

Then just place the title in a new row in your table, or create a table within a table?

Apologies, hope you find an easier way.

cheers,
Andrew

Invoice calcualtion

hi!

i actually have more than question related to the SQL Server 2000

1) On my systemI charge users for using an online service (SMS ) and I have a monthly fees charge and monthly allowance usage so if they exceed the limit I can also charge them for over usage this is an example for a rate that I have in my Rate Table

Rate Id = 1

MonthlyFees £10.0

MothlyAllowence = 100 sms/ month

Extra usage = 0.12 p for each extra SMS

The system should calculate the monthly invoice from the registration date so if you register in 14 April the invoice will be generated every month at the same day (15) each month.

Now! I need to generate and calculate the invoice …..Where shall I do the calculation? In the Business object Layer or in somewhere else? And for invoicing the client every month I might have 20 clients and each one might have different day so the billing should be auto generated also what properties or methods that can calculate or check monthly related to the day so it will run in the way like the phone bill!! any advice is appreciate it!

Did you mean you want to caculate monthly invoice for each client? If so, we can accomplish in SQL server, using such T-SQL script to get the monthly statistics:

select sum(MonthlyFees),max(RecDate),max(clientID) from [Rate Table]
group by clientID,year(RecDate),month(RecDate)

I wish I didn't understand you.

sql

Monday, March 26, 2012

Invalid Object Name?

Hi

I am developing a windows application that connects to a sql 2000 server. I have created a stored procedure and I am trying to execute the stored procedure in the query analyzer.

Here is the code for the stored procedure

CREATE PROCEDURE dbo.CountofComebacks
(
@.dlname as nvarchar(25),
@.CB as nvarchar(10)
)

AS

Select count([@.dlname].[Auditors working code])
from [@.dlname]
where [Auditors working code] = @.CB
GO

Here is the code that I am attempting to use in the query analyzer

Declare @.dlname as nvarchar(25)
set @.dlname = 'SWMC-OP-02-2005'
Declare @.CB as nvarchar(10)
set @.CB = 'CB'
Execute CountofComebacks @.dlname, @.CB

I get the following error in the query analyzer

Server: Msg 208, Level 16, State 1, Procedure CountofComebacks, Line 9
Invalid object name'@.dlname'.

Any assistance would be greatly appreciated.

thanks


CREATE PROCEDURE dbo.CountofComebacks
(
@.dlname as nvarchar(25),
@.CB as nvarchar(10)
)

AS

DECLARE @.sql varchar(1000)

SET @.sql = 'Select count([' + @.dlname + '].[Auditors working code])
from ' + @.dlname + 'where [Auditors working code] = ' + @.CB

EXEC(@.sql)
GO

If you want to know more about how this works google for Dynamic SQL. There are disadvantages in using this approach too. there are plenty of articles over the net that xplain about "Dynamic SQL".

|||

First let me say thank you for your response.

That being said I am still getting an error when attempting to execute the sp in the query analyzer.

Here is the code in the query analyzer

Declare @.dlname as nvarchar
Set @.dlname = 'SWMCOP022005'
Declare @.CB as nvarchar
Set @.CB = 'CB'
Declare @.NumberofCBs as integer
Execute CountofComebacks @.dlname, @.CB, @.NumberofCBs

Here is the sp

CREATE PROCEDURE dbo.CountofComebacks
(
@.dlname as nvarchar(25),
@.CB as nvarchar(10),
@.NumberofCBs as int
)

AS

DECLARE @.sql varchar(1000)

SET @.sql = 'Select count([' + @.dlname + '].[Auditors working code])
from ' + @.dlname + 'where [Auditors working code] = ' + @.CB

EXEC(@.sql)

return @.NumberofCBs
GO

and here is the error I receive in the query analyzer

Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near '='.
The 'CountofComebacks' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.

Is this because of the syntax error on line 2?

thanks

|||

throw in an ISNULL function.

SET @.sql = 'Select ISNULL(count([' + @.dlname + '].[Auditors working code]),0) from ' + @.dlname + 'where [Auditors working code] = ' + @.CB

sql

Friday, March 23, 2012

Invalid object name in subquery

Hi
I have this problem.
In Query Analyzer when I write
dbo.spParseArray '12-13-14','-'
everytihng goes OK
but when i write
SELECT * FROM tblOrder WHERE ID_ORDER IN (dbo.spParseArray ('12-13-14','-'))
it returns me an error
Server: message 208, level 16, state 1, row 1
Invalid object name 'dbo.spParseArray'
What's the matter?Hi
Stored Procedures cannot be used as in line functions.
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"xxx" wrote:

> Hi
> I have this problem.
> In Query Analyzer when I write
> dbo.spParseArray '12-13-14','-'
> everytihng goes OK
> but when i write
> SELECT * FROM tblOrder WHERE ID_ORDER IN (dbo.spParseArray ('12-13-14','-'
))
> it returns me an error
> Server: message 208, level 16, state 1, row 1
> Invalid object name 'dbo.spParseArray'
> What's the matter?
>
>|||Is dbo.spParseArray a Stored Proc or a UDF? If it's a Stored Proc, you canno
t
use the result set of a Stored Proc in a Select that way, you have to
"insert" the result set into a Table of some kind, (Real tbale, Temp Table,
Table Variable) and then use that table object in your Select.
IOr, rewrite the Stored Proc as a Table-Valued User Defined Function, then
you can write your select as either:
SELECT * FROM tblOrder
WHERE ID_ORDER IN
(Select OrderID
From dbo.spParseArray ('12-13-14','-'))
Or:
SELECT * FROM tblOrder O
Join dbo.spParseArray ('12-13-14','-') A
On A.OrderID = O.ID_Order
"xxx" wrote:

> Hi
> I have this problem.
> In Query Analyzer when I write
> dbo.spParseArray '12-13-14','-'
> everytihng goes OK
> but when i write
> SELECT * FROM tblOrder WHERE ID_ORDER IN (dbo.spParseArray ('12-13-14','-'
))
> it returns me an error
> Server: message 208, level 16, state 1, row 1
> Invalid object name 'dbo.spParseArray'
> What's the matter?
>
>

Friday, March 9, 2012

'Invalid authorization specification' from IDBInitialize::Initialize (c++)

Hi

I've been trying to connect to my local SQL Server instance (SQL Server 2005) using the SQLNCLI interface from c++ without success. I consistently receive an 'Invalid authorization specification' error (SQL state 28000 and SQL error number 0) when I call IDBInitialize::Initialize to connect to the database. I was hoping someone here could shed some light on this and help me out.

The strange thing is that I get no error if I leave the user blank (L"" in vValue.bstrVal) and try to connect. Also, IDBProperties::SetProperties returns 0 when the user is blank but 40eda when the user is set. This seems to be a message from the pipeline facility but I haven't found the description of the code (0xeda).

The user in the database is configured with no password and I can successfully connect to the server and open the database using that user through Management Studio.

I've also tried using the SQLOLEDB provider with the same results.

Suspecting that I'm setting the properties wrong I include a code snippet below showing how I'm setting the properties:

for (int i = 0; i < sizeof(dbprop) / sizeof(dbprop[0]); i++)
VariantInit(&dbprop[ i ].vValue);

// Server name
dbprop[0].dwPropertyID = DBPROP_INIT_DATASOURCE;
dbprop[0].vValue.vt = VT_BSTR;
dbprop[0].vValue.bstrVal = SysAllocString(L"localhost");
dbprop[0].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[0].colid = DB_NULLID;

// Database
dbprop[1].dwPropertyID = DBPROP_INIT_CATALOG;
dbprop[1].vValue.vt = VT_BSTR;
dbprop[1].vValue.bstrVal = SysAllocString(L"test");
dbprop[1].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[1].colid = DB_NULLID;

// Username
dbprop[2].dwPropertyID = DBPROP_AUTH_INTEGRATED;
dbprop[2].vValue.vt = VT_BSTR;
dbprop[2].vValue.bstrVal = SysAllocString(L"jph");
dbprop[2].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[2].colid = DB_NULLID;

Cheers,
JPProblem solved.

A little bit embarrasing, since I, somehow, misinterpreted the DBPROP_AUTH_INTEGRATED parameter. It should have been DBPROP_AUTH_USERID (of course) instead.

The username propertie now looks like this:

// Username
dbprop[2].dwPropertyID = DBPROP_AUTH_USERID;
dbprop[2].vValue.vt = VT_BSTR;
dbprop[2].vValue.bstrVal = SysAllocString(L"jph");
dbprop[2].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[2].colid = DB_NULLID;

and works like a charm.

JP

Invalid authorization specification

Hi:

I'm trying to connect to a data base of "sql server 2005 enterprise" named BCR.
The server name is "server1"
I'm using Windows Authentication to connect to server
The operating system is Windows Server 2003 Enterprise Edition Service Pack 1

When I run the aspx I get this error at line 21

System.Data.OleDb.OleDbException: Invalid authorization specification Invalid connection string attribute at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open() at ASP.pruebaLeeSqlServer_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in Z:\Digital\pruebaLeeSqlServer.aspx:line 21

This is my code:

Dim str2 As String = "Provider=SQLNCLI; Server = server1; Database = BCR"
Dim cnn2 As OleDbConnection = New OleDbConnection(str2)
Dim cmd2 As New OleDbCommand()
Dim drd2 As OleDbDataReader
Try
cnn2.Open()
cmd2.Connection = cnn2''''line 21
cmd2.CommandText ="SELECT LastName FROM Employees"
drd2 = cmd2.ExecuteReader
Do While drd2.Read
%>
<%=drd2.GetString(0)%><br>
<%
Loop
drd2.Close()
Catch exc1 As Exception
%>
<%=exc1.ToString()%>
<%
Finally
cnn2.Close()
End Try

What could be wrong?
Do I need enable permission for asp.net in sql server?
how I can do it?

Thanks!!

You should be using the objects in the System.Data.SqlClient namespace to connect to MS SQL Server, not System.Data.OleDb. That should fix your issue given that there is no problem with your connection string.

HTH,
Ryan

|||thanks Ryan. It works!

I are right, I had to use System.Data.SqlClient namespace instead of System.Data.OleDb. And I just change my connection string to

"Server=server1; Database=BCR; Trusted_Connection=True;"

Thanks!

Wednesday, March 7, 2012

invalid attribute/option identifier

Hi
I currently have a problem with registering a new server in my Enterprise
Manager on a new PC.

I need to connect to a MSSQL2K server on a windows 2003.
My current PC is on the same LAN as the server and has no problem
registering the server in Enterprise manager. This PC uses NT (about time I
change :-)

The new PC runs WIN2K. But this PC is on another LAN and has to access the
server through a firewall. Port 1433 is open in the firewall.
I use a Firewall-1 authentication agent to access the server.

I use SQL authentification to logon (sa account), I have checked that the
new clients network libraries are the same version as the servers.
In the client network Utility I have set up an alias with the server I want
to access.

The registration seems to access the SQL server, but comes out with an error
stating: "invalid attribute/option identifier"

When I search KB with this message, I get nothing. Did anyone in here
experience anything like this? Any pointers to help me move on would be
greatly appreciated.

best regards
Ren Pedersen"Ren Pedersen" <rpe@.post6.tele.dk> wrote in message
news:4107a915$0$175$edfadb0f@.dtext01.news.tele.dk. ..
> Hi
> I currently have a problem with registering a new server in my Enterprise
> Manager on a new PC.
> I need to connect to a MSSQL2K server on a windows 2003.
> My current PC is on the same LAN as the server and has no problem
> registering the server in Enterprise manager. This PC uses NT (about time
I
> change :-)
> The new PC runs WIN2K. But this PC is on another LAN and has to access the
> server through a firewall. Port 1433 is open in the firewall.
> I use a Firewall-1 authentication agent to access the server.
> I use SQL authentification to logon (sa account), I have checked that the
> new clients network libraries are the same version as the servers.
> In the client network Utility I have set up an alias with the server I
want
> to access.
> The registration seems to access the SQL server, but comes out with an
error
> stating: "invalid attribute/option identifier"
> When I search KB with this message, I get nothing. Did anyone in here
> experience anything like this? Any pointers to help me move on would be
> greatly appreciated.
> best regards
> Ren Pedersen

There are a few hits on Google which suggest reinstalling MDAC and/or the
client tools, plus this post about a specific DLL:

http://groups.google.com/groups?hl=...ng.google .com

Simon|||Worked like a charm - thank you very much.

regards
Ren

"Simon Hayes" <sql@.hayes.ch> skrev i en meddelelse
news:4107ea67$1_2@.news.bluewin.ch...
> "Ren Pedersen" <rpe@.post6.tele.dk> wrote in message
> news:4107a915$0$175$edfadb0f@.dtext01.news.tele.dk. ..
> > Hi
> > I currently have a problem with registering a new server in my
Enterprise
> > Manager on a new PC.
> > I need to connect to a MSSQL2K server on a windows 2003.
> > My current PC is on the same LAN as the server and has no problem
> > registering the server in Enterprise manager. This PC uses NT (about
time
> I
> > change :-)
> > The new PC runs WIN2K. But this PC is on another LAN and has to access
the
> > server through a firewall. Port 1433 is open in the firewall.
> > I use a Firewall-1 authentication agent to access the server.
> > I use SQL authentification to logon (sa account), I have checked that
the
> > new clients network libraries are the same version as the servers.
> > In the client network Utility I have set up an alias with the server I
> want
> > to access.
> > The registration seems to access the SQL server, but comes out with an
> error
> > stating: "invalid attribute/option identifier"
> > When I search KB with this message, I get nothing. Did anyone in here
> > experience anything like this? Any pointers to help me move on would be
> > greatly appreciated.
> > best regards
> > Ren Pedersen
> There are a few hits on Google which suggest reinstalling MDAC and/or the
> client tools, plus this post about a specific DLL:
>
http://groups.google.com/groups?hl=...ng.google .com
> Simon

Intro to news

Hi!

I want to show intro of the newest news on my startpage. But I only would like to show the subject and part of the message and if you klick on the subject you can se the whole news...how can I do that?

I have an mySQL database with the news.

I havn't found any thread with this topic...

Zäta1] Get list from DB of last say 5 news entries, Order By Date created DESC.
2] In same select get the first 10-15 characters of news item.
3] In same select get the subject field.

Put subject in a label control, in this case 5 of them.
Put News Item piece in a Link button control, 5 of them too :)

Whe user click on linkbtn control go get full item and display it.

return the SELECT results to a dataview and use that to fill the Labels and link btns.

There ya go.

Deasun|||Thanx!

But how do I select 10-15 characters, thats my problem...I don't know how to do that.
Can you shoe my the sql query or something?|||In SQL I believe the cmd your looking for is SUBSTRING(item, 1, 15)
Works like Mid() in VB.

Deasun
www.tirnaog.com

Friday, February 24, 2012

Intra Query Error

Hi
I seem to be getting the following error, when running a SP which populates
a table:
***********************************
Server: Msg 8650, Level 13, State 127, Line 1
Intra-query parallelism caused your server command (process ID #62) to deadl
ock. Rerun the query without intra-query parallelism by using the query hint
option (maxdop 1).
************************************
The SP is the following:
****************************************
*****************
ALTER PROCEDURE sp_crosstab_NOV AS
DECLARE @.Year VARCHAR(5)
DECLARE @.Month VARCHAR(20)
DECLARE @.select VARCHAR(8000)
DECLARE @.sumfunc VARCHAR(100)
DECLARE @.pivot VARCHAR(100)
DECLARE @.table VARCHAR(100)
DECLARE @.sql VARCHAR(8000), @.delim VARCHAR(1)
SET @.Year = YEAR(GETDATE())
SET @.Month =MONTH(GETDATE()) - 1
SET @.select = 'INSERT INTO NUCosstab SELECT [Policy No], [Section Sequence],
Insured, [Effective Date], [Expiry Date], [Trans Code], Trade, [Reporting M
onth],[Reporting Year],SUM(GrossPremium) AS [Total Premium],
SUM(BrokerComm) AS [Broker Comm] , SUM(IPT) AS IPT FROM NUPremium WHERE [Re
porting Year] = ' + @.Year + ' AND [Reporting Month] = ' + @.Month + ' GROUP
BY [Policy No],[Section Sequence],Insured, [Effective Date],[Expiry Date],
[Trans Code], Trade, [Reporting Month],[Reporting Year]'
SET @.sumfunc = 'Sum(GrossPremium)'
SET @.pivot = '[Section Type Code]'
SET @.table = 'NUPremium'
TRUNCATE TABLE NUCosstab
SET NOCOUNT ON
SET ANSI_WARNINGS OFF
EXEC ('SELECT ' + @.pivot + ' AS pivot INTO ##pivot FROM ' + @.table + ' WHERE
1=2')
EXEC ('INSERT INTO ##pivot SELECT DISTINCT ' + @.pivot + ' FROM ' + @.table +
' WHERE '
+ @.pivot + ' Is Not Null')
SELECT @.sql='', @.sumfunc=STUFF(@.sumfunc, LEN(@.sumfunc), 1, ' END)' )
SELECT @.delim=CASE SIGN( CHARINDEX('char', data_type)+CHARINDEX('date', data
_type) )
WHEN 0 THEN '' ELSE '''' END
FROM tempdb.information_schema.columns
WHERE table_name='##pivot' AND column_name='pivot'
SELECT @.sql=@.sql + '''' + CONVERT(VARCHAR(100), pivot) + ''' = ' +
STUFF(@.sumfunc,CHARINDEX( '(', @.sumfunc )+1, 0, ' CASE ' + @.pivot + ' WHEN '
+ @.delim + CONVERT(VARCHAR(100), pivot) + @.delim + ' THEN ' ) + ', ' FROM ##
pivot
DROP TABLE ##pivot
SELECT @.sql=LEFT(@.sql, LEN(@.sql)-1)
SELECT @.select=STUFF(@.select, CHARINDEX(' FROM ', @.select)+1, 0, ', ' + @.sql
+ ' ')
EXEC (@.select)
SET ANSI_WARNINGS ON
*****************************
Any ideas?
Kind Regards
RickyHi Ricky
This article may help:
http://support.microsoft.com/?kbid=837983
--
Jack Vamvas
________________________________________
__________________________
Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
New article by Jack Vamvas - SQL and Markov Chains - www.ciquery.com/articles/art_
04.asp
"Ricky" <MSN.MSN.com> wrote in message news:%23DOlz4CIGHA.240@.TK2MSFTNGP11.p
hx.gbl...
Hi
I seem to be getting the following error, when running a SP which populates
a table:
***********************************
Server: Msg 8650, Level 13, State 127, Line 1
Intra-query parallelism caused your server command (process ID #62) to deadl
ock. Rerun the query without intra-query parallelism by using the query hint
option (maxdop 1).
************************************
The SP is the following:
****************************************
*****************
ALTER PROCEDURE sp_crosstab_NOV AS
DECLARE @.Year VARCHAR(5)
DECLARE @.Month VARCHAR(20)
DECLARE @.select VARCHAR(8000)
DECLARE @.sumfunc VARCHAR(100)
DECLARE @.pivot VARCHAR(100)
DECLARE @.table VARCHAR(100)
DECLARE @.sql VARCHAR(8000), @.delim VARCHAR(1)
SET @.Year = YEAR(GETDATE())
SET @.Month =MONTH(GETDATE()) - 1
SET @.select = 'INSERT INTO NUCosstab SELECT [Policy No], [Section Sequence],
Insured, [Effective Date], [Expiry Date], [Trans Code], Trade, [Reporting M
onth],[Reporting Year],SUM(GrossPremium) AS [Total Premium],
SUM(BrokerComm) AS [Broker Comm] , SUM(IPT) AS IPT FROM NUPremium WHERE [Re
porting Year] = ' + @.Year + ' AND [Reporting Month] = ' + @.Month + ' GROUP
BY [Policy No],[Section Sequence],Insured, [Effective Date],[Expiry Date],
[Trans Code], Trade, [Reporting Month],[Reporting Year]'
SET @.sumfunc = 'Sum(GrossPremium)'
SET @.pivot = '[Section Type Code]'
SET @.table = 'NUPremium'
TRUNCATE TABLE NUCosstab
SET NOCOUNT ON
SET ANSI_WARNINGS OFF
EXEC ('SELECT ' + @.pivot + ' AS pivot INTO ##pivot FROM ' + @.table + ' WHERE
1=2')
EXEC ('INSERT INTO ##pivot SELECT DISTINCT ' + @.pivot + ' FROM ' + @.table +
' WHERE '
+ @.pivot + ' Is Not Null')
SELECT @.sql='', @.sumfunc=STUFF(@.sumfunc, LEN(@.sumfunc), 1, ' END)' )
SELECT @.delim=CASE SIGN( CHARINDEX('char', data_type)+CHARINDEX('date', data
_type) )
WHEN 0 THEN '' ELSE '''' END
FROM tempdb.information_schema.columns
WHERE table_name='##pivot' AND column_name='pivot'
SELECT @.sql=@.sql + '''' + CONVERT(VARCHAR(100), pivot) + ''' = ' +
STUFF(@.sumfunc,CHARINDEX( '(', @.sumfunc )+1, 0, ' CASE ' + @.pivot + ' WHEN '
+ @.delim + CONVERT(VARCHAR(100), pivot) + @.delim + ' THEN ' ) + ', ' FROM ##
pivot
DROP TABLE ##pivot
SELECT @.sql=LEFT(@.sql, LEN(@.sql)-1)
SELECT @.select=STUFF(@.select, CHARINDEX(' FROM ', @.select)+1, 0, ', ' + @.sql
+ ' ')
EXEC (@.select)
SET ANSI_WARNINGS ON
*****************************
Any ideas?
Kind Regards
Ricky

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