I'm not sure how much I can help. Aren't IP cameras just using UDP or TCP? The IP camera should come with some demo application (usually running on a web browser) that will start the camera, allow you to set up the settings, and display the live stream. They should also come with a driver (usually in C or C++, or a DLL/.so) to use it. If not, check the data sheet or programmer's manual or whatever documentation they have on the company website and you should find what commands do what and how to receive the video streaming. So your program will need to connect to the server (IP camera) with just a normal internet connection but to some local IP address and then send/receive packets as specified by the company. There may be some generic tools / libraries for dealing with IP cameras, but I don't know any and when I had to deal with an IP camera, the provided software was good enough for my purposes. Your best bet is to contact consumer support at the company after searching their website thoroughly for the proper manuals.
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 ...