ASE, SQL, OLE, ADE

ASE, SQL, OLE, ADE

Reply
Active Member
doicare
Posts: 9
Registered: ‎03-01-2008
Message 1 of 2 (376 Views)

Assing Array to an OLE object field in access database

376 Views, 1 Replies
07-15-2012 07:26 AM

Hi all

 

I am facing a problem in storing an array of integers to an OLE object field in the database, the used code for this action is listed below:

 

Sub Import_data()

 

Dim oAccesss As New ADODB.Connection
Dim oRecordset11 As New ADODB.Recordset
oAccesss.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\DBS.mdb;"
oRecordset11.Open "Select OLEdata From Table1", oAccesss, adOpenKeyset, adLockOptimistic

Dim SS(10) As integer

 

For N = 0 To 9

SS(N) = rnd
Next N

With oRecordset11
.Fields.Item(0) = SS

.update

end with

 

End sub

 

 

Kindly Advice.

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 2 (344 Views)

Re: Assing Array to an OLE object field in access database

07-18-2012 12:42 PM in reply to: doicare

Better yet to save Handles instead of ObjectIds,

see example how to save texts to the newly created database

make sure you change all file names in this project to suit

 

See attached project for more

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.