Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default transferring data from access to excel

I'm using office 97 and am tryin to get some data from
access to excel. With the code I've written in excel all
that is displayed in the label is the default caption.
How can I display what is in varVariable? Thanks for any
help.

This is my code:

Option Explicit

Sub Data()
lblDat.Caption = varVariable()
End Sub

Function varVariable() As Variant

Dim dbsNozztst As Database
Dim rstLngBinDat As Recordset
Const conChunksize As Long = 32768

'open database "db1.mdb" and recordset "dbt_Pruefbericht"
Set dbsNozztst = OpenDatabase("C:\db1.mdb")
Set rstLngBinDat = dbsNozztst.OpenRecordset
("dbt_Pruefbericht")

'use GetChunk method to assign long binary data to a
variable
varVariable = rstLngBinDat!dbf_MessDaten.GetChunk(0,
conChunksize)

'close database and recordsets
dbsNozztst.Close

End Function
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default transferring data from access to excel

"dave" wrote in message
...

varVariable = rstLngBinDat!dbf_MessDaten.GetChunk(0,
conChunksize)


Should be:

Set varVariable = rstLngBinDat!dbf_MessDaten.GetChunk(0, conChunksize)

P


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default transferring data from access to excel

Thanks for all your help. What I'm trying to do is move
some data stored as an OLE object from access to excel in
the hope that I'll be able to view it as numerical values
which is what I think it is. The data comes directly from
a machine which measures the height of water in 48
separate glasses. At the moment all I see is "long binary
data" in the field dbf_messdaten.

Dave

-----Original Message-----
http://support.microsoft.com/default.aspx?scid=kb;EN-

US;194975
HOWTO: Read and Write BLOBs Using GetChunk and

AppendChunk

--
Regards,
Tom Ogilvy


Tom Ogilvy wrote in message
...
GetChunk is for working with BLOBs.

I suspect he is trying to put a picture in the label.

--
Regards,
Tom Ogilvy

merjet wrote in message
news:BUK4b.246927$Oz4.65734@rwcrnsc54...
It's not clear what you are trying to do he
varVariable = rstLngBinDat!dbf_MessDaten.GetChunk

(0, conChunksize)

Is dbf_MessDaten the name of a field? If so, then

dropping ".GetChunk .
.."
should assign to varVariable the value of that field

for the first
record
in
the
table. I can't fathom what ".GetChunk . ." could be

or your intent using
it.

HTH,
Merjet






.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default transferring data from access to excel


"dave" wrote in message
...
Thanks for all your help. What I'm trying to do is move
some data stored as an OLE object from access to excel in
the hope that I'll be able to view it as numerical values
which is what I think it is. The data comes directly from
a machine which measures the height of water in 48
separate glasses. At the moment all I see is "long binary
data" in the field dbf_messdaten.

Dave


Long binary data is unlikely to be simple numeric values.
Typically this type is used to store binary files such
as images.

You really need to know the data format before you
can make a sensible use of it.

Keith


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default transferring data from access to excel

I thought that might be the case. It may be that I can
decipher the binary numbers when I see them which is why
I'm still trying.

Dave

-----Original Message-----

"dave" wrote in message
...
Thanks for all your help. What I'm trying to do is move
some data stored as an OLE object from access to excel

in
the hope that I'll be able to view it as numerical

values
which is what I think it is. The data comes directly

from
a machine which measures the height of water in 48
separate glasses. At the moment all I see is "long

binary
data" in the field dbf_messdaten.

Dave


Long binary data is unlikely to be simple numeric values.
Typically this type is used to store binary files such
as images.

You really need to know the data format before you
can make a sensible use of it.

Keith


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default transferring data from access to excel

There is no documenation on what the machine is doing and what it might be
putting in the field? (and how you might read that information)

--
Regards,
Tom Ogilvy

"dave" wrote in message
...
I thought that might be the case. It may be that I can
decipher the binary numbers when I see them which is why
I'm still trying.

Dave

-----Original Message-----

"dave" wrote in message
...
Thanks for all your help. What I'm trying to do is move
some data stored as an OLE object from access to excel

