Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 19th, 2006, 09:05 PM
Trip
Guest
 
Posts: n/a
Default Store Array to Access w/o Parsing Each Row

Hello all,

Is there anyway to store an array to MS Access 2002 without parsing the
entire array row-by-row. For example, Oracle allows you to store BLOBs
(binary large objects). I would like to be able to say in VB/VBA

With rstName
.AddNew
!fieldName = ArrayName
.Update
.Close
End With

Any ideas?

Thanks!!

Trip

  #2  
Old January 19th, 2006, 09:45 PM
MGFoster
Guest
 
Posts: n/a
Default Re: Store Array to Access w/o Parsing Each Row

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to strict SQL design principles you shouldn't have more than
one item per cell (IOW, each array element should be in a separate
column).

But, if you insist.... Use the Split() function to break out each
element of the array into a comma-delimited string. E.g.:

!fieldName = Split(ArrayName, ",")

The comma in quotes indicates that the comma should be used sas the
element separator.

Make sure the column size can accomodate the resulting string.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQ9AFEoechKqOuFEgEQKmqgCgkPBRdct/EzoRfHE2ie955FJBMDsAn0I+
nNHUgJZsg8voQcQxHLN+HTEB
=scOO
-----END PGP SIGNATURE-----


Trip wrote:[color=blue]
> Hello all,
>
> Is there anyway to store an array to MS Access 2002 without parsing the
> entire array row-by-row. For example, Oracle allows you to store BLOBs
> (binary large objects). I would like to be able to say in VB/VBA
>
> With rstName
> .AddNew
> !fieldName = ArrayName
> .Update
> .Close
> End With
>
> Any ideas?
>[/color]
  #3  
Old January 19th, 2006, 10:15 PM
Stephen Lebans
Guest
 
Posts: n/a
Default Re: Store Array to Access w/o Parsing Each Row

You can use the very same code you posted as long as the field was defined
as a Long Binary field. You are then working with a field defined as a BLOB.
There is code in the Acces help file and on the MS KB for reading and
writing BLOB fields but for small amounts of data that are not across a
Network I would simply use the came code/logic that you posted..

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Trip" <trip@consultant.com> wrote in message
news:1137704182.060582.158210@g43g2000cwa.googlegr oups.com...[color=blue]
> Hello all,
>
> Is there anyway to store an array to MS Access 2002 without parsing the
> entire array row-by-row. For example, Oracle allows you to store BLOBs
> (binary large objects). I would like to be able to say in VB/VBA
>
> With rstName
> .AddNew
> !fieldName = ArrayName
> .Update
> .Close
> End With
>
> Any ideas?
>
> Thanks!!
>
> Trip
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles