i didnt know if to open a new thread .. but i'm having another problem .. probably casting will do it, but i'm not sure.
i'm filling a stack with many variable: Strings and int
when i pop, it returns me a value of type Object. so my Questions is: how can i know if that returned value is a string or an int !?
The question you should be asking is why you are putting strings and ints into a single stack? In most cases you should use an appropriate interface type for the collection that effectively represents what you expect to do with those objects. Obviously you are placing them in a collection for some reason - the interface should reflect that reason. If you have to use a lot of branched instanceof logic to process those items, you probably need to re-examine your abstraction of the operation for consistency and cohesion.
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...