view recordset gathered data (odbc) without a table?

chris-uk-lad

Registered User.
Local time
Today, 14:44
Joined
Jul 8, 2008
Messages
271
Hi all,

Is it possible to display data built within a recordset, without first adding it into a table? I was hoping to avoid saving data internally but cannot think of a method to do this.

This is in Access 97
 
Try researching "unbound form", this is a form that you display data on without any (direct) link into a table. Trick is you DO need this table then in memory someplace...

Search and be happy :)
 
Thanks for the quick response, i shall take a look at it.

Im currently looking at the Videosoft flexarray control but dont know how to populate it lol
 
Exactly whaere is this data coming from? A Recordset has to be based on a table or tables (via a query) regardless of how it is presented, whether by bound or unbound form. It can be a temporary table, as opposed to a permanent table, or it can be in a table on a non-Access back end, such as Oracle or SQL Sever.
 
Exactly whaere is this data coming from? A Recordset has to be based on a table or tables (via a query) regardless of how it is presented, whether by bound or unbound form. It can be a temporary table, as opposed to a permanent table, or it can be in a table on a non-Access back end, such as Oracle or SQL Sever.

The recordset is generated from an SQL table over an ODBC conneciton. Im trying to make it dynamic by avoiding table population within the access database.
 
missinglinq is quite correct. Recordsets are just an interface to the underlying tables, and whether the forms is bound or not, has nothing to do with this fact.

In fact, you can just go and bind recordset to the forms instead of tables or queries.

In DAO, I would imagine you could bind a recordset by using OpenRecordset upon the ODBC database opened via OpenDatabase. But that's quite rare and in that circumstnaces I usually prefer to use ADO.

With ADO, you open a connection and create a recordset running a SQL statement then you bind it to the form and you're done! You don't have to link the table in the Access front-end.
 
missinglinq is quite correct. Recordsets are just an interface to the underlying tables, and whether the forms is bound or not, has nothing to do with this fact.

In fact, you can just go and bind recordset to the forms instead of tables or queries.

In DAO, I would imagine you could bind a recordset by using OpenRecordset upon the ODBC database opened via OpenDatabase. But that's quite rare and in that circumstnaces I usually prefer to use ADO.

With ADO, you open a connection and create a recordset running a SQL statement then you bind it to the form and you're done! You don't have to link the table in the Access front-end.

Sorry for sounding amateur, how do you bind it to a form?
 
Sorry for sounding amateur, how do you bind it to a form?
Don't feel bad. But, since you are using Access 97, you don't have ADO available to you and so you can't do what Banana had in the last part of his post.
 
D'oh! Missed that important point! Sorry. You'll need to update to at least 2000 for that functionality, IINM.

(Did Access 97 even exposes the recordset at all? I'm not so clear whether it was available as a form's property if only for DAO in 97?)
 
My apologies, ive been updating this post a fair few times now lol.

Finally got it all working using the VSFlexiGrid control.

Code beloew for your reference (doesn't use the recordset data, just uses number of rows and outputs the text values "Paul" and "555-1212" for the number of rows in the recordset. Shall be using rsRecordset![] eventually for actual rows.

Thanks all for input

Set rsRecordset = New ADODB.Recordset
rsRecordset.Open strSQL, conOracleConnection
ActiveXCtl14.Col = 1
ActiveXCtl14.Rows = 1
ActiveXCtl14.ColWidth(0) = 400
ActiveXCtl14.ColWidth(1) = 1000
ActiveXCtl14.ColWidth(2) = 900
ActiveXCtl14.TextMatrix(0, 1) = "Name"
ActiveXCtl14.TextMatrix(0, 2) = "Num"
Do Until rsRecordset.EOF
ActiveXCtl14.AddItem ActiveXCtl14.Rows & vbTab & "Paul" & vbTab & "555-1212"
rsRecordset.MoveNext
Loop
 
Last edited:

Users who are viewing this thread

Back
Top Bottom