473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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
Jan 12 '06 #1
2 2760
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" <to**@technetcenter.com> wrote in message
news:72*******************@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

Jan 12 '06 #2
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:
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" <to**@technetcenter.com> wrote in message
news:72*******************@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


Jan 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Scott | last post by:
I have a customer that had developed an Access97 application to track their business information. The application grew significantly and they used the Upsizing Wizard to move the tables to SQL...
7
by: Chase Kimball | last post by:
I can play the most intense games devised by the hand of man and my highly overclocked computer does fine. Nothing I can throw at it phases this mechanical marvel, except my MS Access derived...
6
by: Terry Bell | last post by:
We've had a very large A97 app running fine for the last seven years. I've just converted to SQL Server backend, which is being tested, but meanwhile the JET based version, running under terminal...
2
by: Piotr | last post by:
Can I create a Random Access Iterator which start at a certain index and end at a certain index of a container? I go thru this page, but I can't find an example....
3
by: Bruce | last post by:
I am building a WinForms app that uses Web Services access to a server for most of its data input/output, but I also need to persist some of its data to the local disk (basically as a cache of some...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
6
by: InnoCreate | last post by:
Hi everyone. I've recently written a classic asp website which uses an MS Access datasource. I know this is less than an ideal data source as it has limited functionality. I have a search form on...
5
by: muskie | last post by:
I've looked through as many posts about this as possible, but all end with no resolution. I simply need records from a table in random order, and I will be calling this recordset in a SQL...
3
by: cephal0n | last post by:
I distributed my tblRental.mdb in my friends Ms Access runtime environment. It was successful when I configure Tools > Startup. I didn't change anything else in the startup, I just selected the form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.