<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Mark,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You can still use Random access files in VB.NET (i.e. VB2010,VB2008, VB2005) . VB.NET supports traditional random access files, but it doesn't really need them. You can still create files that store structures, and access them by record numbers, as you did with previous versions of Visual Basic using the <b><i>FileOpen</i></b> and <b><i>FileGet</i></b> functions, but for the most part, the functionality of random access files has been replaced by XML and/or databases.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(<a href="http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.filesystem.fileopen.aspx">http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.filesystem.fileopen.aspx</a>) <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(<a href="http://msdn.microsoft.com/en-us/library/56ec4tx7.aspx">http://msdn.microsoft.com/en-us/library/56ec4tx7.aspx</a>)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(<a href="http://msdn.microsoft.com/en-us/library/y3c21t77.aspx">http://msdn.microsoft.com/en-us/library/y3c21t77.aspx</a>)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp; <span style='color:blue'>Public</span> <span style='color:blue'>Sub</span> RandomFileAccess()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:blue'>Dim</span> FileName <span style='color:blue'>As</span> <span style='color:blue'>String</span> = <span style='color:#A31515'>&quot;TESTFILE&quot;</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:blue'>Dim</span> FileNumber <span style='color:blue'>As</span> <span style='color:blue'>Integer</span> = 1<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:blue'>Dim</span> Value <span style='color:blue'>As</span> <span style='color:blue'>Boolean</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:blue'>Dim</span> RecordNumber <span style='color:blue'>As</span> <span style='color:blue'>Long</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:green'>' Count 30 for the string, plus 4 for the integer.</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:green'>'FileOpen(FileNumber, FileName, Mode, Access, Share, RecordLength)</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileOpen(1, FileName, <span style='color:#2B91AF'>OpenMode</span>.Random, , , 34)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:green'>'Gets/reads a record from the file</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:#2B91AF'>FileSystem</span>.FileGet(FileNumber, Value, RecordNumber)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:green'>'Puts/writes a record from the file</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:#2B91AF'>FileSystem</span>.FilePut(FileNumber, Value, RecordNumber)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style='color:green'>' Close before reopening in another mode.</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileClose(1)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'>&nbsp;&nbsp;&nbsp; <span style='color:blue'>End</span> <span style='color:blue'>Sub</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> sofdev-bounces@edulists.com.au [mailto:sofdev-bounces@edulists.com.au] <b>On Behalf Of </b>Mark KELLY<br><b>Sent:</b> Friday, 3 June 2011 1:01 PM<br><b>To:</b> Year 12 Software Development Teachers' Mailing List<br><b>Subject:</b> [Year 12 SofDev] Random access files<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hi all.&nbsp; I used to use random files in VB6, but trying to unearth them in VB2010 Express is a problem... annoyingly, they seem to have been deprecated in favour of database solutions.<br><br>Do other GUI languages out there still support random access files?<br clear=all><br>-- <br>Mark Kelly<br>Manager of ICT, Reporting, IT Learning Area<br>McKinnon Secondary College<br>McKinnon Rd McKinnon 3204, Victoria, Australia<br>Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253<br><a href="mailto:kel@mckinnonsc.vic.edu.au" target="_blank">kel@mckinnonsc.vic.edu.au</a><br>VCE IT Lecture Notes: <a href="http://vceit.com" target="_blank">http://vceit.com</a><br>Moderator: IT Applications Edulist<br><br>Want a good time? Call 0112358. Ask for Mr Fibonacci.<o:p></o:p></p></div></body></html>