Re: MDAC 2.8 vs MDAC 2.7

From: Val Mazur (group51a_at_hotmail.com)
Date: 10/30/04


Date: Sat, 30 Oct 2004 15:01:46 -0400

Hi,

Stability of the provider depends on quality of the code inside of it and
quality of testing. It is not just because it is ODBC driver. Adding extra
layer degrades performance and puts limitations on functionality when you
work with the database

-- 
Val Mazur
Microsoft MVP
"Michael D. Long" <michael.d.long-nospam@comcast.net> wrote in message 
news:%237iefpqvEHA.3228@TK2MSFTNGP12.phx.gbl...
>I disagree with the blanket statement that choosing ODBC is in general a 
>bad idea.  I have observed cases where the ODBC driver is more stable and 
>performs better (even with the extra layer) than the native OLE DB 
>provider.
>
> -- 
> Michael D. Long
>
>
> "Val Mazur" <group51a@hotmail.com> wrote in message 
> news:u9I0lIivEHA.2192@TK2MSFTNGP14.phx.gbl...
>> Hi,
>>
>> Actually RecordCount has to do with the provider, because it directly to 
>> the provider if it is able to return actual record count for the 
>> specified cursor. But in a case if provider is not able to return record 
>> count, it will return -1, not 0. In a case of 0 could be two issues: 
>> there are no records in a recordset or it is a bug.
>> If just changing of the connection string to use OLEDB provider solves 
>> this issue, then it looks like a bug in OLEDB for ODBC provider or in 
>> ODBC driver. But do you get an actual recordset opened in your case?
>> Initially it was not a good idea to use DSN, because ADO does NOT work 
>> with ODBC drivers directly and has to place OLEDB for ODBC driver in 
>> between ADO and ODBC driver. It just add additional layer with potential 
>> bugs in it.
>> Also you would need to separate declaration and instantiation of the 
>> connection into two separate lines of code. Otherwise it would lead to 
>> the connection and memory leaks. Your code should look like
>>
>> Dim cn1 as adodb.connection
>>
>> Set cn1 as new adodb.connection
>>
>>
>> -- 
>> Val Mazur
>> Microsoft MVP
>>
>>
>> "Jiho Han" <jhan@infinityinfo.com> wrote in message 
>> news:%23hHjvrdvEHA.716@TK2MSFTNGP10.phx.gbl...
>>> Your problem with RecordCount has nothing to do with OLEDB vs. ODBC nor 
>>> MDAC 2.8 vs MDAC 2.7 as the subject suggests.
>>>
>>> Try setting:
>>>
>>> rst.CursorLocation = adUseClient
>>>
>>> before you open the recordset.
>>>
>>>> I have written several vb6 applications with MDAC 2.7 SP1 Refresh.
>>>> This application connects to a SQL Server 2000 SP3a on Windows 20003
>>>> Server.
>>>> I run this application on a WXP Pro client.
>>>> I have a DSN defined to connect to SQLServer via ODBC
>>>> All works ok with this code:
>>>> Dim cn1 as new adodb.connection
>>>> Dim rst as ADODB.Recordset
>>>> Dim lngNumber as long
>>>> cn1.ConnectionTimeout = 60
>>>> cn1.CursorLocation = adUseClient
>>>> cn1.Open "DSN=" & sName, sUser, sPwd
>>>> rst.Open "SELECT ID FROM TABLE", cn1, adOpenKeyset, adLockOptimistic
>>>> lngNumber = rst.Recordcount
>>>>
>>>> ' Note that lngNumber = 3567
>>>> if lngNumber=0 then MsgBox "Error"
>>>> .....
>>>> If i put the application on Windows 2003 server i get:
>>>> ' The same table with 3567 records return 0
>>>> if lngNumber=0 then MsgBox "Error"
>>>> and the Box "Error" appears!!!!!
>>>>
>>>> I changed to OleDB and It works but the problem is:
>>>> when all my server will be Win 2003 I will have lots of
>>>> program with problems !!!!!!
>>>> How can i continue in using DSN with ODBC with Windows 2003 server ?
>>>> My customers are not enthusiastic to pay me to
>>>> change all programs !
>>>> Help me please
>>>> Thank you
>>>
>>
>>
>
> 


Relevant Pages

  • Re: MDAC 2.8 vs MDAC 2.7
    ... an extra layer over an efficiently written ODBC driver can yield ... better performance than a less efficient native OLE DB provider. ... It is not just because it is ODBC driver. ... >>> there are no records in a recordset or it is a bug. ...
    (microsoft.public.data.ado)
  • Re: MDAC 2.8 vs MDAC 2.7
    ... > yield better performance than a less efficient native OLE DB provider. ... > "Val Mazur" wrote in message ... It is not just because it is ODBC driver. ... there are no records in a recordset or it is a bug. ...
    (microsoft.public.data.ado)
  • Re: ODBC OLEDB
    ... In article, David ... > The problem is I have an OLEDB provider for a propietary database ... > but no ODBC driver. ... Universal Data Access and Virtual Database Technology Providers ...
    (microsoft.public.data.odbc)
  • help on Linked server
    ... production server.The prod machine has progress ... The provider name is Microsoft OLE DB provider ... for ODBC driver and the DAta source name is the system ... Driver Manager] Data source name not found and no default ...
    (microsoft.public.sqlserver.odbc)
  • Re: submitted data not updated promptly with ms access
    ... caused.I am posting from http://www.developersdex.com/ ... Provider. ... Unfortunately, problem re-emerges again. ... The great news is that with ODBC driver, i can see the update made ...
    (microsoft.public.inetserver.asp.db)