HTH, That explains a lot. I tried the search by "odbc update allowed" as you suggested but it didn't yield anything to helped me solve my issue. I'm afraid I don't know enough SQL yet to know how to "change my cursor model" though I've spent the day searching through my texts. Here's a better example of the type of query / code that I talking about: strQry = "SELECT A.Fld1, B.Fld2, C.Fld3 FROM A LEFT JOIN B ON A.B_ID = B.B_ID LEFT JOIN C ON A.C_ID = C.C_ID where A.A_ID = 8329 Order by A.A_ID" rs.Open strQry, Cn, adOpenStatic, adLockOptimistic
with the point being that all records in "A" should appear that match the where criteria. If anybody can give me an example of how they would "change the cursor model" on this query so that the resulting table is updateable I'd appreciate it. Do I have to create a complex multiple table updateable view? And if so, how? I would think there'd be no real difference between that and the correctly structured SELECT statement, but that exposes by ignorance of what's going on beneath the covers. Thanks, Jon "Becker, Holger" <[EMAIL PROTECTED]> wrote in message B9A2DDA03044D311BBD40008C75D69680EC6C37F@dewdfx24">news:B9A2DDA03044D311BBD40008C75D69680EC6C37F@dewdfx24... > JON wrote: > > > I'm converting some code that works under MS SQL using ADO & > > VB. I open a > > recordset using statements similar to this: > > strQry = "SELECT A.Fld1, B.Fld2, C.Fld3 FROM (A LEFT JOIN B > > ON A.A_ID = > > B.B_ID) LEFT JOIN C ON A.A_ID = C.C_ID where A.A_ID = 8329 > > Order by A.A_ID" > > rs.Open strQry, Cn, adOpenStatic, adLockOptimistic > > > > When I copy this query into SQL Studio to debug it I get an > > error: "missing > > keyword: SELECT". > > Why is this? > > > > I found that if I get rid of the two parenthesis "(" and ")" > > in the JOIN > > that I no longer get the error and the query works. > > So I guess you can't have parenthesis in JOIN statements. Is > > this correct? > > The parenthesis after the from is not valid. > SAP DB only supports left deep joins so we decide to generally forbid > parenthesis in the joined table clause. > For more information about joins see: > http://www.sapdb.org/htmhelp/ea/eba4f43e9211d3a98200a0c9449261/frameset.htm > > > So now the code looks something like this: > > strQry = "SELECT A.Fld1, B.Fld2, C.Fld3 FROM A LEFT JOIN B > > ON A.A_ID = > > B.B_ID LEFT JOIN C ON A.A_ID = C.C_ID where A.A_ID = 8329 > > Order by A.A_ID" > > rs.Open strQry, Cn, adOpenStatic, adLockOptimistic > > > > But now I get a general error "updates to this table is not allowed". > > Why is this? and what would you suggest I do about it? > > For some cursor model within ODBC the SAP DB odbc driver add a for update > clause to the statement. But this clause is not allowed for join selects. > So if you change your cursor model this error may disappear. > I think you will find more details on the mailing list. > Try "odbc update allowed" as search expression on http://groups.yahoo.com/group/sapdb-general/ > because the sapdb.org search engine seems to be out of order. > > HTH. > > Kind regards, > Holger > SAP Labs Berlin _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
