Link to home
Start Free TrialLog in
Avatar of SkyWolf
SkyWolf

asked on

VB and Networking

Can VB handles networking ? eg. Using VB to write a program to display the info from a database thru TCPIP call to a database.
Please state some examples to justify , thanks ~
Avatar of waty
waty
Flag of Belgium image

What do you mean by VB handles networking? Could you explain...

Sure VB can communicate with other computer over a lan, using all the possible protocols (this is handled by Windows, not by VB).

You can access a database on lan....
Avatar of SkyWolf
SkyWolf

ASKER

I mean , Is using VB to implement a console system that requires networking feasible  ?
ASKER CERTIFIED SOLUTION
Avatar of david_levine
david_levine

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SkyWolf

ASKER

1st of all I would like to know what whether I can exe a program within a VB program
2) retrieving details from a log file ( I think it can be done but to make sure)
3) print the details to a report using Crystal Report
4) displaying a red, amber, green icons to indicate the level , like the traffic light thing
5) checking status of another application, status/activity of a port , status/activity of a line(telephony)


1) If in your list #1 is can you create an EXE in VB, yes - but it requires a VB runtime DLL.

2) Yes you can read a flat file. The log file has to be accessible to the machine running VB. You can ftp it to the local machine, or access it via a network drive

3) Yes, you can create reports in Crystal from within VB

4) You can certainly create a status within your application, that based on a value displays a different color light (bitmap or icon).

5) A) I'm not sure what you mean by checking the status of another applciation.

5) B) You can write a ping program in VB to ping a port.

5) C) Status of a line depends on whether you have access to the line and the device the line is connected to.
Avatar of SkyWolf

ASKER

david_levine,
1) I meant can I execute another program within my VB program ( lets say my VB program is already in a EXE mode)
5A) *LOL* I am also not too sure I know what's to be done. This qs relates to qs 1) so i would like to know whether VB program check the status (like when u press Crt-Alt-Del they will show you the process not responding...)
You can launch other programs from within VB... by that I mean if you wanted to launch IE or Word, you just use the RUN command inside of VB specifying the executable you want to launch.

Within VB you can determine if another program is running within Windows. There are standard Windows API calls to see what is currently running. And if VB doesn't have it built-in you can always call the Windows API. If you want, you can even create your own taskman.exe (try running that from Win95).
Avatar of SkyWolf

ASKER

for 5A) can i check a port's status from a remote console ? i think it's workable right ? can  you confirm with me ? I mean running some exe file to check whether the prot is down ..
another qs , I can check whether the server is down or lost connection from VB porgam right  ?
Avatar of SkyWolf

ASKER

Another thing , can i exe DLL written in C++  within the VB application ?? do i need converters or something ?
Avatar of SkyWolf

ASKER

One more thing,I realise I have to handle messaging , is VB capable of handling messaging ? any ideas where to look into for messaging codes ? what sort of information i need to know in order to program my application so that I can use VB to handle messaging , if VB is capable of so ?
Whew... lots of questions...

5A) You should be able to check a ports status but you will have to do your own winsock API calls since that functionality isn't in VB. You might be able to find an example someplace or at least a good starting point.

DLL's: You can use / call into any standard Windows DLL's. The only thing you need to be aware of is that VB won't support a CallBack function.

Messaging: I'm not sure what you mean. Windows itself if all based on messaging and that's how events get triggered. Can you be a little more specific.
Avatar of SkyWolf

ASKER

*LOL* I'll try to be more specific with my limited knowledge
Ok, whats winsock API calls ?
where can I find that example ?
Winsock API is getting down and dirty. Is this something you are going to do for fun or for business? Maybe you want to look at a commercial Winsock product vs the fairly simple control you get in VB or the detailed coding you might have to do if you need to call the winsock API. No offense, but based on some of your questions, I don't think your ready to get into API programming.
Avatar of SkyWolf

ASKER

*LOL* .. sorry to ask qs 1 by 1 but it just occure to me that how do I limit the file size of a log file ? I mean I want the log file to reset, overwrite the previous entry when reaching a certain size .
This question is out of the blue :)

How can you tell how big a file is? I think that's what you are asking...

You need to close the file
Determine the file size (not sure if VB has it built-in or you need to call a Windows API call)
Based on your "limit", you could rename the file to xyz.log.prev and open the new log file.

You could also make a log file that says is the last 200 log records and scroll the oldest one off when you add the new one. That would require determine the number of current log records, if its > 200 (my example) copy 2 thru 200 to a new file, add the new record and make it the old file.

Whew... any more questions?
Avatar of SkyWolf

ASKER

*LOL* you are right man ! I am not ready yet BUT it's definitely NOT for fun ... don't worry, I will make these answering seesions worth while *LOL*
1)so where do you suppose I will find those examples ? any sites you have come across?
2) I understand that by PING-ing, you can only check whether there is a connection to a particular ..... (process?what do you call it) right? so if this whatever is in a 'hanged' state, does it return a connection time out or a successfull PING ?

*sigh* my education sys here is in such a way that you are taught a wide area of things but not in depth ...