• Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I used to use the datalink component to build strings, however this is only usefull in .NET for OleDB strings. The SQL and Orcale strings does not rrequire a provider, so I end up stripping them out. Is there a replacement for the datalink component or a workaround for bulding strings in .NET?
 
Hi,

Thank you for posting in the community!

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need a substitution for the data
link properies dialog box. If there is any misunderstanding, please feel
free to let me know.

As far as I know, there isn't a replacement for this component. Visual
Studio .NET uses this dialog box by design. It doesn't mean that
SqlConnection and OracleConnection don't need providers. They bind to
specific providers. I think the data link properties dialog box is good to
build a connection string. Do you have other requirements when building the
string?

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
My program uses the data link to mange connections to multiple providers. I can use the datalink to create the following string, but if I want to use this string with the SqlClient in .NET I have to strip out the Provider=SQLOLEDB.1 and then if I want to edit the string again I have to add Provider=SQLOLEDB.1 back in again! This same scenario exists for Oracle also... It is just very messy...

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Saudi Stuff
 
Hi Robby,

I don't think there is any better (easy) way.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

My program uses the data link to mange connections to multiple providers.
I can use the datalink to create the following string, but if I want to use
this string with the SqlClient in .NET I have to strip out the
Provider=SQLOLEDB.1 and then if I want to edit the string again I have to
add Provider=SQLOLEDB.1 back in again! This same scenario exists for Oracle
also... It is just very messy...
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=Saudi Stuff
 
Hi Robby,

Actually, we needn't remove the Provider property from it. It is a part of
the connection string. Could you please tell me why you need to remove it?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Because when if I try to use an OleDB SQLServer string with the Provider keyword in an .NET SqlClient.SqlConnection it tells me that the keyword provider is not supportted...
 
Hi Robby,

I'm afraid that this is by design. When you use the Data Link Properties
dialog in VS.NET IDE from the properties window to build the connection
string for a SqlConnection object, the generated connection string will not
include Provider=SQLOLEDB.1, as the it is using a provider dedicate to the
SQL server connection. However, in other cases, the property string will be
added, because SQLOLEDB driver is used to access SQL database.

I'm sorry for the inconvenience it has brought to you. If you have any idea
that can make our future products better, please feel free to send your
feedback to (e-mail address removed). Your suggestion will be highly
appreciated. Thank you!

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top