in
the hope that I'll be able to view it as numerical

values
which is what I think it is. The data comes directly

from
a machine which measures the height of water in 48
separate glasses. At the moment all I see is "long

binary
data" in the field dbf_messdaten.

Dave


Long binary data is unlikely to be simple numeric values.
Typically this type is used to store binary files such
as images.

You really need to know the data format before you
can make a sensible use of it.

Keith


.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default transferring data from access to excel

I've written some code and used the hex editor. All I get
is a few random numbers and symbols on the first few
lines then loads and loads of zeros. Is this what I
should expect or have I done something wrong? Here is the
procedure I've written.

Option Compare Database
Option Explicit
Const conChunksize As Long = 32768

Sub SaveDatToFile()

Dim FileNum As Integer
Dim dbsNozztst As Database
Dim rstLngBinDat As Recordset
Dim FileData As Variant

'Open "db1.mdb" database and "dbt_Pruefbericht" recordset
Set dbsNozztst = OpenDatabase("C:\db1.mdb")
Set rstLngBinDat = dbsNozztst.OpenRecordset
("dbt_Pruefbericht")

'Open "MeasuredData" file to store data
FileNum = FreeFile()
Open "C:\Documents and Settings\brad\My
Documents\MeasuredData.doc" For Binary As FileNum

'Assign data to FileData variable
FileData = rstLngBinDat!dbf_MessDaten.GetChunk(0,
conChunksize)

'Write FileData variable to MeasuredData file
Put FileNum, , FileData

'Close MeasuredData
Close FileNum

End Sub


-----Original Message-----

"dave" wrote in message
...
I thought that might be the case. It may be that I can
decipher the binary numbers when I see them which is

why
I'm still trying.

Dave


Instead of trying to write the data into Excel cells

save it as a file
and then look at the file with a hex editor or

disassembler

Use the Open Statement to create the file and the
Put statement to write to it

Keith


.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default transferring data from access to excel

I wish. I've spent the last 6 weeks trying to get such
information. Problem is was built by an Austrian company
6 yrs ago and unfortunately the Austrian guys are not
very forthcoming with information.

-----Original Message-----
There is no documenation on what the machine is doing

and what it might be
putting in the field? (and how you might read that

information)

--
Regards,
Tom Ogilvy

"dave" wrote in message
...
I thought that might be the case. It may be that I can
decipher the binary numbers when I see them which is

why
I'm still trying.

Dave

-----Original Message-----

"dave" wrote in message
...
Thanks for all your help. What I'm trying to do is

move
some data stored as an OLE object from access to

excel
in
the hope that I'll be able to view it as numerical

values
which is what I think it is. The data comes directly

from
a machine which measures the height of water in 48
separate glasses. At the moment all I see is "long

binary
data" in the field dbf_messdaten.

Dave


Long binary data is unlikely to be simple numeric

values.
Typically this type is used to store binary files such
as images.

You really need to know the data format before you
can make a sensible use of it.

Keith


.



.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default transferring data from access to excel


"dave" wrote in message
...
I've written some code and used the hex editor. All I get
is a few random numbers and symbols on the first few
lines then loads and loads of zeros. Is this what I
should expect or have I done something wrong? Here is the
procedure I've written.


It sounds like the zeroes are padding to make up the
required dataset length, the odds are the developers
used their own algorithms to store the data.

You need either solid data about the format or
some reference output to compare the dataset
with.

Keith


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transferring data to excel spreadsheet 2003 Maurice Excel Discussion (Misc queries) 1 March 10th 07 04:15 AM
transferring data from quattro pro to excel from cd-rw 1lkywmn Excel Discussion (Misc queries) 0 December 5th 06 08:17 PM
Transferring Data From Access philhert Excel Discussion (Misc queries) 2 July 28th 06 02:49 PM
Transferring data from MS Access to MS Excel Joe Excel Discussion (Misc queries) 2 April 5th 06 06:24 PM
Transferring Excel Data to Word Document maacmaac Excel Discussion (Misc queries) 0 October 6th 05 05:23 PM


All times are GMT +1. The time now is 11:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"