|
better give commandtimeout=100(some avlue) it will work
Rajendran
|
|
|
|
|
Thanks for your reply.
I had tried this already. but no use.
One more information
I am using 2 connections
1 for Insert / Update / Delete with transaction
1 for Select without transaction
I suspect whether it is a deadlock
Senthil
|
|
|
|
|
I just want to double check with you that you have done everything you need to do.
So here is an example from my own code that works:
oconn.ConnectionTimeout = 0
oconn.CommandTimeout = 0
oconn.Open "Driver={SQL Server};Server=Hal2000;Database=Europa;Uid=sa; Pwd= :P ;timeout=0;"
</code>
One final thing do you need to set up an ODBC connection on the computer, and if you do have you set this up?
You always pass failure on the way to success.
|
|
|
|
|
Hi there,
I have a two SQL server databases (one 2000 and the other 2005) linked to each other.
I need to run a stored procedure on the 2005 DB that will access data from both databases and UNION them into one table. I can select data from the 2000 DB's tables from the 2005 machine so I know the linking is correct. I've also sorted out collations and enabled RPC calls on both DB's.
The problem is I cant seem to call a udf on the 2000 machine from the 2005 machine. Here's a section of the stored proc. (I've changed the database name in this sample to LINKEDDB)
SELECT
QueueGroupName COLLATE Latin1_General_CI_AS,
dbo.udfQueueGroupAnsweredCalls(@StartDate, @EndDate, QueueGroupName) AS AnsweredCalls,
dbo.udfQueueGroupLostCalls(@StartDate, @EndDate, QueueGroupName) AS LostCalls
FROM
QueueGroup
UNION
SELECT
QueueGroupName COLLATE Latin1_General_CI_AS,
LINKEDDB.idb.dbo.udfQueueGroupAnsweredCalls(@StartDate, @EndDate, QueueGroupName) AS AnsweredCalls,
LINKEDDB.idb.dbo.udfQueueGroupLostCalls(@StartDate, @EndDate, QueueGroupName) AS LostCalls
FROM
LINKEDDB.idb.dbo.QueueGroup
ORDER BY
QueueGroupName COLLATE Latin1_General_CI_AS
It's giving me the error: Invalid column name 'LINKEDDB' when I try call the UDF. Anybody got any ideas?
Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis.
I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
|
|
|
|
|
Can you configure a linked-server connection to your SQL Server 2000 box, then use OPENQUERY to run a remote query?
|
|
|
|
|
hi,
I am learning stage of cursor.here date format is displaying like 2007-06-22 01:54:02.000. I am Struggling for getting normal date format like 11/12/2005...Plz See the following Code and reply me
ALTER procedure [dbo].[WCReport] as
begin
create table #temp21
(
Ason datetime ,SubScriberEmail varchar(50),SvcActivationDate datetime,
PkgActivationDate datetime,RenewalDate datetime
)
DECLARE @cursorVar CURSOR
SET @cursorVar = CURSOR Forward_Only FOR
SELECT regdate,email,wct.dt
from wc_transaction as wct,wc_user as wcu WHERE wct.PID=wcu.ID
--open the cursor
OPEN @cursorVar
DECLARE @regdate datetime, @email varchar(50),@dt datetime
--fetches the current row, which is the first
FETCH FROM @cursorVar INTO @regdate,@email,@dt
WHILE @@fetch_status = 0
BEGIN
insert into #TEMP21(Ason,SubscriberEmail,SvcActivationDate,PkgActivationDate,RenewalDate) VALUES(@regdate,@email,@regdate,@regdate,@dt)
FETCH Next FROM @cursorVar INTO @regdate,@email,@dt
END
begin
select * from #temp21
return end
CLOSE @cursorVar
DEALLOCATE @cursorVar
end
exec WCReport
Rajendran
|
|
|
|
|
Instead of using select * from #temp21 specify the each column name and in the date column use convert function. now your select query will be like this.
select convert(varchar,Ason,101),SubScriberEmailfrom,<br />
convert(varchar,SvcActivationDate,101),convert(varchar,PkgActivationDate,101),<br />
convert(varchar,RenewalDate,101) from #temp21
|
|
|
|
|
Hi,
I have used your query Its working fine....Thanks alot.
I have another doubt....actually I am generating reports using this cursor.here I have to give dublicate column name like Status(if condition is true)..So I want to know how to provide an alias name for that Status(Status is not their in Database)....If u know plz reply me...
thanks
Rajendran
|
|
|
|
|
Hi
Try something like
SELECT
CASE WHEN Dt < '2006-12-31' THEN 'Archived'
WHEN Dt < '2007-06-30' THEN 'OLD'
ELSE 'New' END AS [Status]
FROM MyTable
Nav
|
|
|
|
|
Thanks alot....its working ..
Rajendran
|
|
|
|
|
hai
i have more than 50,000 records in excel.
i want to insert into a table which is in a sqlserver 2000 database.
it takes more time, sometimes it shows timeout expired.
is any simplest way to insert the data shortest period?
Thanks advance
Ganesh Mohan
|
|
|
|
|
Upload the excel file to your SQL Server, then use SQL Server Data Transformation Services (DTS) to open the file and insert the data into your table for you. It should take a few seconds at most...
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
Thanks it works fine.
IF anyone known about BCP related to this synario,
please explain
Thanks in Advance
|
|
|
|
|
BCP only works with ASCII text files. You would have to save the contents of your spreadsheet as CSV or tab-separated files first.
|
|
|
|
|
What is Broker service in SQL server and
How to enable Broker services on MS SQL Server 2005?
Thanks
PRT
|
|
|
|
|
|
If a view is called multiple times by various applications, how does sqlserver respond? Does it execute the select statement (inside the view) only once or does it execute them per request?
|
|
|
|
|
it execute them per request..
If you don't mind, on what purpose that make u consider such a question? Performance?
|
|
|
|
|
Me and my friend were discussing whether to go for a view or a stored procedure, because all we needed was an inventory report kind of stuff... I just learned that we further "abstract" from a view whose inside select statement is a kind of general query with no where condition or with some minimal conditions. A stored procedure on the other hand would work faster because we are exacting data we need with more where conditions. In both the cases we are only interested in the result set.
|
|
|
|
|
Hi,
My WinForm application uses an Access 2000 file format database (using OleDbCommand with C#.NET).
I'm wondering if I should upgrade to a newer version (2003 or 2007). Can anyone tell me the advantages of usng Access 2003/2007 over 2000?
thanks,
Ron
|
|
|
|
|
I don't think there is much of a difference between 2003/2007.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi, guys. I need some help with the DoCmd.OutputTo method in MS Access. I would like to export the file to a .CSV file but the only options that I have are as follows:
AcFormat can be one of these AcFormat constants.
acFormatASP
acFormatDAP
acFormatHTML
acFormatIIS
acFormatRTF
acFormatSNP
acFormatTXT
acFormatXLS
The code for DoCmd.OutputTo is as follows:
DoCmd.OutputTo acOutputTable, "tblInputFile", _
acFormatTXT, "C:\test\output.csv", True
I tried to use the acFormatTXT option to export to the .CSV file. I need the result to be a comma delimited list, but it comes out like this:
--------------------------------------------------------------
| USA | WFTE | SUPPORT | Global | GLOBAL | Facilities & Real | 4 | 57AU |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| USA | WFTE | SUPPORT | Global | GLOBAL | General Supply | 0 | 57AU |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| USA | WFTE | SUPPORT | Global | GLOBAL | Marketing | 0 | 57AU |
-----------------------------------------------------------------------------------------------------------
-- modified at 13:13 Monday 29th October, 2007
|
|
|
|
|
hi All
i have some DTS that run at night. they were running for year now, but Sudenly the give this Errors when i run them.
Select permission denied on object 'sysobjects',database
'Tshwane_valuations',owner 'dbo'.(
Microsoft Ole DB Provider for SQL
(0):Started-OITPS_ALL_Create_Temp)
What Could be a Problem.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
You do not have permission on this system table.
If, you have database team then contact them, they will definately solve your problem..
|
|
|
|
|
Thanks man , it helped me a lot
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|