Connecting Tech Pros Worldwide Help | Site Map

Console Program

Newbie
 
Join Date: Oct 2008
Posts: 5
#1: Feb 3 '09
I need to create a program that can be executed in DOS that will update a Access Database. It will be kicked off by a remote application after it downloads a file. I have tried to create a VB Console application but it won't run from the Console. As you can tell I am extremely new to VB. My only reference has been “VB Now” that comes with VB2005. Thanks
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#2: Feb 3 '09

re: Console Program


What do you mean it won't run from the console? What does it say?
Newbie
 
Join Date: Oct 2008
Posts: 5
#3: Feb 5 '09

re: Console Program


Plater, Thanks for replying. Console is the term VB2008 uses for a program that runs in DOS mode. Which is the reason it took so long to reply? My DOS sucks since I haven’t used it since 1995. I was trying to send the error displayed in DOS to a file so I could attach it. No luck there but I tried.

The (abbr) error is:
Unhanded exception: Systen.oi.fileNotFoundException could not load file or assembly ‘System.DatasetExtensions, Version 3.5.0.0 …. The system could not find the File ‘Systen.Data.DataExtensions’

Here is my actual problem. A remote computer needs execute the command to update the database after it successfully downloads a file. I need a program that will run on a server without windows running, without Access running. It will update a Access Database. Sounds crazy but that what I need to do.

VB2008 advertised a console program ability. I thought this was possible and made some promises to my superior’s base on the idea I could do this. Now I have to deliver somthing. For now we are doing it manually. Running the program on a machine in MS Windows that has Access installed.

Any ideas.
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#4: Feb 5 '09

re: Console Program


All the visual studios had a console program project type. (2003/2005/2008 do at least).
I think you rather confused on your terminology. A console would be any text-based interface. DOS was an operating system that used a console interface, through the "shell" command.com
The "console" project type just means the interaction is done through a text based system, instead of GUI windows (note: you can in fact use gui windows in a console application)

That error message looks like its telling you that you are running on a computer that doesn't have .NET3.5, nothing to do with inability of console programs.
Even though it's a "console" program, it still needs the .NET libraries, which means it need to be running an OS that supports the .NET libraries. It will run in the windows console (which is handled by the "shell" cmd.exe)
Newbie
 
Join Date: Oct 2008
Posts: 5
#5: Feb 5 '09

re: Console Program


Not sure what you are saying. Your right about me being confused. It dosent want to run standalone. It will run on a computer that has Windows XP and Access. But not on a computer that just has XP professional. The Server OS is Windos Server 2003.
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#6: Feb 5 '09

re: Console Program


Windows server 2003 will support .NET3.5 I believe, but you will need to install it.
If you are using Access components, you will need the office runtimes, either have office installed on the system, or get the distributables and have them deployed along with your application.
Reply