Sunday, February 19, 2012

How to browse for folder on SQL Server's machine?

Hi!
I know there is xp_dirtree, xp_subdirs, xp_fixeddrives procedures which
allows me to write a folder select dialog. But i have seen such dialog
somewhere in one of installers. Unfortunately I dont remember in what
installer.
I dont want to reinvent a wheel. So my question is: may be there is method
somewhere in SQL Server or in SQL-DMO or in DTS which implements a folder
selection dialog based on these stored procedures?T-SQL, DMO and DTS do not present the user with GUI objects. They provide
information, and your application must present that information is a dailog.
"Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
message news:op.suvw7dy0n8ihmu@.iw2k.helpmicro.local...
> Hi!
> I know there is xp_dirtree, xp_subdirs, xp_fixeddrives procedures which
> allows me to write a folder select dialog. But i have seen such dialog
> somewhere in one of installers. Unfortunately I dont remember in what
> installer.
> I dont want to reinvent a wheel. So my question is: may be there is method
> somewhere in SQL Server or in SQL-DMO or in DTS which implements a folder
> selection dialog based on these stored procedures?|||Ok, thank you for information. I must ask my question another way: Do you
know any library implementing such a dialog?

> T-SQL, DMO and DTS do not present the user with GUI objects. They provide
> information, and your application must present that information is a
> dailog.
> "Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
> message news:op.suvw7dy0n8ihmu@.iw2k.helpmicro.local...
>|||You have several options depending on what application development tool you
are using. This perhaps more a C# or Visual Basic question than SQL Server.
There is the Win32 API call SHBrowseForFolder
http://support.microsoft.com/defaul...kb;en-us;179497
How to write a managed C# wrapper for the API dialog call:
http://support.microsoft.com/defaul...kb;en-us;306285
Here is a Visual Basic sample:
http://www.vbexplorer.com/VBExplore...file_dialog.asp
I also think there is a method of the File System Object called
GetFolderName
http://msdn.microsoft.com/library/d...objectmodel.asp
"Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
message news:op.suv0e6u4n8ihmu@.iw2k.helpmicro.local...
> Ok, thank you for information. I must ask my question another way: Do you
> know any library implementing such a dialog?
>
>|||As I mentioned in my original posting I can implement such dialog using
xp_dirtree, xp_subdirs, xp_fixeddrives procedures. But SQL Server's
Enterprise Manager already has such dialog. For example if you open
"Attach Database" dialog and then press browse [...] button Enterprise
Manager will show you "Browse For Existing File" dialog. And as you can
see all the path information in that dialog is local to SQL Server's
machine. This is what SHBrowseForFolder cannot do for you because
SHBrowseForFolder always shows paths relative to local machine.
My question is: Is there any way to reuse that Enterprise Manager's
"Browse For Existing File" dialog? Or I am obliged to reinvent it?
On Tue, 02 Aug 2005 19:30:46 +0300, JT <someone@.microsoft.com> wrote:

> You have several options depending on what application development tool
> you
> are using. This perhaps more a C# or Visual Basic question than SQL
> Server.
> There is the Win32 API call SHBrowseForFolder
> http://support.microsoft.com/defaul...kb;en-us;179497
> How to write a managed C# wrapper for the API dialog call:
> http://support.microsoft.com/defaul...kb;en-us;306285
> Here is a Visual Basic sample:
> http://www.vbexplorer.com/VBExplore...file_dialog.asp
> I also think there is a method of the File System Object called
> GetFolderName
> http://msdn.microsoft.com/library/d...objectmodel.asp
>
> "Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
> message news:op.suv0e6u4n8ihmu@.iw2k.helpmicro.local...
>

No comments:

Post a Comment