Showing posts with label native. Show all posts
Showing posts with label native. Show all posts

Wednesday, March 21, 2012

OLEDB vs ODBC

I am new SQL Server 2005. The native client supports both OLEDB and ODBC
connections. Which one should I prefer and why? Thanks.
I would say it depends on the particular application. We use JD Edwards
which runs on SQL server and it has always been configured for ODBC
connections. Because of a couple of other apps we have in house which call
for an OLEDB connection and the performance was great we migrated from ODBC
to OLEDB on JD Edwards and the performance was severely degraded so we
switched back to ODBC on this particular app.
Hope this helps.
Robby
"mason" <masonliu@.msn.com> wrote in message
news:O81z$qzNGHA.208@.tk2msftngp13.phx.gbl...
>I am new SQL Server 2005. The native client supports both OLEDB and ODBC
>connections. Which one should I prefer and why? Thanks.

Tuesday, March 20, 2012

OLEDB error encountered calling ICommandText:: execute

OLEDB error encountered calling ICommandText:: execute ; hr = 0x80040e14 .

SQLSTATE : 42000 , Native Error : 3013

Error state 1 , Severity : 16

Source : Microsoft OLE DB Provider for SQL Server

Error Message : Backup Database is terminating abnormally

What are you expecting by flooding the forums with your error message and no further explanations where this error occurs, which version of the database you are using, which Service pack, etc. ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

Monday, March 19, 2012

OLEDB Cursor Questions

Howdy folks! I have some questions on cursors.

I'm trying to create a RecordSet type object in native oledb which only stores 1 row at a time. The main reason for this is that I very well may be selecting thousands of records and I don't want to run into memory issues storing all those rows. Thus I need to use a cursor to move between records in a Rowset. Unfortunately, I'm required to support SQL query processing, so unless there's an easy workaround, I'm limited to the forward-only and scrollable cursors. Both cursors would work from the functionality standpoint, but I have some concerns with both of them:

Forward-Only:

Although the forward-only read-only cursor is the fastest query processor cursor and the second fastest cursor overall, this cursor provides the least amount of functionality. It does not support bookmarks or updates.

This cursor does not allow quick restarts...in fact, it's mentioned in an msdn article that when this cursor is restarted, it may rerun the query. I would have to restart a forward only cursor to allow for MoveToPrev() and MoveToFirst() functionality. Can anyone confirm that the query is rerun on a restartposition call?

MSDN states that this cursor does not support updates, does this mean that if I execute an UPDATE query on a row within the rowset, then move to that row via GetNextRows the data will be old?

If the above is true, that makes me think the cursor is caching the data. MSDN doesn't state this, but wouldn't that be accurate?

Scrollable:

"The scrollable read-only cursor is the most functional query processor cursor. The result set of this cursor is cached. This provides fast cursor restarts but makes it more resource intensive, especially for queries with large result sets. Because the results are cached, changes to the underlying base tables for a query are not reflected in the query results unless the query is re-executed."

Is the cache the same as just storing all selected rows in memory? If so, why would I bother using this cursor at all instead of storing the rows in my own data structure?

Again if anyone knows a simple way to run SQL queries and still use a base table cursor let me know; otherwise I've got to decide between the slower two.

Thanks in advance!

The forward-only does not cache the data so if you want to move back, you would have to requery forcing the cursor to the first row. When MSDN says the cursor is not updatable it means that you cannot change the data you read and like in a base table cursor. If you update the data on a different query you should see the changes.

