• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 819
  • Last Modified:

Read from a SD card

I'm using V B.net as the front end and SQL server 2000 as the back end in Windows XP. How do I read the raw data from an SD card using VB.net? Please help experts.
0
wongke9622
Asked:
wongke9622
  • 4
  • 3
1 Solution
 
weellioCommented:
an SD card should be no different than reading from any other drive.  you just have to know thedrive letter,.
0
 
wongke9622Author Commented:
Hi wellio, can you give me a sample in vb.net. Thanks a lot.
0
 
wongke9622Author Commented:
To elaborate on my question, I have raw data saved in the SD card in a different file format since even when I access the SD card from using windows, I don't see any thing. I use dd.exe to extract the information saved and convert it into .dat file. Then I use Ultraedit to view the information. The problem is, the data comes out all scrambled in ultraedit. I just want to have my own application wherein I can directly read from this SD card with the data in a well defined manner. Thanks.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
weellioCommented:
what type of data is it?
just like any data it was designed to be opend in a specific format. since it is in an SD card can iassume it is images? is it ascii? ansi? some random binary?

depending on how you need to read the data will determine the method in which you read it using vb.net.

nonetheless
here are some examples
http://www.java2s.com/Code/VB/File-Directory/Readingasequentialaccessfile.htm
http://www.java2s.com/Code/VB/File-Directory/ReadandWriteBinaryfileintstring.htm
http://www.java2s.com/Code/VB/File-Directory/Readfromabinaryfile.htm
0
 
wongke9622Author Commented:
Yes it is random binary.
0
 
weellioCommented:
http://www.startvbdotnet.com/files/default.aspx
this is s simple write and read data.

you have to knwo what is in the file in order to know how to manupulate it.
otherwise how do you know it is working? and how can you compare results?

this is really all you need to read a file "myfile.bin"
you need to know the filename and the length of the file

Dim input As New FileStream("myfile.bin", FileMode.Open)
Dim bytes(CInt(input.Length - 1)) As Byte
input.Read(bytes, 0, CInt(input.Length))


but from what i am reading, you can't see the data when using windows explorer.  
you have to extract it using DD.exe(most likely written in C to better access the bit layers)
ultraedit gives you a garbled mess (which is what you will get from vb.net as well, unless it knows how to interpret the information)


where does the data originally come from?
0
 
wongke9622Author Commented:
The data originally comes from a hand reader device directed to a printer port, but instead of printing, we saved the information to an SD card. And we are just trying to retrieve that raw data using our own application in vb.net. The garbled message is because there are lots of empty sectors in between the actual data after using dd.exe. I don't know how to get rid of them?
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now