March 3, 2010 at 12:09 am
Hi Experts
I m using SQL Server 2005. I have some queries..PLEASE HELP
I m using following Connection String
strConnect = _T("Provider=sqloledb;Data Source=MyServerName;"
"Initial Catalog=MyDatabaseName;"
"User Id=MyUsername;Password=MyPassword;");
My Queries are :
1> What is the Actual use of "Provider"??
2> What is the difference between "Provider" and "Driver"??
3> I can connect to Database without using Provider or Driver. By using only "Data Source/ Server" and other parameters then Why to use Provider or Driver?
4> IF I Different Provider like 'SQL Native Client' then Can this increase my SQL Server Connection performance??
Please HELP.. ITs Urgent for Me..
March 9, 2010 at 7:01 am
Thanx Bhuvnesh..
I already read these atricles..thats why I confused..
about this connection provider and driver concept..
Can u help me little more..
I have execute one query as follows..
SELECT BookNo,BookAbbrDia,BookDescDia,RefModDescDC
FROM BookMaster
Where (RefModDescDC ='Page. Line') and
(BookNo IN(select distinct BookNo from slipmaster
where SLVID In (Select SLVID from Slipvocmaster
where (BinNo Between '0164' and '0164'))))
order by BookDescDia
No of records:
Bookmaster - 1467
Slipvocmaster - more then 1 lakh
slipmaster - more then 50 thousand
Now the problem is.This query takes more than 5 minutes to run on
SQL Server machine..
and
give Timeout exception for Remote machine..
But I give specific values like this..
SELECT BookNo,BookAbbrDia,BookDescDia,RefModDescDC
FROM BookMaster
Where (BookNo IN(select distinct BookNo from slipmaster
where SLVID between (Select Min(SLVID) from tmp_Slipvocmaster where BinNo =164)
and (Select Max(SLVID) from tmp_Slipvocmaster where BinNo =164)))
and (RefModDescDC ='Page. Line')
order by BookDescDia
It gives me result back in 45 seconds..
Whats wrong with above query..
Can u help me...
PLEASE ITS URGENT.....
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply