Showing posts with label written. Show all posts
Showing posts with label written. Show all posts

Wednesday, March 28, 2012

Multi Parameter Select query

Hi All,

I have a procdeure as written below.

I have created datasets in te report and in Report parameters clicked the Multi-value Parameter option.

When I run the report, I get all the customer names, when I select one customer report returns correct data. When I select two customers in the list box, the result set is empty. Can anyone guide me on what the error could be?

Thanks

Josh

Procedure:

create procedure MyMultiReport @.customername nvarchar(30), @.businessplantype nvarchar(30), @.businessplanyear nvarchar(10) as

Select PlanDatameta.sort,sysperiod.id,Planmeta.id,Planmonthlydata.Productmainpkey,Country, BusinessDivisiondescription, PlanSegmentPkey, Plantext.referencepkey, Plantext.usage, sheet, name, Plantext.text, Brand, Size, text1, PlanDatameta.sort+' '+Plantext1.text as LineDescription,line, Month1, Month2, Month3, Month4, Month5, Month6, Month7, Month8, Month9, Month10, Month11, Month12, Total from Planmonthlydata join Plantext on Plantext.referencepkey=Planmonthlydata.Plansegmentpkey join PlanDatameta on PlanDatameta.pkey=Planmonthlydata.PlanDatametapkey join Productdescription on Productdescription.Productmainpkey=Planmonthlydata.Productmainpkey join Productmain on Productdescription.Productmainpkey=Productmain.pkey join Plansegment on Plansegment.pkey=Planmonthlydata.Plansegmentpkey join bpamain on bpamain.pkey=Plansegment.bpamainpkey join sysperiod on sysperiod.pkey=Plansegment.sysperiodpkey join Planmeta on Planmeta.pkey=Plansegment.Planmetapkey join Plantext Plantext1 on PlanDatameta.pkey=Plantext1.referencepkey where Planmonthlydata.status<>'d' and (PlanDatameta.sheet='PlanProductSummary') and Plantext.text<>'' and (PlanDatameta.line='MyPlanBaselineVolumeBasic' or PlanDatameta.line='BaselineVolumes' or PlanDatameta.line='IncrementalVolumes'or PlanDatameta.line='TotalVolumes') and name in (@.customername) order by PlanDatameta.sort,Plantext.text,text1

return

Hi,

If thecustomer name is the multi valued parameter you can't use that customer name @.CustomerName in the Where clause.

suppose Customer Name parameter contain these values:aaa, bbb , ccc then if you select the aaa, bbb from the parameter it will pass to the Stored procedure in the following format:

@.CustomeName='aaa,bbb'

When you selecting the one value from customer name parameter it is passing to the stored procedure like this: 'aaa' this when you used in In cluase will give you the result.

This @.CustomeName you can't directly use IN Cluase of where.

Select .. from Where name in('aaa,bbb') this will not give any result just you check by running the above select.

Instead you can do one thing

a)First create a table valued function like the following which will take the @.CustomerName as Input parameter and will return the table containg the

aaa

bbb splits the input string by comma and place in the Table.

ALTER function [dbo].[GetCSV]

(@.array varchar(max))

Returns @.t Table (Col1 varchar(max))

as

Begin

DECLARE @.separator_position INT

,@.array_value VARCHAR(1000)

,@.separator CHAR(1)

Set @.separator=','

--For my loop to work I need an extra separator at the end. I always look to the

-- left of the separator character for each array value

SET @.array = @.array + @.separator

-- patindex matches the a pattern against a string

WHILE PATINDEX('%' + @.separator + '%', @.array) <> 0

BEGIN

SELECT @.separator_position = PATINDEX('%' + @.separator + '%',@.array)

SELECT @.array_value = LEFT(@.array, @.separator_position - 1)

INSERT INTO @.t SELECT @.array_value

-- This replaces what we just processed with and empty string

SELECT @.array = STUFF(@.array, 1, @.separator_position, '')

END

Return

End

And use that resulted table in the where clause of your select statement

Select ..

from ..

Where name in (Select * from dbo.GetCSV(@.CustomerName))

It will give you the result.

Hope this helps.

Thanks

|||

You can also use dynamic SQL and filter the records and put them in a temporary table (#temp) first and use this query clause in main query:

code for dynamic SQL:

DELCARE @.strSQL VARCHAR(MAX)

CREATE TABLE #temp (name VARCHAR(50))

SET @.strSQL = 'SELECT name INTO #temp FROM [Table] WHERE name IN (' + @.customername + ')'

EXEC(@.strSQL)

code for main query:

AND name in (SELECT name FROM #temp1) AND ....

Also, dont forget to change the datatype of the input parameter @.customername to NVARCHAR(MAX).

Shyam

Monday, March 26, 2012

Multi Language Report Function

I have written a function which translates text based upon the language the
user chooses to see the report in (it can also be passed in as a data driven
parm for static runs) Anyway ... my question is this ... since I am new to RS
and new to Vb .Net I was wondering if someone out there can look at what I am
trying to do and suggest a better way ... since I dont want to have to code a
function like this for 25+ fields to be translated and in 4+ languages. I
think when you see the function I wrote you will get the idea and perhaps be
able to suggest an efficient way to translate all fields at once or perhaps
"generic" function (which I tried to code too with nested CASE statements but
abandoned). Anyway ... here is the newbie's (my) solution - dont laugh :-)
This is what I code in the text box for the expression ===>
=Code.TranslateTitle(Parameters!pm_language_code.value)
HERE IS THE FUNCTION
Function TranslateTitle ( ByVal Language_Code As String ) As String
Select Language_Code
Case "EN"
Return "Detailed Report : "
Case "FR"
Return "Rapport Détaillé : "
Case "DE"
Return "Ausführlicher Report : "
Case "NL"
Return "Gedetailleerd Rapport : "
Case Else
Return "Detailed Report : "
End Select
End Function
This works just fine ... but I have 25+ fields with translations !!!
Thanks in advanceHi,
You can use resource files just as in ASP.NET applications.
You can reference these resource dll files within a function written as a
custom code.
Eralper
http://www.kodyaz.com
"MJ Taft" wrote:
> I have written a function which translates text based upon the language the
> user chooses to see the report in (it can also be passed in as a data driven
> parm for static runs) Anyway ... my question is this ... since I am new to RS
> and new to Vb .Net I was wondering if someone out there can look at what I am
> trying to do and suggest a better way ... since I dont want to have to code a
> function like this for 25+ fields to be translated and in 4+ languages. I
> think when you see the function I wrote you will get the idea and perhaps be
> able to suggest an efficient way to translate all fields at once or perhaps
> "generic" function (which I tried to code too with nested CASE statements but
> abandoned). Anyway ... here is the newbie's (my) solution - dont laugh :-)
> This is what I code in the text box for the expression ===>
> =Code.TranslateTitle(Parameters!pm_language_code.value)
> HERE IS THE FUNCTION
> Function TranslateTitle ( ByVal Language_Code As String ) As String
> Select Language_Code
> Case "EN"
> Return "Detailed Report : "
> Case "FR"
> Return "Rapport Détaillé : "
> Case "DE"
> Return "Ausführlicher Report : "
> Case "NL"
> Return "Gedetailleerd Rapport : "
> Case Else
> Return "Detailed Report : "
> End Select
> End Function
> This works just fine ... but I have 25+ fields with translations !!!
> Thanks in advance|||Thanks for your response however I dont know asp .net - in fact ... just got
a book to learn it. So I dont know how to do what you are suggesting here.
Could you be more specific? Point to a simple example maybe?
"eralper" wrote:
> Hi,
> You can use resource files just as in ASP.NET applications.
> You can reference these resource dll files within a function written as a
> custom code.
> Eralper
> http://www.kodyaz.com
> "MJ Taft" wrote:
> > I have written a function which translates text based upon the language the
> > user chooses to see the report in (it can also be passed in as a data driven
> > parm for static runs) Anyway ... my question is this ... since I am new to RS
> > and new to Vb .Net I was wondering if someone out there can look at what I am
> > trying to do and suggest a better way ... since I dont want to have to code a
> > function like this for 25+ fields to be translated and in 4+ languages. I
> > think when you see the function I wrote you will get the idea and perhaps be
> > able to suggest an efficient way to translate all fields at once or perhaps
> > "generic" function (which I tried to code too with nested CASE statements but
> > abandoned). Anyway ... here is the newbie's (my) solution - dont laugh :-)
> >
> > This is what I code in the text box for the expression ===>
> >
> > =Code.TranslateTitle(Parameters!pm_language_code.value)
> >
> > HERE IS THE FUNCTION
> >
> > Function TranslateTitle ( ByVal Language_Code As String ) As String
> > Select Language_Code
> > Case "EN"
> > Return "Detailed Report : "
> > Case "FR"
> > Return "Rapport Détaillé : "
> > Case "DE"
> > Return "Ausführlicher Report : "
> > Case "NL"
> > Return "Gedetailleerd Rapport : "
> > Case Else
> > Return "Detailed Report : "
> > End Select
> > End Function
> >
> > This works just fine ... but I have 25+ fields with translations !!!
> >
> > Thanks in advance

Friday, March 23, 2012

Mulitple Queries in a Stored Procedure

I have written a stored procedure that contains queries which return data.
It works correctly in Query Analyzer, returning each of the labled fields.
When I create a report the only return field the report wizard shows is from
the first query. When I add each of the other return fields and run the
report in VS I get an out of index error.RS only supports a single resultset being returned.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"bassbuster" <bassbuster@.discussions.microsoft.com> wrote in message
news:39FAA817-C491-493D-81BB-FDA153D7DB57@.microsoft.com...
> I have written a stored procedure that contains queries which return data.
> It works correctly in Query Analyzer, returning each of the labled fields.
> When I create a report the only return field the report wizard shows is
> from
> the first query. When I add each of the other return fields and run the
> report in VS I get an out of index error.

Friday, March 9, 2012

MSSQL2005 SP2 and DB-Lib Connection

We have some legacy processes written in C with embedded SQL. They were
compiled with MSSQL2000 libraries and used db-lib for database connections.
After the database was upgraded to MSSQL2005, they could still make the
connection. Recently we have applied MSSQL2005 service pack 2 on the test
server and these processes can no longer connect (error message: SQL Server
is unavailable or does not exist). All other apps using the native client
work OK. Is there anything I can do at the MSSQL side to allow those legacy
processes to connect? Thanks.
Wow... it's been awhile since I supported C and DBLib. I taught this at MSU
for 5 years or so but that was a LONG time ago...
Ok, consider that DBLib requires a matched set of the named pipes DLL and
the dblib dll. If these get out of sync then you're pooched.
I'm really surprised that you've been able to hold out this long. I would
get up on Connect and report a bug but I doubt if they support DBLib any
longer. I don't think there is anything you can do on the server side to fix
it--except rolling back SP2. I expect the tightened the TDS in some way that
made it incompatible with legacy DBLib apps.
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"mason" <masonliu@.msn.com> wrote in message
news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...
> We have some legacy processes written in C with embedded SQL. They were
> compiled with MSSQL2000 libraries and used db-lib for database
> connections. After the database was upgraded to MSSQL2005, they could
> still make the connection. Recently we have applied MSSQL2005 service pack
> 2 on the test server and these processes can no longer connect (error
> message: SQL Server is unavailable or does not exist). All other apps
> using the native client work OK. Is there anything I can do at the MSSQL
> side to allow those legacy processes to connect? Thanks.
|||We will rewrite them if we have to, but if there is a way to give them
another life, ... Thanks.
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:ubW7bCudHHA.3272@.TK2MSFTNGP03.phx.gbl...[vbcol=seagreen]
> Wow... it's been awhile since I supported C and DBLib. I taught this at
> MSU for 5 years or so but that was a LONG time ago...
> Ok, consider that DBLib requires a matched set of the named pipes DLL and
> the dblib dll. If these get out of sync then you're pooched.
> I'm really surprised that you've been able to hold out this long. I would
> get up on Connect and report a bug but I doubt if they support DBLib any
> longer. I don't think there is anything you can do on the server side to
> fix it--except rolling back SP2. I expect the tightened the TDS in some
> way that made it incompatible with legacy DBLib apps.
> hth
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "mason" <masonliu@.msn.com> wrote in message
> news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...
|||Did the test server work before you applied SP@. and did you also upgrade the
test server from SQL 2000? The reason I ask is that SQL Server 2005 doesn't
include the dblib dll anymore so the only way it would have worked is if the
dll was left over from SQL Server 2000.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"mason" <masonliu@.msn.com> wrote in message
news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...
> We have some legacy processes written in C with embedded SQL. They were
> compiled with MSSQL2000 libraries and used db-lib for database
> connections. After the database was upgraded to MSSQL2005, they could
> still make the connection. Recently we have applied MSSQL2005 service pack
> 2 on the test server and these processes can no longer connect (error
> message: SQL Server is unavailable or does not exist). All other apps
> using the native client work OK. Is there anything I can do at the MSSQL
> side to allow those legacy processes to connect? Thanks.
|||Yes. It worked with MSSQL2005 SP1. The test server was created from scratch
with MSSQL2005. We copied two DLLs (ntwdblib.dll and sqlakw32.dll) from
MSSQL2000 client.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:70709573-251D-4E13-8F60-75AF6858DD62@.microsoft.com...
> Did the test server work before you applied SP@. and did you also upgrade
> the test server from SQL 2000? The reason I ask is that SQL Server 2005
> doesn't include the dblib dll anymore so the only way it would have worked
> is if the dll was left over from SQL Server 2000.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "mason" <masonliu@.msn.com> wrote in message
> news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...
>
|||Did you register both DLLs?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"mason" <masonliu@.msn.com> wrote in message
news:%2301l8PvdHHA.5056@.TK2MSFTNGP02.phx.gbl...
> Yes. It worked with MSSQL2005 SP1. The test server was created from
> scratch with MSSQL2005. We copied two DLLs (ntwdblib.dll and sqlakw32.dll)
> from MSSQL2000 client.
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:70709573-251D-4E13-8F60-75AF6858DD62@.microsoft.com...
>
|||No. Tried to register now and got error msgs such as
DllRegisterServer/DllInstall entry points not found.
Those processes are working fine under MSSQL2005 SP1 in production.
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:e4nA%23i5dHHA.984@.TK2MSFTNGP04.phx.gbl...[vbcol=seagreen]
> Did you register both DLLs?
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
> "mason" <masonliu@.msn.com> wrote in message
> news:%2301l8PvdHHA.5056@.TK2MSFTNGP02.phx.gbl...

MSSQL2005 SP2 and DB-Lib Connection

We have some legacy processes written in C with embedded SQL. They were
compiled with MSSQL2000 libraries and used db-lib for database connections.
After the database was upgraded to MSSQL2005, they could still make the
connection. Recently we have applied MSSQL2005 service pack 2 on the test
server and these processes can no longer connect (error message: SQL Server
is unavailable or does not exist). All other apps using the native client
work OK. Is there anything I can do at the MSSQL side to allow those legacy
processes to connect? Thanks.Wow... it's been awhile since I supported C and DBLib. I taught this at MSU
for 5 years or so but that was a LONG time ago...
Ok, consider that DBLib requires a matched set of the named pipes DLL and
the dblib dll. If these get out of sync then you're pooched.
I'm really surprised that you've been able to hold out this long. I would
get up on Connect and report a bug but I doubt if they support DBLib any
longer. I don't think there is anything you can do on the server side to fix
it--except rolling back SP2. I expect the tightened the TDS in some way that
made it incompatible with legacy DBLib apps.
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"mason" <masonliu@.msn.com> wrote in message
news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...
> We have some legacy processes written in C with embedded SQL. They were
> compiled with MSSQL2000 libraries and used db-lib for database
> connections. After the database was upgraded to MSSQL2005, they could
> still make the connection. Recently we have applied MSSQL2005 service pack
> 2 on the test server and these processes can no longer connect (error
> message: SQL Server is unavailable or does not exist). All other apps
> using the native client work OK. Is there anything I can do at the MSSQL
> side to allow those legacy processes to connect? Thanks.|||We will rewrite them if we have to, but if there is a way to give them
another life, ... Thanks.
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:ubW7bCudHHA.3272@.TK2MSFTNGP03.phx.gbl...[vbcol=seagreen]
> Wow... it's been awhile since I supported C and DBLib. I taught this at
> MSU for 5 years or so but that was a LONG time ago...
> Ok, consider that DBLib requires a matched set of the named pipes DLL and
> the dblib dll. If these get out of sync then you're pooched.
> I'm really surprised that you've been able to hold out this long. I would
> get up on Connect and report a bug but I doubt if they support DBLib any
> longer. I don't think there is anything you can do on the server side to
> fix it--except rolling back SP2. I expect the tightened the TDS in some
> way that made it incompatible with legacy DBLib apps.
> hth
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "mason" <masonliu@.msn.com> wrote in message
> news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...|||Did the test server work before you applied SP@. and did you also upgrade the
test server from SQL 2000? The reason I ask is that SQL Server 2005 doesn't
include the dblib dll anymore so the only way it would have worked is if the
dll was left over from SQL Server 2000.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"mason" <masonliu@.msn.com> wrote in message
news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...
> We have some legacy processes written in C with embedded SQL. They were
> compiled with MSSQL2000 libraries and used db-lib for database
> connections. After the database was upgraded to MSSQL2005, they could
> still make the connection. Recently we have applied MSSQL2005 service pack
> 2 on the test server and these processes can no longer connect (error
> message: SQL Server is unavailable or does not exist). All other apps
> using the native client work OK. Is there anything I can do at the MSSQL
> side to allow those legacy processes to connect? Thanks.|||Yes. It worked with MSSQL2005 SP1. The test server was created from scratch
with MSSQL2005. We copied two DLLs (ntwdblib.dll and sqlakw32.dll) from
MSSQL2000 client.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:70709573-251D-4E13-8F60-75AF6858DD62@.microsoft.com...
> Did the test server work before you applied SP@. and did you also upgrade
> the test server from SQL 2000? The reason I ask is that SQL Server 2005
> doesn't include the dblib dll anymore so the only way it would have worked
> is if the dll was left over from SQL Server 2000.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "mason" <masonliu@.msn.com> wrote in message
> news:O8MZ$FsdHHA.984@.TK2MSFTNGP04.phx.gbl...
>|||Did you register both DLLs?
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"mason" <masonliu@.msn.com> wrote in message
news:%2301l8PvdHHA.5056@.TK2MSFTNGP02.phx.gbl...
> Yes. It worked with MSSQL2005 SP1. The test server was created from
> scratch with MSSQL2005. We copied two DLLs (ntwdblib.dll and sqlakw32.dll)
> from MSSQL2000 client.
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:70709573-251D-4E13-8F60-75AF6858DD62@.microsoft.com...
>|||No. Tried to register now and got error msgs such as
DllRegisterServer/DllInstall entry points not found.
Those processes are working fine under MSSQL2005 SP1 in production.
"William (Bill) Vaughn" <billvaRemoveThis@.betav.com> wrote in message
news:e4nA%23i5dHHA.984@.TK2MSFTNGP04.phx.gbl...[vbcol=seagreen]
> Did you register both DLLs?
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ----
---
> "mason" <masonliu@.msn.com> wrote in message
> news:%2301l8PvdHHA.5056@.TK2MSFTNGP02.phx.gbl...

Monday, February 20, 2012

MSSQL ODBC vs. ADO

We have in our applications written in VC++ access also to MSSQL but only over ODBC. Is there any performance difference (is ADO faster) between ODBC and ADO access? And if yes how much it could be ?
Thanks for your answer.Yes, ADO is faster. How much faster depends on a lot of things but the generally accepted figures range from three to ten times faster.

-PatP