Visual Studio 2005 to 2008 with problem

  • Thread starter Thread starter Marc Robitaille
  • Start date Start date
M

Marc Robitaille

Hello,

I have created an application with Visual Studio 2005 Standard Edition. The
application is connecting to a database that I made it with SQL Server 2005.
The application uses the TransactionScope class this way with no problem:

Using Scope As New
Transactions.TransactionScope(Transactions.TransactionScopeOption.RequiresNew)

....

Scope.Complete()

End Using

In the transaction, the application executes a stored procedure with
parameters. I use the SqlClient namespace to do the job. Then I convert my
code to Visual Basic 2008 Express Edition. I have also switch my database
from 2005 to SQL Server 2008 Express Edition. That is where the problems
started. The application does not work when I use the TransactionScope
class. I have this error message:

The requested operation could not be performed because OLE DB provider
"MSDASQL" for linked server "(null)" does not support the required
transaction interface.

But when I put the lines that create the transactionScope in comment,
everything works just fine. What is going wrong? I need that Transaction if
someting goes wrong. Is there a new way to create a transaction with VB
Express 2008 that I am not aware of? Is there somebody that had the same
problem? If yes, how did you solve the problem?

Thank you all!

Marc R.
 
The requested operation could not be performed because OLE DB provider
"MSDASQL" for linked server "(null)" does not support the required
transaction interface.

You are having a connection failure, not a transaction problem. Here are
some things to check:

1. Check that the connection string is correct now
2. If there is truly a linked server somewhere in the mix, ensure it is
linked (this is not necessarily the case, but it could be)

The issue is more likely related to your move to SQL Server 2008 Express
than moving to Visual Studio 2008.

Here is one way to proceed.

1. Set up a new page
2. Create a connection and pull some data from the data source
3. Compare the code here and the failing code and fix the connection
information

That is where I would attack first, as that is what the error is telling
me. If there is more information missing from your post, reply back, and
someone here can delve deeper.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Thank you Gregory!

It was my connection string... Gee, I don't know why I didn't think of it
before...I was fooled by the Test connection button in the application It
always showed me that the connection was Ok even if there was an error in
the connection string???

Thank you again

Marc R.
 
Back
Top