|
-
Aug 1st, 2000, 07:56 AM
#1
Thread Starter
Fanatic Member
Very new VB user here.
I would appreciate any ideas or suggestions about the following situation.
We are setting up a SQL Server routine that will run and constantly poll a directory. As soon as something is found in that directory, we need SQL Server to run a VB program and pass it at least one parameter for VB to use in running a process that will update several tables.
What needs to be done on the VB side to be able to accept a parameter passed to it, either from SQL Server or possibly just from the command line ?
I know nothing about the SQL side at this time, but I am guessing it would have a command similar to "run vbprog parameter".
Thanks a lot for any feedback.
-
Aug 1st, 2000, 09:10 AM
#2
Hyperactive Member
I'd have to search for that too, but why not let the VB prog poll the directory and do something when the file is there?
-
Aug 1st, 2000, 11:05 AM
#3
Lively Member
I'd go with same reply as CrazyD.
How many times a day do you need to upload the Data? I have a similar requirement (I think) to what you have, but the data only needs loading to the Database once a day. Rather than have the VB sitting there polling all day - using resources - I use a schedular to start the VB app early morning. The VB app sits there until the data arrives in the relevant folder, processes the stuff and toddles off until the schedular starts it again.
Anakim
It's a small world but I wouldn't like to paint it.
-
Aug 1st, 2000, 11:29 AM
#4
Thread Starter
Fanatic Member
Forgive me if I sound ignorant of what all is going on, but what has been explained to me is this.
We will be receiving requests (all day) via e-mail that will place a value in a field within a table. When that field receives a value (indicating that an e-mail has been received), a trigger will be activated that will call the VB program which will validate the information received in the e-mail against a DB2 table.
I am just wondering if it is possible to pass a value into a VB program from the SQL Server.
Our analysts have been considering running the whole process from a VB app if we cannot find some way to pass the information. I have written applications that will poll directories at different time intervals, so that would not be a problem to set up.
Again, thanks for any ideas/suggestions.
-
Aug 1st, 2000, 12:52 PM
#5
Frenzied Member
As part of your trigger you could write data into a (as yet undefined) table. Your VB program could read that table, do what it needs to do and then delete the item from the table (and, if you really want to be safe, write the record to another table that represents work finished).
-
Aug 1st, 2000, 01:54 PM
#6
Thread Starter
Fanatic Member
Excellent suggestion. I'll run it by the team in the morning and see what they think.
Thanks.
-
Aug 1st, 2000, 02:03 PM
#7
Frenzied Member
Beauty of the solution is that the VB program can run continuously. It just keeps reading the trigger table, only taking action when an entry shows up...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|