Click here to Skip to main content
15,668,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sir how will you open the DSN dialog box programmatically...? I did forget but believe me I opened DSN dialog box through VB6. I think the header file used in vb6 is scripting.object or something scripting

What I have tried:

Here in C#2022 the name of the namespace....i don't know...please tell me. I think it is FileSystemObject in VB6
Updated 9-Apr-22 23:02pm
Dave Kreskowiak 9-Apr-22 0:33am    
Why would you want to? All it does is build a simple connection string and save it to a text file (*.DSN). You can write that yourself or prompt the user for the things to fill in yourself, like server name, database name, username, and password.
Member 12712527 9-Apr-22 0:45am    
Sure sir that's a way ....but I want to state that here in vb6 was the Filesystem Object/ scripting.object header file through which the function of Windows is visible and you call that specific f open teh DSN dialogunction of windows through vb6. So in the same way is there a function of windows which can be called from C# to open the DSN Dialog. ?
There are also other functions of windows which are visible to other softwares for e.g. frontend softwares like C# to call these functions to open and work with other softwares.
Member 12712527 9-Apr-22 0:50am    
I'm not giving an idea to RE-invent the wheel but have that much of calliber to work with other softwares through your program written in C# [The Language]
Member 12712527 9-Apr-22 0:53am    
Sir OLE may have the idea to use this technique
PIEBALDconsult 9-Apr-22 1:41am    
Avoid DSNs; only use DSN-less connections.

1 solution

I have no idea why do you want to show "ODBC Data Source Administrator" dialog box (where you can create new DSN) from c# code, but here is an idea:

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900