|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Random Access Torture!VB.Net 2003
I can't understand why, if I can use FilePut to write a structure to a random access file, I can't use FileGet to read that structure back in again. I get this error when reading: "Object type cannot be converted to target type." There shouldn't be any conversion necessary - it's the same structure! Help, please... Tom Hi,
You did not give much to go with. If the file is also used with vb6 remember that a vb.net integer is a vb6 long, and vb.net short is a vb6 integer. Ken ----------------- Show quoteHide quote "tomb" <t***@technetcenter.com> wrote in message news:72Axf.36342$qw4.23605@bignews5.bellsouth.net... > VB.Net 2003 > I can't understand why, if I can use FilePut to write a structure to a > random access file, I can't use FileGet to read that structure back in > again. I get this error when reading: > "Object type cannot be converted to target type." > > There shouldn't be any conversion necessary - it's the same structure! > > Help, please... > > Tom Ken,
This is only in VB.Net 2003. I write to the file with this structure, no problem. But I can't read the file with the same structure. I get that error message. I trie FilePutObject and FileGetObject, but I can't put it - I get this error message: "'FilePutObject' of structure 'doc_Specs' is not valid. Use 'FilePut' instead." So, if I can't use FilePutObject, but I can't FileGet a file with the structure that FilePut the file, what is a programmer to do? It just doesn't make sense. Tom Ken Tucker [MVP] wrote: Show quoteHide quote >Hi, > > You did not give much to go with. If the file is also used with >vb6 remember that a vb.net integer is a vb6 long, and vb.net short is a vb6 >integer. > >Ken >----------------- >"tomb" <t***@technetcenter.com> wrote in message >news:72Axf.36342$qw4.23605@bignews5.bellsouth.net... > > >>VB.Net 2003 >>I can't understand why, if I can use FilePut to write a structure to a >>random access file, I can't use FileGet to read that structure back in >>again. I get this error when reading: >>"Object type cannot be converted to target type." >> >>There shouldn't be any conversion necessary - it's the same structure! >> >>Help, please... >> >>Tom >> >> > > > >
control arrays
howto make a console app start with window minimized Put standard output into file Spell checker How can you add a custom user control to a datagridview? GDI Question To use ShellExecute or not? Export from VB.NET 2003 to an Excel spreadsheet Pointer in a structure Datagrid Plus Sign Event |
|||||||||||||||||||||||