Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Much ADO (recordset) about a datasheet view? 1

Status
Not open for further replies.

Brazil6

Programmer
May 2, 2006
4
NL
Is it possible to open an Access 97 (97! sad, isn't it?) form in datasheet mode, with data coming from an ADO-recordsource using data from a (SQL) server, while still giving me the same facilities (editing data, adding rows, deleting rows) as with a linked ODBC table?

The idea behind it is that with ADO, I can get a recordset without using an ODBC DSN (data source name), by using the proper connectionstring with servername, database name, table name, user ID and pwd. But I would like to see this ADO recordset presented in a user interface in a graphical way, like an ordinary Access 97 table grid, with editing, recordselectors etc etc: the works. All I seem to be getting is a non-updatable data grid, (e.g. using a pass-through query) even though the user in the connection string has full (SQL Server) permissions for the table being used. (I know, this entails a dynamic build of the columns collection, as Access has no structure info stored about ADO recordsets used.)

I have done something like this before by placing a grid object (Microsoft Flexgrid Control) on the form and then implement editing, deletion and addition myself, but this felt like re-inventing the wheel; not to mention totally irritating messages about not having the required license to use the control in the first place, when deploying the app.

So I would like to know if it is possible at all to use existing (Microsoft ADO?) library objects and functionality to achieve this without too much programming like, say, Set frmEdit.RecordSource = rstMyData_ADO.

Thx.
 
I'm afraid ac97 is too old for that:
[URL unfurl="true" said:
http://support.microsoft.com/kb/281998/EN-US/[/URL]]
The Recordset property was introduced in Microsoft Access 2000, and it allows you to bind forms to either DAO or ADO Recordset objects.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks very much PHV, for the link submitted.

It's a pity my idea is not feasible, but at least it stops me looking for something that simply isn't there.

Bye, KH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top