Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
B. Chernick - 09 Jul 2007 19:00 GMT
(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?
Norman Yuan - 09 Jul 2007 19:09 GMT
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.

> (Pardon me if this is the wrong forum but this touches on too many areas.)
>
[quoted text clipped - 29 lines]
>
> Opinions?
B. Chernick - 09 Jul 2007 19:56 GMT
My apologies. I forgot about that per-user thing.  (But there's no way to
treat SQL Server as a user under ClickOnce?)

> 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
[quoted text clipped - 37 lines]
> >
> > Opinions?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.