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

error 3251 operation is not supported for this type of object

Status
Not open for further replies.

Whitebat

Technical User
Jun 19, 2001
47
DE
hi i retrieve the error message ( look at the heading) when i try to run the following code. Why is it not supported ? i do find the method in my object browser and everything else does appear like it should so where is my error and it makes no difference if i do define a workspace or not the error is still the same. Thanks for your help maybe you can find my errror.

Dim str As String
Dim schrauth As QueryDef
dim db as database

Set db = OpenDatabase("bla", dbDriverPrompt, True, "odbc;")
Set schrauth = New QueryDef
schrauth.NAME = "TestingSchrauth"
schrauth.SQL = "sql statement "
db.QueryDefs.Append schrauth --> the debugger always stops here with the mentioned error message.
Thanks Whitebat
 
If this is access 2000, check that you have a reference set to a DAO library. Also, explicitly define the data objects as DAO.
dim db as DAO.database
Dim schrauth As DAO.QueryDef
 
thanks for your reply first. i am referring to the microsoft dao 3.6 object library. and i also get the same error message when i declare everything like
dim db as dao.database etc.
i think my problem is that i am trying to connect to an oracle database and that this method in this case is probably just provided for jet engines

any ideas maybe to do it in an other way or how to get rounfd it ? Thanks Whitebat
 
If the Oracle table is linked then the syntax should be the same as for an Access table.

If you want the Oracle table to be the data source for a Report or Form then the easiest is to link the table. Although, the Access 2000 Form has a recordset object so you can read Oracle directly through ADO and move the resultset to the Forms recordset. This is not available on a Report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top