Problems and confusion with ClickOnce, VB, and SQL Server jobs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

(Pardon me if this is the wrong forum but this touches on too many areas.)

I need to write a bit of VB code to update a table in a SQL Server 2000
database. The code itself is trivial. The deployment apparently is not.
(If there's a better way to approach this problem, let me know.)

It appeared to me that a console app would be the simplest solution. What I
want to do is have something on the server that can be run once a day through
a SQL Server job. I deployed it through clickonce, (Install option). I
recognize that if the deployement were updated, there would be an update
prompt that a SQL job couldn't handle. For the moment I am ignoring this
potential problem. (I'm assuming that the person who updates the program
will run it manually on the server to check for updates.)

The error I am getting when running it through a job is this: SQL Server
Scheduled Job 'EmployeeMirrorApp' (0x936F6C440A37D44DB8AE923DD83899A6) -
Status: Failed - Invoked on: 2007-07-09 13:06:00 - Message: The job failed.
The Job was invoked by Schedule 1977 (Sched 1). The last step to run was
step 1 (Run App).

When I run it from the menu, it works correctly.

I think my biggest question at this point must be: Is this approach even
possible? It looks to me like the app is not being installed in the Program
Files directory as one would expect and I am not sure SQL Server has access
to it. (or even sees it.)

Opinions?
 
Are you saying you install the app on a server and have it run when there is
no user logged on? ClickOnce is deployed on per user basis. The app deployed
by ClickOnce only run when a user logs in and does the "click" ONCE. In your
case, you either make a full installation package and install it for every
user (during installtion, you, as admin, is asked the installed app is for
"every user" or "just me"), or, better yet, create Windows service app to do
the task.
 
My apologies. I forgot about that per-user thing. (But there's no way to
treat SQL Server as a user under ClickOnce?)
 
Back
Top