How to check Connection type?

M

Mika M

Hi!

I'd like to check somehow is the used connection, which uses MSDE
database, trusted connection or not. Is there any other possibilities to
check this - except searching used ConnectionString of the connection?

I need this because I'm trying to make it possible Backup Database
directly using my application into file, and my application uses
osql-command to do this.

I already succeeded to make osql-command to work after user has selected
file location where to save backup file using "Save As"-dialog, but it
work only with trusted connection. So if connection is not trusted
connection, then my application should ask User ID and Password needed
for osql-command to work - I think.
 
S

Sahil Malik [MVP]

Well, checking the connection string is a quite easy and straightforward way
of doing this - why do you not want to do that?
 
M

Mark Ashton

In 2.0, there is the SqlConnectionStringBuilder class that will help parse
connection strings correctly so that you can correctly determine that
answer.

--
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

Sahil Malik said:
Well, checking the connection string is a quite easy and straightforward
way
of doing this - why do you not want to do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top