UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Creating / Distributing DSN To User At Runtime, Any Version    
 
   
ipisors
post Sep 10 2013, 01:23 PM
Post#1


Banned
Posts: 9,239
Joined: 21-June 07



This is not a fancy demonstration where you press buttons and see results. Because I think if I posted that, you would actually have to spend time DE-constructing that into the format that you really want it for use in your database. So I think what I'm posting here is the easiest format to take it and put it in your own database.
It's fairly simple:
1) maintain a table called TBL_DSN, which tracks the Username, Computer name, and name(s) of your DSNs.
2) Code in the Load event of the form (make this your startup form of course), which checks to see if any users need DSN for their machine.
3) If so, shells out VBS files (requires NO user interaction and take about 1 second each to run) which create the DSN.
Of course, you'll need to change things to suit your specs - like names of DSNs, servers, etc. I've provided one sample VBS file that creates a DSN on a typical SQL Server setup using the Trusted_Connection=Yes parameter (i.e., Use Windows authentication, not SQL server login).
I hope this helps someone who may not have been able to make their connections DSN-less, and deploys databases to many users with many DSNs, and is looking for a self-containing, automated way to have those database do some of the "prep work" on the user's computer.
Comments or PMs to critique, improve, etc., all welcome. Thanks
Attached File(s)
Attached File  Distribute_DSN_Dynamically.zip ( 23.57K )Number of downloads: 137
 
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th December 2017 - 03:15 AM