Click to See Complete Forum and Search --> : Exception handling, winsock programming


December 29th, 1999, 01:47 AM
I will appreciate if anyone could advise me on the following questions on VB.

1. How do you catch an exception in VB?
2. How do I manipulate individual columns and rows dynamically using
MSFlexicontrol?
3. Can I send an object such as a recordset instead of a string using winsock
control?

ufo
December 29th, 1999, 04:01 AM
1. VB exception handling

Dim objErr as object

on error goto ErrHandler ' go there if error occured

objErr.error ' simulate error

ErrHandler:
msgbox "error"




2. Try to use AddItem

3. No, You need to understand that you need to marshall your recordset before you want to send it somewhere but in Winsock is not way how to do it. Best way is to use ADO/RDO where is already implemented sophisticated logic around remote data access.


[ufo]

jeanne
December 29th, 1999, 09:51 PM
Thanx, for ur help.
But I'm a bit curious with regards to winsock programming.
U mean I need to pack the records into a continuous stream of bytes and send back to the client? Is there no other way to send back a data object? Then, how come we can telnet a file from a remote site or download an application from the web?

ufo
January 3rd, 2000, 10:08 AM
There are two different things. What is data object ? If recordset you will send it like stream of bytes but if no you will need to know that your object is stateful or staless and many more information. Usually you can't marshall your own data objects with standard marshalling procedure and you need to write your own marshaling procedure which is really hardcore.
Download, telnet are absolutly different because there is only byte stream without active information but object can alive or using other objects, resources and so on.



[ufo]