The scrollable cursor caches data for SELECT queries which makes it expensive to run (and that is why I don't use it). Cachind the data yourself is a good option.

|||

Thanks Joao.

So does the scrollable cursor cache the data as it reads each row, or cache the entire selected rowset at the beginning?

Regardless I agree that it's impractical. I guess I'll just tell my team that if they want efficiency, they'll need to sort the data properly in the query beforehand. Smile

|||Now, there's a question I would like to see answered by someone from Microsoft.|||I have yet another tough question:

Say I set an ICommandText object (e.g. m_pICmdText) to "SELECT * FROM Table1" and execute it, placing the data in pIRowset1.
Now say I come along and execute "SELECT * FROM Table2" from the same ICommandText object, but placing the data into a different IRowset (say pIRowset2).

Both rowsets use forward-only cursors.

Now what will happen if I restart the position of pIRowset1? Will the original sql statement be executed, or will the last text to be placed into m_pICmdText be executed?

UPDATE:

I've since learned that a command can only have one rowset open at a time...thus the above is a moot point

OLEDB Cursor Questions

Howdy folks! I have some questions on cursors.

I'm trying to create a RecordSet type object in native oledb which only stores 1 row at a time. The main reason for this is that I very well may be selecting thousands of records and I don't want to run into memory issues storing all those rows. Thus I need to use a cursor to move between records in a Rowset. Unfortunately, I'm required to support SQL query processing, so unless there's an easy workaround, I'm limited to the forward-only and scrollable cursors. Both cursors would work from the functionality standpoint, but I have some concerns with both of them:

Forward-Only:

Although the forward-only read-only cursor is the fastest query processor cursor and the second fastest cursor overall, this cursor provides the least amount of functionality. It does not support bookmarks or updates.

This cursor does not allow quick restarts...in fact, it's mentioned in an msdn article that when this cursor is restarted, it may rerun the query. I would have to restart a forward only cursor to allow for MoveToPrev() and MoveToFirst() functionality. Can anyone confirm that the query is rerun on a restartposition call?

MSDN states that this cursor does not support updates, does this mean that if I execute an UPDATE query on a row within the rowset, then move to that row via GetNextRows the data will be old?

If the above is true, that makes me think the cursor is caching the data. MSDN doesn't state this, but wouldn't that be accurate?

Scrollable:

"The scrollable read-only cursor is the most functional query processor cursor. The result set of this cursor is cached. This provides fast cursor restarts but makes it more resource intensive, especially for queries with large result sets. Because the results are cached, changes to the underlying base tables for a query are not reflected in the query results unless the query is re-executed."

Is the cache the same as just storing all selected rows in memory? If so, why would I bother using this cursor at all instead of storing the rows in my own data structure?

Again if anyone knows a simple way to run SQL queries and still use a base table cursor let me know; otherwise I've got to decide between the slower two.

Thanks in advance!

The forward-only does not cache the data so if you want to move back, you would have to requery forcing the cursor to the first row. When MSDN says the cursor is not updatable it means that you cannot change the data you read and like in a base table cursor. If you update the data on a different query you should see the changes.

The scrollable cursor caches data for SELECT queries which makes it expensive to run (and that is why I don't use it). Cachind the data yourself is a good option.

|||

Thanks Joao.

So does the scrollable cursor cache the data as it reads each row, or cache the entire selected rowset at the beginning?

Regardless I agree that it's impractical. I guess I'll just tell my team that if they want efficiency, they'll need to sort the data properly in the query beforehand. Smile

|||Now, there's a question I would like to see answered by someone from Microsoft.|||I have yet another tough question:

Say I set an ICommandText object (e.g. m_pICmdText) to "SELECT * FROM Table1" and execute it, placing the data in pIRowset1.
Now say I come along and execute "SELECT * FROM Table2" from the same ICommandText object, but placing the data into a different IRowset (say pIRowset2).

Both rowsets use forward-only cursors.

Now what will happen if I restart the position of pIRowset1? Will the original sql statement be executed, or will the last text to be placed into m_pICmdText be executed?

UPDATE:

I've since learned that a command can only have one rowset open at a time...thus the above is a moot point

OLEDB Cursor Questions

Howdy folks! I have some questions on cursors.

I'm trying to create a RecordSet type object in native oledb which only stores 1 row at a time. The main reason for this is that I very well may be selecting thousands of records and I don't want to run into memory issues storing all those rows. Thus I need to use a cursor to move between records in a Rowset. Unfortunately, I'm required to support SQL query processing, so unless there's an easy workaround, I'm limited to the forward-only and scrollable cursors. Both cursors would work from the functionality standpoint, but I have some concerns with both of them:

Forward-Only:

Although the forward-only read-only cursor is the fastest query processor cursor and the second fastest cursor overall, this cursor provides the least amount of functionality. It does not support bookmarks or updates.

This cursor does not allow quick restarts...in fact, it's mentioned in an msdn article that when this cursor is restarted, it may rerun the query. I would have to restart a forward only cursor to allow for MoveToPrev() and MoveToFirst() functionality. Can anyone confirm that the query is rerun on a restartposition call?

MSDN states that this cursor does not support updates, does this mean that if I execute an UPDATE query on a row within the rowset, then move to that row via GetNextRows the data will be old?

If the above is true, that makes me think the cursor is caching the data. MSDN doesn't state this, but wouldn't that be accurate?

Scrollable:

"The scrollable read-only cursor is the most functional query processor cursor. The result set of this cursor is cached. This provides fast cursor restarts but makes it more resource intensive, especially for queries with large result sets. Because the results are cached, changes to the underlying base tables for a query are not reflected in the query results unless the query is re-executed."

Is the cache the same as just storing all selected rows in memory? If so, why would I bother using this cursor at all instead of storing the rows in my own data structure?

Again if anyone knows a simple way to run SQL queries and still use a base table cursor let me know; otherwise I've got to decide between the slower two.

Thanks in advance!

The forward-only does not cache the data so if you want to move back, you would have to requery forcing the cursor to the first row. When MSDN says the cursor is not updatable it means that you cannot change the data you read and like in a base table cursor. If you update the data on a different query you should see the changes.

The scrollable cursor caches data for SELECT queries which makes it expensive to run (and that is why I don't use it). Cachind the data yourself is a good option.

|||

Thanks Joao.

So does the scrollable cursor cache the data as it reads each row, or cache the entire selected rowset at the beginning?

Regardless I agree that it's impractical. I guess I'll just tell my team that if they want efficiency, they'll need to sort the data properly in the query beforehand. Smile

|||Now, there's a question I would like to see answered by someone from Microsoft.|||I have yet another tough question:

Say I set an ICommandText object (e.g. m_pICmdText) to "SELECT * FROM Table1" and execute it, placing the data in pIRowset1.
Now say I come along and execute "SELECT * FROM Table2" from the same ICommandText object, but placing the data into a different IRowset (say pIRowset2).

Both rowsets use forward-only cursors.

Now what will happen if I restart the position of pIRowset1? Will the original sql statement be executed, or will the last text to be placed into m_pICmdText be executed?

UPDATE:

I've since learned that a command can only have one rowset open at a time...thus the above is a moot point

Monday, March 12, 2012

OleDB Connection Class in Custom Task?

I have OLE DB Connections set up in my connection manager (Native OLE DB\Microsoft OLE DB Provider for SQL Server). I would like to reference and query these connections from a custom task, written in C#. I currently reference it as follows:

using System.Data.OleDb;

...................................

OleDbConnection connection = (OleDbConnection) connections["MyConnection"].AcquireConnection(null);

What may be obvious to some (though wasn't to me, as I am new at this), when I run the task, I get an error saying that I cannot make this cast. After perusing the boards, I understand that this is because I am not making a cast to the right connection type. Well, that is where I am lost. What connection type (and corresponding library) do I need to reference? I want to continue to use the "Native OLE DB..." connection.

Thanks!

The OleDb connection manager is for tasks and data flow components that use unmanaged OleDb API.
Since you want managed connection object, use ADO.NET connection manager, select the same provider (Native OLE DB\Microsoft OLE DB Provider for SQL Server).

|||Makes sense. I don't know much about connection managers, but this helps. I'll give it a shot. Thanks!

Friday, March 9, 2012

OLE DB Services and SQL Native Client

Is the option OLE DB Services = -4 still valid in the connection string with
the SQL Native Client ?Hello Michael,
The connection string in the SQL Native Client did not contain the OLE DB
Services option.
If you want to disable the resource pooling, please set the Pooling
property to false in the connection string.
SqlConnection.ConnectionString Property
http://msdn2.microsoft.com/en-us/li...t.sqlconnection
connectionstring(VS.80).aspx
This article described all the propertied you could use in the
ConnectionString.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello,
I'm NOT using SqlConnection.
I'm using ADO (NOT ADO.NET) with Provider=SQLNCLI
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:S5EFMreZHHA.2372@.TK2MSFTNGHUB02.phx.gbl...
> Hello Michael,
> The connection string in the SQL Native Client did not contain the OLE DB
> Services option.
> If you want to disable the resource pooling, please set the Pooling
> property to false in the connection string.
> SqlConnection.ConnectionString Property
> [url]http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection[/ur
l]
> connectionstring(VS.80).aspx
> This article described all the propertied you could use in the
> ConnectionString.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Michael,
Thanks for the update.
Since the SQL Native Client works different with ADO, I am doult that ADO
did not fully compatitable with SQL Native Client. I will consult the
internal team to confirm whether we could use the Pooling setting in the
connnection string for ADO.
My suggestion is that you may considaring migrate your application from ADO
to ADO.NET if you do not have other concern. Please let me know whether you
have any concern about the ADO.NET. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||The application is HUGE and was developed using ADO which is why we can not
migrate.
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:nwGUjviZHHA.3800@.TK2MSFTNGHUB02.phx.gbl...
> Hello Michael,
> Thanks for the update.
> Since the SQL Native Client works different with ADO, I am doult that ADO
> did not fully compatitable with SQL Native Client. I will consult the
> internal team to confirm whether we could use the Pooling setting in the
> connnection string for ADO.
> My suggestion is that you may considaring migrate your application from
> ADO
> to ADO.NET if you do not have other concern. Please let me know whether
> you
> have any concern about the ADO.NET. Thank you!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Michael,
I did not get the reply from the internal right now.
Once I get the response, I will update you ASAP.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hello Michael,
According to the response from internal team, OLE DB SERVICES works for any
OLE DB Provider because it operates at the OLE DB service layer that is
used to instantiate a provider instance. i.e. it's not a provider-specific
setting. So you could still use the OLE DB SERVICES = -4 in ADO string.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.|||Ah why do you keep polling like this? It just adds noise to the newsgroup.
We know you're there and want to help.
Thanks
____________________________________
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)
----
---
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:kqiT3vGbHHA.3820@.TK2MSFTNGHUB02.phx.gbl...
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello William,
I just want to check the status of the issue. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.

OLE DB Services and SQL Native Client

Is the option OLE DB Services = -4 still valid in the connection string with
the SQL Native Client ?
Hi Michael,
I notice that you have posted the same question in
microsoft.public.sqlserver.clients newsgroup, to which I have already
responded. Please check my answer there, and if you need any further
assistance on this particular issue please reply to me in that thread so I
can follow up with you. In the future, please don't cross-post the same
question in multiple newsgroups. This will help our engineers work on your
question more efficiently. Your understanding and cooperation is
appreciated.
For your convenience, I have included my reply as follows:
Hello Michael,
The connection string in the SQL Native Client did not contain the OLE DB
Services option.
If you want to disable the resource pooling, please set the Pooling
property to false in the connection string.
SqlConnection.ConnectionString Property
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection
connectionstring(VS.80).aspx
This article described all the propertied you could use in the
ConnectionString.
Sincerely,
Wei Lu
Microsoft Online Community Support

Thank you and have a nice day!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

OLE DB Services and SQL Native Client

Is the option OLE DB Services = -4 still valid in the connection string with
the SQL Native Client ?
Hello Michael,
The connection string in the SQL Native Client did not contain the OLE DB
Services option.
If you want to disable the resource pooling, please set the Pooling
property to false in the connection string.
SqlConnection.ConnectionString Property
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection
connectionstring(VS.80).aspx
This article described all the propertied you could use in the
ConnectionString.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Hello,
I'm NOT using SqlConnection.
I'm using ADO (NOT ADO.NET) with Provider=SQLNCLI
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:S5EFMreZHHA.2372@.TK2MSFTNGHUB02.phx.gbl...
> Hello Michael,
> The connection string in the SQL Native Client did not contain the OLE DB
> Services option.
> If you want to disable the resource pooling, please set the Pooling
> property to false in the connection string.
> SqlConnection.ConnectionString Property
> http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection
> connectionstring(VS.80).aspx
> This article described all the propertied you could use in the
> ConnectionString.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
|||Hello Michael,
Thanks for the update.
Since the SQL Native Client works different with ADO, I am doult that ADO
did not fully compatitable with SQL Native Client. I will consult the
internal team to confirm whether we could use the Pooling setting in the
connnection string for ADO.
My suggestion is that you may considaring migrate your application from ADO
to ADO.NET if you do not have other concern. Please let me know whether you
have any concern about the ADO.NET. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
|||The application is HUGE and was developed using ADO which is why we can not
migrate.
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:nwGUjviZHHA.3800@.TK2MSFTNGHUB02.phx.gbl...
> Hello Michael,
> Thanks for the update.
> Since the SQL Native Client works different with ADO, I am doult that ADO
> did not fully compatitable with SQL Native Client. I will consult the
> internal team to confirm whether we could use the Pooling setting in the
> connnection string for ADO.
> My suggestion is that you may considaring migrate your application from
> ADO
> to ADO.NET if you do not have other concern. Please let me know whether
> you
> have any concern about the ADO.NET. Thank you!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
|||Hello Michael,
I did not get the reply from the internal right now.
Once I get the response, I will update you ASAP.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
|||Hello Michael,
According to the response from internal team, OLE DB SERVICES works for any
OLE DB Provider because it operates at the OLE DB service layer that is
used to instantiate a provider instance. i.e. it's not a provider-specific
setting. So you could still use the OLE DB SERVICES = -4 in ADO string.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Ah why do you keep polling like this? It just adds noise to the newsgroup.
We know you're there and want to help.
Thanks
____________________________________
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)
------
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:kqiT3vGbHHA.3820@.TK2MSFTNGHUB02.phx.gbl...
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
|||Hello William,
I just want to check the status of the issue. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, March 7, 2012

OLE DB or ADO? plz give me a suggestion!

i am learn database access with native vc++, so ADO.NET is not electable for me.

i wonder whether i should study OLE DB first or ADO.

i've been working with ADO under VB for some time, it's very simple to use. but i dont think it's the best choice for vc++, i think it's OLE DB. but OLE DB is really difficult, too many interfaces, and properties!!!
could u give a suggestion? should i learn ADO with vc++ first and then OLE DB, or sould i learn OLE DB directly?

I would not suggest using ADO, use OLE DB if you're trying to stay native (since ADO has been superceded by ADO.NET). You could also use the C libraries that many database vendors supply.

Is there a reason you're using native C++ database calls, and not something like ADO.NET? Just curious,

Josh Lindenmuth|||thank for your suggestion! i use native C++ because i like it, and i am a student, i am learning native VC++. ADO.NET is great, it does a lot for you. but i want to learn more about the system.

the biggest problem i am facing now is about the data conversion and binding, i can find much material about this subject on MSDN. and the Property Set too, almost every call need a set of properties, but no body tell why i need them. and it seems that many calls can work with NULL property set!!!

is there any nice book for teaching OLE DB?|||

I still say if you're going to use OLEDb, use it through ADO.NET (there's an OLEDB data provider). You'll develop code faster, and it will probably perform better as well. Otherwise, I don't see much use ... if you're going to use native C++ I'd still suggest using ODBC or one of the database specific C libraries that many vendors provide.

Here are two older books on the subject of ODBC and OLEDB:
http://www.amazon.com/gp/product/0764533088/102-6516636-3196933?v=glance&n=283155&v=glance

http://www.amazon.com/gp/product/1572316128/102-6516636-3196933?v=glance&n=283155&s=books&v=glance

Hope this helps,
Josh Lindenmuth

|||thanks!!
one more question!
if i want to code a lightweight COM component, should i use ATL+ODBC or ATL+OLE DB ?|||

You should also look at ODBC. It is a simpler API with fewer calls and hence is easier to learn than OLE DB. OLE DB would be a good choice if you plan to become a COM expert, otherwise ODBC may be your best bet. For most tasks you will write less code with ODBC than you would with OLE DB.

|||yes, i want to be a COM expert! but the OLE DB interfaces are really difficult for starters, however, ATL make it much easier to use! i think i can use those wrapped OLE DB interfaces first!