AdamVerellen
IS-IT--Management
Anyone use the netcomm control from If so, could someone help me a little.
I'm reading data from a SMDR, phone system gadget that sends a data string each time a call is placed and ended.
I got my form to display the text from the unit ok, and ouput that info to a text file kinda sorta ok, except that after the first line that is writen the info isn't kept on one line.
Dim Buffer As String
AxNETComm1.CommPort = 2
AxNETComm1.PortOpen = True
AxNETComm1.RThreshold = 1
Buffer = AxNETComm1.InputData
System.Diagnostics.Debug.WriteLine(Buffer)
FileOpen(1, "c:\TextFile1.txt", OpenMode.Append,_ OpenAccess.Write)
WriteLine(1, Buffer)
FileClose(1)
TextBox1.SelectedText = Buffer
I think I'm almost there, maybe missing a loop?
the text file looks like this
-----this first line comes out ok (appears as one line for me)
"N 006 00 DN3620 T023000 01/03 07:48 00:00:04 6417646655
"
------after that the line is broken up kinda like this (in this example there are suppose to be 2 lines)
"N 007 00"
" DN3620 "
" T023000"
" "
" 01/"
"03 07:48"
" 00:00:0"
"2 565666"
"56565565"
"6
"
"N 008 00"
" DN3620 "
" T023000"
" "
" 01/"
"03 07:48"
" 00:00:0"
"2 656666"
"566565
"
Any help would be greatly appreciated
Thanks
Adam
I'm reading data from a SMDR, phone system gadget that sends a data string each time a call is placed and ended.
I got my form to display the text from the unit ok, and ouput that info to a text file kinda sorta ok, except that after the first line that is writen the info isn't kept on one line.
Dim Buffer As String
AxNETComm1.CommPort = 2
AxNETComm1.PortOpen = True
AxNETComm1.RThreshold = 1
Buffer = AxNETComm1.InputData
System.Diagnostics.Debug.WriteLine(Buffer)
FileOpen(1, "c:\TextFile1.txt", OpenMode.Append,_ OpenAccess.Write)
WriteLine(1, Buffer)
FileClose(1)
TextBox1.SelectedText = Buffer
I think I'm almost there, maybe missing a loop?
the text file looks like this
-----this first line comes out ok (appears as one line for me)
"N 006 00 DN3620 T023000 01/03 07:48 00:00:04 6417646655
"
------after that the line is broken up kinda like this (in this example there are suppose to be 2 lines)
"N 007 00"
" DN3620 "
" T023000"
" "
" 01/"
"03 07:48"
" 00:00:0"
"2 565666"
"56565565"
"6
"
"N 008 00"
" DN3620 "
" T023000"
" "
" 01/"
"03 07:48"
" 00:00:0"
"2 656666"
"566565
"
Any help would be greatly appreciated
Thanks
Adam