>>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.