Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2008, 10:50 PM
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default MS Access Form Bind With OO4O

We work with Oracle and MS Access and are wanting to bind or fill a form with a recordset from Oracle, displaying a list of records. We want to use the MS Access Form with Oracle OO4O.

 
Old February 25th, 2008, 08:41 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What is your question? What part of this process are you having problems with? Creating a recordset in Oracle? Binding a recordset to a form? Creating a form? Etc?


mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old February 25th, 2008, 08:31 PM
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by MTForm
 We work with Oracle and MS Access and are wanting to bind or fill a form with a recordset from Oracle, displaying a list of records. We want to use the MS Access Form with Oracle OO4O.

We can not get the Oracle data retrieved via OO4O to go into the MS Access continuous form. We have tried Dynasets and RefCursors. Me.recordset or set me.recordset = ds does not work.
Mike

 
Old February 26th, 2008, 08:40 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure how you are trying to retrieve the data. Normally I would use this sort of connection set up:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sSQL As String

Set cn = New ADODB.Connection
With cn
    .CursorLocation = adUseClient
End With
cn.Open "Provider=msdaora;Data Source=Database.Domain;User ID=UserID;Password=Password;"

sSQL = "SELECT * FROM database.tablename"

Set rs = New ADODB.Recordset
rs.Open sSQL, cn, adOpenDynamic, adLockOptimistic

This will open an editable recordset.

Have you gotten this far?



mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old February 27th, 2008, 04:29 PM
Registered User
 
Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the same issue as this user, I believe. In my case, I don't want to use ADO to connect to ORACLE, as there are issues with drivers and such that make using ADO/Access/ORACLE a maintenance nightmare. For example, each version's driver has a different name...

Also, I can force the construction of a parameterized or dynamic SQL statement back to the server with OO4O, without all of the gruesome concatenations required in Access to build the parameterized SQL statement for a pass-through query.

As it stands, the result set returned by OO4O is not compatible with an ADO recordset. They are different objects. So, the data has to be moved from one to the other.

In MS Access, we have created a temporary table and looped the OO4O result set, inserting each row into the temp table. We then set the form's recordsource to that table. When the form closes, we delete the table and when the Access app closes, we compact. My team lead does NOT like this approach, so that is why I am still researching.

We also tried defining a disconnected ADO recordset and inserted the OO4O result set rows into it. Problem there was that while the rows displayed correctly in Access, Access abends when a user right clicks a column in a continuous form and selects a filter or sort option.

So, the question remains, is there a way to easily move the data in an OO4O result set to an form's recordset without using a temporary table?

Thanks,

Wayne





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can show graphs in MS Access form ayazhoda Access VBA 20 April 23rd, 2007 06:50 AM
Bind Tree View to MS Access table using VB bonekrusher ASP.NET 2.0 Basics 1 December 22nd, 2006 12:42 PM
problem using ADO to open form in MS Access apike VBScript 3 May 2nd, 2006 06:25 AM
Microsoft Web Browser used in MS Access Form jeff1804 Access 8 December 9th, 2005 07:17 PM
instantiate a form object by its name in MS Access sky2000 Access VBA 1 May 6th, 2004 03:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.