Solved

Polling in VB.NET

Posted on 2006-10-20
14
585 Views
Last Modified: 2008-03-03
Experts,

I am working on a POS system for my company and they want to use or create a new polling system from what they are using now, it is currently being done in DOS.  I need to find a strong windows-based communications package that supports user scripting and VB.NET that can perform polling through a modem.  Does anyone know of any free 3rd party .NET controls or package that can help me either create a new system, or provide me with a new system.  If I create the system it will be in VB.NET using VS2005.  I've seen a lot of companies offer to sell their polling systems, however my company doesn't want to go that route.  They want something either customized or something very general that can be customized and most importantly free.

0
Comment
Question by:jtaylor8181
  • 8
  • 6
14 Comments
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17774004
post more info please so I could help you are generalizing the subject to much. :)
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17774658
Basically the the main office (server) will receive reports from their stores (clients) through the modem at the end of the night.  The main office can also send updates and reports to there stores as well.  Once they have received their reports, or possibly at anytime during the day (that is a separate issue).  The actual polling is just sending the server the client's reports.  What I need is a .net control, dll, or package that supports polling in this type of situation.  The main concern is being able to communicate to all these stores and not have any issues done the line because the server is busy.  Is that enough info, or is more needed?
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775050
does the server dial the clients through dialup connection or vise-versa , or is the connection through ADSL i.e. Always connected ?

what kind of data is sent are they files or a connection to the main server's database and execution of some queries ?

are the stores networked together or does the server contacts eah one separately?
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775143
Clients dialup to the server, send .ini files, csv files, etc., and are not networked together.
0
 
LVL 7

Accepted Solution

by:
Mohamed Zedan earned 500 total points
ID: 17775170
ok ...

you could setup vpn connections using the dialup modem on each client and setup a vpn connection on the server to recieve the client calls

once connected through the vpn connection both machines would be on one network then you could copy files programatically or manualy as you do on a regular networked pc ... using shared folders ...

if you need more details just ask :)
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775772
Sounds great however I have never used a vpn connection.  Do you know of any good tutorials on this topic.
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775825
I have found a couple of things so far but it seems like the internet is needed to do this, however none of our stores have internet connection.  is using the vpn still possible in this scenario?
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775843
yes through the dialup connection

you need to do the following :
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775892
on the server

open network connections in the my network places window
click create new connection
Select setup an advanced connection
click next
Select Accept incoming connections
click next
select the modem that you will accept calls on
click next
select allow Virtual private Connections
click next
Select the users that you will allow to connect through that connections (these are local users you can add or delete users as you wish)
click next
highlight Internet protocol (TCP/IP) and press Properties
Select Specify TCP/IP Addresses
AND enter 192.168.0.2 in from
               192.168.0.100 in to
then hit ok
click next
then click finish

0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17775913
on the clients
open network connection and click create new connection
select connect to the network at my workplace
click next
select dialup connection
click next
Name the connection
click next
enter the phone number of the server
click next
click finish

when you connect using this connection supply the user name and password that you selected at the server
 hope this helps you ....
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17775957
Sorry to keep bugging you about this but how would I access this network to send files from the client to the server.
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17776018
do you mean programmatically or manually while they are both basically the same...

you first need to share a folder by right clicking on it and selecting properties then sharing tab
enable file sharing and select allow network users to change the content of the folder

then ok

all you have to do then is open start then run then enter the following
\\the ip address of the server \the shared folder name
i.e.
\\192.168.0.5\mainshare
this should open the remote folder then you could access it normally

or you could type the server computer name instead of the ip address they are both the same
0
 
LVL 4

Author Comment

by:jtaylor8181
ID: 17776143
I know this is asking for a bit much but can you give me another example programmatically to do this.  I you could I would appreciate it and thanks for all of your help with this.  I really do appreciate it.
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 17777905
This function will copy the a file from src to dest

    Public Function CopyFile(ByVal Src As String, ByVal Dest As String) As Boolean
        Try
            Dim stSrc As New IO.FileStream(Src, IO.FileMode.Open)
            Dim Bytes(stSrc.Length - 1) As Byte
            stSrc.Read(Bytes, 0, stSrc.Length)
            Dim stDest As New IO.FileStream(Dest, IO.FileMode.Create)
            stDest.Write(Bytes, 0, Bytes.Length)
            stSrc.Close()
            stDest.Close()
            Return True
        Catch ex As Exception
            Return False
        End Try
    End Function

all you have to do is call the function providing the src file path and the destination file path
i.e.
the file is located at C:\test.ini
the serverPc Shared folder is MainShare
so you call the function like this

CopyFile("C:\Test.ini","\\ServerPC\MainShare\Test.ini")
or
CopyFile("C:\Test.ini","\\192.168.0.2\MainShare\Test.ini")

Glad to be of service :)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question