PC Review


Reply
Thread Tools Rate Thread

How to check Connection type?

 
 
Mika M
Guest
Posts: n/a
 
      11th Aug 2005
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.

--
Thanks in advance!

Mika
 
Reply With Quote
 
 
 
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      11th Aug 2005
Well, checking the connection string is a quite easy and straightforward way
of doing this - why do you not want to do that?

--

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
----------------------------------------------------------------------------
---------------

"Mika M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
> --
> Thanks in advance!
>
> Mika



 
Reply With Quote
 
Mark Ashton
Guest
Posts: n/a
 
      13th Aug 2005
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 [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Well, checking the connection string is a quite easy and straightforward
> way
> of doing this - why do you not want to do that?
>
> --
>
> - Sahil Malik [MVP]
> ADO.NET 2.0 book -
> http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
> ----------------------------------------------------------------------------
> ---------------
>
> "Mika M" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>>
>> --
>> Thanks in advance!
>>
>> Mika

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check spelling as you type check box not sticking Nathan Microsoft Word Document Management 0 29th Nov 2007 06:57 PM
How to (really) check if type A is assignable from type B Rickard Microsoft C# .NET 2 24th Aug 2006 05:23 PM
How to check base class type of 'open' generic class? (inheritance check) AdawayNoSpam Microsoft VB .NET 2 22nd Aug 2006 08:36 AM
how to check wheather active sync connection or any connection is there(gprs,wlan) raghu Microsoft Dot NET Compact Framework 1 23rd Sep 2005 05:59 PM
How do I check the type of the value represented in a system.type? Don Microsoft ASP .NET 5 13th Sep 2005 04:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:48 PM.