Read 6 Bytes Number?
Feb 25, 2011I have an old fashion Database with several files.I need to import to a new Sql Server dababase the data.There are tables with 6 Bytes numbers fields and we have no Number data type with that length.
View 15 RepliesI have an old fashion Database with several files.I need to import to a new Sql Server dababase the data.There are tables with 6 Bytes numbers fields and we have no Number data type with that length.
View 15 RepliesWhat exactly does this line do?
i = stream.Read(bytes, 0, bytes.Length)
Does it read the entire message string sent by the client? I have a line to write to the stream later in the code and that does not seem to be sending anything back to the client, although the code around is excuting.
i = stream.Read(bytes, 0, bytes.Length)
While (i <> 0)
Try
' Translate data bytes to a ASCII string.
[code].....
I created a text file contains 4 bytes of data
AABBCCDD
I just want to read the first 2 bytes (AABB) to execute it with my program.
Then I'll need to read the last 2 bytes (CCDD) for another computer routines
In web service I have function that return bytes array. Now, I call it from VbScript and I need to catch result of this function. How I can catch result of this function in value that is gone be like a value that function return (bytes array)?
View 1 RepliesI want to read 15 bytes of data starting at byte 40 and ending at byte 55. I then want the value of the 15 bytes of data to print to textbox5. I know this should be a simple task but I'm having a lot of trouble figuring this out.
View 10 RepliesIm currently making a program and I was really thinking about adding a simple hex editor into it (nothing really fancy). I know how to read/write/view bytes already but im stuck on how i will make the interface and stuff. Ive been searching google for hours and i cant find anything.
View 12 RepliesI have an old fashion Database with several random access files and I need to import the data to a new Sql Server dababase the data. There are tables with 6 Bytes floating numbers fields and we have no Number data type with that length in VB. I tried and tried and... and can't find. I found this code in the ERP folder, is AlphaBasic. It use an envoirement namend A-shell from Microsabio .
[Code]...
I have seen countless examples of reading standard output from command line applications which print text to the screen and one can read that back into the application as a string. I want to read the binary data back that is written to standard output from something such as image magick's convert program. What is coming back is an image, not a text result or error code. Is this possible? I have been looking for ages but found nothing that makes sense.
View 2 RepliesI need to do some operations that require converting array of bytes to string and the other way. After struggling with it for a few hours I found out the core of my problems. Look at this piece of [code]...
View 5 RepliesI have a tcpclient connection setup capturing a continuous http stream. For some reason after the first few bytes are read, the stream does not get any data for a long time. Is there a problem with my code?
Dim tclient As TcpClient = New TcpClient(url, "80")
nstream = tclient.GetStream()
If nstream.CanRead Then[code].....
Why does this programmer use a binary reader to read bytes, why not the client.getstream.read or streamreader?
Case RequestTags.Connect
'sent from server to client informing client that a successful
'connection negotiation has been made and the connection now exists.
[code]....
I am trying to write and read bytes from usb device.I have an array dout(8) of boolean say f,t,t,f,t,t,f,t representing switch states.I need to convert that to a variable DataOut as byte. 01101101 Later I read the usb device.This gives me a variable Data as byte 10110100 I need to convert that to an array DIn(10) of boolean t,f,t,t,f,t,f,f All my code attempts have failed.
View 2 RepliesThe question is quite simple for all of you . I have a binary file . A description for this file says that
[Code]...
I have hex strings that I would like to write a regular expression for. Here are some example strings.
[Code]...
I have successfully gotten the filestream function to read a text file and return bytes. I want it to return letters, not bytes, using random access.
View 4 Repliesi tried to get the string from binary file by using this code..
[Code]...
I am using sockets and such for a while now, and want to go an step further in this. Now for example lets say an client would send [lenghtofstringinbytes]string[somethingelseinbytes]another thing.
How can I send/read/parse it?
Now I am doing this:
Private Sub onDataArrival(ByVal ar As IAsyncResult)
Try
Dim obj_SocketState As StateObject = CType(ar.AsyncState, StateObject)
Dim obj_Socket As Socket = obj_SocketState.WorkSocket
Dim sck_Data As String
[Code] .....
So using Getstring for it, but thats not the way for this as you get nothing else but an empty string back. So I have to parse it without converting it to an string.
I have a timer control that sends data to a hardware every 3 seconds. I sent 6 bytes of data. In return I am expecting 8 bytes of data in DataReceived event. First time I send 6 bytes of date, in DataReceived event, I get the expected 8 bytes. Then in next 3 seconds, again the expected 8 bytes of data is received. But after that I find that DataReceived is fired 2 times: first time I get 6 bytes and then I get 2 bytes. After that I again get 8 bytes as expected. So in short, 2 times I get 8 bytes as expected and 6 bytes and 2 bytes and again 8 bytes. This pattern is repeating continuously. Why? Is there any reason why I cannot get all 8 bytes everytime? Note that the code is in vb.net 2008
Code in button btn_Start ()
'Set serial port parameters
x.PortName = "COM1"
[Code].....
I'm working on a project involving reading RFID tags, I've written the code and it reads the tags ok by using the recieved data handler and displaying the result in a listbox, the only problem is that the data displayed has a couple of unreadable characters at the start (I'm using ReadLine() command.)If I read the buffer byte by byte the data is all readable.How can I read and display the whole 16 Bytes in one go??
View 3 RepliesI'm trying to read bytes with 1200 interval for 100 times, but I can't get it working. This is my
Try
Dim fr As FileStream = File.OpenRead(OpenFileDialog1.FileName)
Dim data(fr.Length) As Byte
[Code]....
I need to read from offset 4896, then from 6096, then from 7296 for 100 times and for each interval add to the listbox.
I want it to do is that you input a string, then you select an algorithm (Theres only going to be one RijnDael) then you input a key, then the Initialization Vector comes from "txtIV.text" then you select the key bytes and the block bytes from the numeric up/down, then you either encrypt or decrypt.
View 1 RepliesOk i am having some issues designing a base-class to handle generics.Caveat is i need to restrict the type put in as a Numeric type, specifically Int16, Int32, or Int64 (Short or Long).I know you can do Of T as {Structure} but i dont want to select the key bytes and the block bytes from the numeric up/down.
View 2 RepliesI keep getting a ProtocolViolationException "Bytes to be written to the stream exceed the Content-Length bytes size specified." on the following code.I've tried setting Content-Length numerous ways with no success.
Dim url = "https://domain.com"
Dim req As WebRequest = WebRequest.Create(url)
req.Method = "POST"
req.ContentType = "application/xml"
[Code]...
So, I looked at the example in the codebank, it doesnt quite work, plus, implementing it into a otherwise finished project, seems unlikely.
Heres my question though,
using:
Dim instance As New System.Net.WebClient and then using... instance.downloadfile(fileurl, wheretosave)
Is there a way to get the number of bytes already downloaded using "instance"?
how to read bytes from a file... but is it possible to read each individual bit, one at a time?
View 1 RepliesProbably missing something silly here, Her eis what my display looks like Sending image...(401303) I would prefer it displays as Sending image...(391 kb)
[Code]...
I'm working with XML for the first time and I'm not able to read the number of records from an existing files. As of now I have my records this way:
-<DataNodes>
-<Data>
<numOne>25</numOne>
[Code].....
I have a textbox which is used to enter a number, in the code i need this to be divded by a variable value. I am having trouble converting the textbox text to a numeric value, so the code works fully.
View 2 RepliesI am reading an XML file and there is some data within the file that I need to do some math functions on and comparisons with.How can I convert some of the read data into a number?Can it be done before I read it meaing can I specify that what's between certain tags is a number?
View 1 RepliesIs it possible to read the serial number of a USB drive using VB.
View 3 Replies