
Update Oracle data using Data control and SQL?
Quote:
> Hi all,
> The problem is, I have to use the DB_SQLPASSTHROUGH
> option with the data control, and the resulting recordset is
> NOT updatable.
> It seems odd to have a Data control and data bound controls
> but have them read-only when used with ODBC databases.
> Can someone tell me this ain't true?
Never, EVER, *EVER* attempt to update Oracle through ODBC and Recordsets.
This is evil, and ODBC will punish you for it by being *VERY* slow.
Rule#1: To update through ODBC, do a
DatabaseVariable.Execute "UPDATE x SET x = x WHERE x etc..."
I suspect that the reason your recordset is non-updatable under
DB_SQLPASSTHROUGH is because DB_SQLPASSTHROUGH does not cause ODBC to
fetch all sorts of interesting information on the table structure (which
is why your query actually returns short of when some place freezes over,
but that's another story...), and so ODBC "cannot" figure out how to do
updates.
So, the better option is to execute queries to do your updates... And an
even better (and *MUCH* more stable) option is not to use ODBC at all, but
that may not be possible in your case (ie, write/find a direct connection
DLL for Oracle).
--
Royalty free licence to read this message is freely available
to anyone except representatives or employees of Microsoft.
Microsoft may purchase non-exclusive licence to view this
message by paying the sum of $1,000,000 US to the author. By
reading this message you have agreed to be bound by these terms.