Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System DSN

Status
Not open for further replies.

gerald

Programmer
Apr 10, 2000
152
US
Hi there. :)
I am currently in the process of creating some web-based utilities for administering our NT servers.

I need a little guidance if anybody can tell me where to begin to use VBScript to add an ODBC System DSN.

If there are any existing components that will work, or if you can point me to some information that will help me write my own COM components to do the job.

Perhaps there are some command line utilities or registry entries that pertain to System DSNs??

Anything you can give me would be greatly appreciated. I have absolutely no clue where to begin on this one.

Regards,
Gerald
 
Hi

I can show you a way to achieve this from within VB.
It makes some (actually quite a few) API Calls to register the DSN. THe up side with the code is that you can configure existing DSNs as well.

It's all bundled within a nice function that you can copy & paste into a Module ready for use.

If you or anybody is interested, reply to this thread & I'll post the code.

I must warn you though that because of the way this example works, it requires you to have at least a relatively good knowledge of VB & at least know what an API is & how to make an API call to implement more functionality to the example.
But, as is (without you having any knowledge of API calls) you'd be able to create DSNs (System DSNs) if they do not exist on the system with a simple call to the function.

Have fun
caf

 
Caf,

Hi, i'm a beginner in VBscript. can u pls kindly send the 'System DSN' codes to me.
Thanks for ur helps.


from,
vbsong
 
actually, i'm a beginner in using VBScript too.
What are the VBScript codes that i can use to call/search a Database (eg. Microsoft Access, Oracle, etc)?

anybody can help me?
 

Hi, i'm a beginner in VBscript. Could you pleass kindly send the 'System DSN' codes to me.
Thanks for the helps.


Regards
Fred Eloff

feloff@kc.co.za
 
Hi

I've written a faq so you can check it out there

Have fun

(BTW: It takes 1 business day to be validated so if it's not there it'll probably be there soon.)
 
Thanks caf. I have been away so havent been able to check the thread til just now. I have a pretty good understanding of VB, though I am still somewhat in the intermediate level. I do have a good working knowledge of how APIs work. Im an old-school Windows programmer thrust into a high-level programming position. heh. I will see if I can find your FAQ and put it to use.

Thanks again

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top