Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > VB Classic

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 02-09-2002, 02:15 PM
PN
Guest
 
Posts: n/a
Store huge array into Access database


I'm trying to store a huge array (600K+ elements) into Access database. Does
anyone know how? I tried to assigned each array element into each
field but Access 2000 had a limit of 255 fields. I saved to a binary file
but the program crashed with overflow error when it reached 8192th array
element (element type is Single so 8192th is 8192 * 4 = 32,768 bytes which
is the max. limit of record length). Any help would be appreciated.

Reply With Quote
  #2  
Old 02-10-2002, 11:32 AM
Douglas J. Steele
Guest
 
Posts: n/a
Re: Store huge array into Access database

Create a table with a Long Integer field (call it MyIndex) and another field
of the same type as the array (call it MyValue).

Store each array element as a separate row: the element number as the Long
Integer field, and its value as the other field.

For lngLoop = LBound(MyArray) to UBound(MyArray)
rsMyRecordset.AddNew
rsMyRecordset!MyIndex = lngLoop
rsMyRecordset!MyValue = MyArray(lngLoop)
rsMyRecordset.Update
Next lngLoop

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele


"PN" <pn66@yahoo.com> wrote in message news:3c65672d$1@10.1.10.29...
>
> I'm trying to store a huge array (600K+ elements) into Access database.

Does
> anyone know how? I tried to assigned each array element into each
> field but Access 2000 had a limit of 255 fields. I saved to a binary file
> but the program crashed with overflow error when it reached 8192th array
> element (element type is Single so 8192th is 8192 * 4 = 32,768 bytes which
> is the max. limit of record length). Any help would be appreciated.
>



Reply With Quote
  #3  
Old 02-10-2002, 03:48 PM
PN
Guest
 
Posts: n/a
Re: Store huge array into Access database

Thanks Doug.
By the way, do you know how many records can an Access2K hold? If I have 1
million records, should I consider other databases such as Oracle or MSSQL
?

"Douglas J. Steele" <djsteele@canada.com> wrote in message
news:3c668e35$1@10.1.10.29...
> Create a table with a Long Integer field (call it MyIndex) and another

field
> of the same type as the array (call it MyValue).
>
> Store each array element as a separate row: the element number as the Long
> Integer field, and its value as the other field.
>
> For lngLoop = LBound(MyArray) to UBound(MyArray)
> rsMyRecordset.AddNew
> rsMyRecordset!MyIndex = lngLoop
> rsMyRecordset!MyValue = MyArray(lngLoop)
> rsMyRecordset.Update
> Next lngLoop
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
>
>
> "PN" <pn66@yahoo.com> wrote in message news:3c65672d$1@10.1.10.29...
> >
> > I'm trying to store a huge array (600K+ elements) into Access database.

> Does
> > anyone know how? I tried to assigned each array element into each
> > field but Access 2000 had a limit of 255 fields. I saved to a binary

file
> > but the program crashed with overflow error when it reached 8192th array
> > element (element type is Single so 8192th is 8192 * 4 = 32,768 bytes

which
> > is the max. limit of record length). Any help would be appreciated.
> >

>
>



Reply With Quote
  #4  
Old 02-10-2002, 09:37 PM
Douglas J. Steele
Guest
 
Posts: n/a
Re: Store huge array into Access database

There isn't a fixed number. A single MDB can be as large as 2 GB, but you
can link together multiple MDB files if you have to.

I've worked with database in excess of a million records.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele


"PN" <pn66@yahoo.com> wrote in message news:3c66cb99$1@10.1.10.29...
> Thanks Doug.
> By the way, do you know how many records can an Access2K hold? If I have

1
> million records, should I consider other databases such as Oracle or

MSSQL
> ?
>
> "Douglas J. Steele" <djsteele@canada.com> wrote in message
> news:3c668e35$1@10.1.10.29...
> > Create a table with a Long Integer field (call it MyIndex) and another

> field
> > of the same type as the array (call it MyValue).
> >
> > Store each array element as a separate row: the element number as the

Long
> > Integer field, and its value as the other field.
> >
> > For lngLoop = LBound(MyArray) to UBound(MyArray)
> > rsMyRecordset.AddNew
> > rsMyRecordset!MyIndex = lngLoop
> > rsMyRecordset!MyValue = MyArray(lngLoop)
> > rsMyRecordset.Update
> > Next lngLoop
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> >
> >
> > "PN" <pn66@yahoo.com> wrote in message news:3c65672d$1@10.1.10.29...
> > >
> > > I'm trying to store a huge array (600K+ elements) into Access

database.
> > Does
> > > anyone know how? I tried to assigned each array element into each
> > > field but Access 2000 had a limit of 255 fields. I saved to a binary

> file
> > > but the program crashed with overflow error when it reached 8192th

array
> > > element (element type is Single so 8192th is 8192 * 4 = 32,768 bytes

> which
> > > is the max. limit of record length). Any help would be appreciated.
> > >

> >
> >

>
>



Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:46 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.