473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to use connectioncreator

when You create a ne sqlconnection, or any other connection, You can use
connection creator to create a connection string. how to do this in Your own
components?

--
"Zeglarstwo jest koniecznoscia
zycie nia nie jest"

www.saper.infra.pl/

Saper(ek)
Nov 15 '05 #1
3 1332
Saper,

The connection creator that you are using is only good for OLE-DB
connections. If you want to use a connection for SQL server, then you could
make sure that the provider is the one for SQL server and then strip off the
provider part, and the rest you should be able to pass to the SqlConnection
constructor.

To use the dialog, you will have to use the IDbPromptInitialize COM
interface with OLE db. The section of the OLE DB Programmer's Reference
titled "Creating Data Source Objects" located at (watch for line wrap):

http://msdn.microsoft.com/library/de...hapter02_2.asp

Should help. You will have to use COM interop, but the interfaces you
need to use and how to use them are defined there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Saper(ek)" <sa*****@tlen.pl> wrote in message
news:bn**********@atlantis.news.tpi.pl...
when You create a ne sqlconnection, or any other connection, You can use
connection creator to create a connection string. how to do this in Your own components?

--
"Zeglarstwo jest koniecznoscia
zycie nia nie jest"

www.saper.infra.pl/

Saper(ek)

Nov 15 '05 #2
hm... no I don't think this is what I was looking for... when You add an
SQLConnection from toolbox to Your project (or OleDbConnection, or any other
connection), and select it, You can set objects properties in designer, in
object inspector. Property named ConnectionString, You can input manualy or
click on the 3 dots button to open a connectionstring creator. how to use
this connectionstring creator in my own components?

--
"Zeglarstwo jest koniecznoscia
zycie nia nie jest"

www.saper.infra.pl/

Saper(ek)
Użytkownik "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.com> napisał w wiadomości
news:us**************@TK2MSFTNGP10.phx.gbl...
Saper,

The connection creator that you are using is only good for OLE-DB
connections. If you want to use a connection for SQL server, then you could make sure that the provider is the one for SQL server and then strip off the provider part, and the rest you should be able to pass to the SqlConnection constructor.

To use the dialog, you will have to use the IDbPromptInitialize COM
interface with OLE db. The section of the OLE DB Programmer's Reference
titled "Creating Data Source Objects" located at (watch for line wrap):

http://msdn.microsoft.com/library/de...hapter02_2.asp
Should help. You will have to use COM interop, but the interfaces you
need to use and how to use them are defined there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Saper(ek)" <sa*****@tlen.pl> wrote in message
news:bn**********@atlantis.news.tpi.pl...
when You create a ne sqlconnection, or any other connection, You can use
connection creator to create a connection string. how to do this in Your

own
components?

--
"Zeglarstwo jest koniecznoscia
zycie nia nie jest"

www.saper.infra.pl/

Saper(ek)


Nov 15 '05 #3
Actually, it is. The dialog that is opened is provided by OLE-DB, not
by VS.NET or by .NET itself. The property grid is just an instance of the
PropertyGrid class (which you can add to your toolbox).

The article that I showed you will bring up the same dialog.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Saper(ek)" <sa*****@tlen.pl> wrote in message
news:bn**********@nemesis.news.tpi.pl...
hm... no I don't think this is what I was looking for... when You add an
SQLConnection from toolbox to Your project (or OleDbConnection, or any other connection), and select it, You can set objects properties in designer, in
object inspector. Property named ConnectionString, You can input manualy or click on the 3 dots button to open a connectionstring creator. how to use
this connectionstring creator in my own components?

--
"Zeglarstwo jest koniecznoscia
zycie nia nie jest"

www.saper.infra.pl/

Saper(ek)
Użytkownik "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.com> napisał w wiadomości
news:us**************@TK2MSFTNGP10.phx.gbl...
Saper,

The connection creator that you are using is only good for OLE-DB
connections. If you want to use a connection for SQL server, then you

could
make sure that the provider is the one for SQL server and then strip off

the
provider part, and the rest you should be able to pass to the

SqlConnection
constructor.

To use the dialog, you will have to use the IDbPromptInitialize COM
interface with OLE db. The section of the OLE DB Programmer's Reference
titled "Creating Data Source Objects" located at (watch for line wrap):

http://msdn.microsoft.com/library/de...hapter02_2.asp

Should help. You will have to use COM interop, but the interfaces you need to use and how to use them are defined there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Saper(ek)" <sa*****@tlen.pl> wrote in message
news:bn**********@atlantis.news.tpi.pl...
when You create a ne sqlconnection, or any other connection, You can use connection creator to create a connection string. how to do this in
Your own
components?

--
"Zeglarstwo jest koniecznoscia
zycie nia nie jest"

www.saper.infra.pl/

Saper(ek)



Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.