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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get BASECOLUMNNAME and BASETABLENAME ADO RS properties? 1

Status
Not open for further replies.

junwebhead

Programmer
Jun 13, 2003
41
QA
Hello everyone!

I'm sorry if this is a lame question but I can't find the soluton for it anywhere. I had a database application using MS Access then I decided to move it to SQL Server for obvious reasons. But I cannot get the BASECOLUMNNAME and BASETABLENAME ADO RS properties when I create a recordset to get data from SQL Server. This usually works in MS Access. Now I don't know why this happens. My temporary solution is to create a linked-table in access pointing to SQL Server. This works but I know the disadvantages of this solution so I desperately tryng to solve this problem using SQL server alone. Please help me.

Thanks in advance!

Jun
 
Aren't BASECOLUMNNAME and BASETABLENAME ADO Field properties?

Two things come to mind:

a) used provider that does not expose properties you want via IColumnsRowset interface (MSDASQL can do that)
b) recordset is open as readonly (rsObj.LockType = adLockReadOnly). CCE/provider assume there is nothing to update and therefore don't return properties necessary for remote updates.

Try SQLOLEDB provider instead, and don't use these properties on read-only recordsets.

------
heisenbug: A bug that disappears or alters its behavior when one attempts to probe or isolate it
schroedinbug: A bug that doesn't appear until someone reads source code and realizes it never should have worked, at which point the program promptly stops working for everybody until fixed.

[ba
 
Thanks vongrunt!

Yes, those are ADO field properties.

I'm already using SQLOLEDB but on a adLockReadOnly LockType.
So when I tried using other locktypes, it works!
Thank you very much vongrunt!!! I'll never figure it out myself.

You have helped me once again. Thanks!

Jun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top