Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Want a small VB or other program to login to SQL server
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00396741
Message ID:
00396852
Vues:
9
>>I am trying to run a Crystal Report writer app every night without any user intervention. I was planning to use MS Plus! for the scheduling, but the problem is that it can't handle user input (as far as I know). I get to a point where I have to enter in the password by hand for the SQL server login and that 's the only thing I have to type in. Seagate (crystal's parent company) told me I could easily do this with a VB front end, but not being a SQL programmer do not really know how to go about this.
>>Thanks in advance.
>>
>>
>>BTW, I have never been happy with doing automated tasks in PC Land. Back in the days of Mainframes and minis, we always had some kind of JCL or DCL to front end our applications and a batch processor to handle automated stuff. What is the "new" paradigm for PC's and automated processing?
>
>Show us the code you use to connect and we will surely be able to tell how to give UID and PWD.

One technique would be to log into the server ahead of time by using WNetAddConnection2() or WNetAddConnection3() to map a shared resource on the server, passing the userid and password as arguments to the API call. WNetAddConnection() won't work in this scenario. As long as the SQL Server is set up to use WIndows authentication, the user will have already logged intot he server when the other resource was mapped.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform