|
|
Updateting Oracle from Excel |
|
Author |
Message |
AtulH
|
Posted: Thu May 31 13:38:59 CDT 2007 |
Top |
Excel Programming >> Updateting Oracle from Excel
Hello
I have no problems reading, but writing (update...) fails, as:
Runtime error 3146 - ODBC--call failed.
My code:
Set oWS = CreateWorkspace("blabla", "blabla", "blabla",
dbUseODBC)
oWS.DefaultCursorDriver = dbUseODBCCursor
oData = oWS.OpenConnection("blabla", dbDriverNoPrompt, True, _
"ODBC;DSN=blabla;UID=blabla;PWD=blabla")
Dim oConn As DAO.Connection ' database connection
Set oConn = oData.Connection ' open it
'If oConn.Updatable Then ' this is false...
oConn.Execute "update blabla set blabla where 1=0" ' test!
BR
Sonnich
Excel198
|
|
|
|
|
MH
|
Posted: Thu May 31 13:38:59 CDT 2007 |
Top |
Excel Programming >> Updateting Oracle from Excel
Perhaps you are using a read-only connection?
If not, then it may be that there is a setting in Oracle that you need to
change.
MH
> Hello
>
> I have no problems reading, but writing (update...) fails, as:
> Runtime error 3146 - ODBC--call failed.
>
> My code:
>
>
> Set oWS = CreateWorkspace("blabla", "blabla", "blabla",
> dbUseODBC)
> oWS.DefaultCursorDriver = dbUseODBCCursor
>
> oData = oWS.OpenConnection("blabla", dbDriverNoPrompt, True, _
> "ODBC;DSN=blabla;UID=blabla;PWD=blabla")
>
> Dim oConn As DAO.Connection ' database connection
> Set oConn = oData.Connection ' open it
> 'If oConn.Updatable Then ' this is false...
> oConn.Execute "update blabla set blabla where 1=0" ' test!
>
> BR
> Sonnich
>
|
|
|
|
|
|
|