Re:SQL-Links with Oracle or MS SQL: Can not write to tables
Quote
CURS...@t-online.de (CURSOR_) wrote:
>It's simple?
>I have Delphi, SQL-Links and Oracle or MS SQL-Server.
>Access to databases with ODBC works fine.
>But with IDAPI I can't write to tables/queries. All objects have
>readonly-state. I get the error "Index nicht vorhanden" (german,
>no such index) when i try to activate the TTable-object.
>(TQuery-objects are also read only.) A primary index is defined.
>Wonder: BDE works! Delphi not. (My IDAPI-alias seems ok.)
>What must I do?
>Thanks...
>Christian Morawietz
>(CURS...@t-online.de, subject delphi)
>=== example ==================================================
> <DDL snipped>
>IDAPI-Alias "Oracle_DB"
> Type : Oracle
> Path :
> Server Name : CM:ORCL
> User Name : Scott
> Net Protocol : Named Pipes
> Open Mode : Read/Write
> Schema Cache Size : 8
> Langdriver :
> SqlQryMode : Server
> SqlPassThru Mode : Shared Autocommit
> Schema Cache Time : -1
>Database1:TDatabase
> AliasName : Oracle_DB
> Connected : True
> DatabaseName : Scott_test
> DriverName :
> KeepConnection : True
> LoginPrompt : True
> Name : Database1
> Tag : 0
> TransIsolation : tiReadCommitted
>Table1:TTable
> Active : False <--- error, when Active=True
> AutoCalcFields : False
> DatabaseName : Scott_test
> Exlusive : False
> IndexFieldNames : NR
> IndexName :
> MasterFields :
> MasterSource :
> Name : Table1
> ReadOnly : False
> TableName : SCOTT.MYTABLE
> TableType : ttDefault
> Tag : 0
> UpdateMode : upWhereAll
>=== end ===
I'm working against Oracle7 Server too, but in my Idapi Alias, what
comes after the colon in the field "SERVER_NAME" is the name of the
database the alias is adressing (in your case ORCL). I never succeeded
in just mentioning the server's name. So, in my case, the server name
is "ORACLE:scht", standing for server "ORACLE" and database "scht".
Furthermore, I had the same problems when using both AliasName and
DatabaseName properties of TDataBase, but it works when leaving
DatabaseName out, which seems logical in respect to the preceding: the
databasename is already known in the alias.
Note also that what is offered to you (in the dropdown list) of
TTable's DatabaseName property are in fact Aliases... This is really
all to confusing, but I took the discipline not to try to enter
anything in these cases, limiting my choices to those figuring in the
lists. At least, it works that way!
Maybe this helps for you too.
Jasper
PS: please take into consideration
- when replying, I just think I know;
- when asking, be sure that I don't.