Re: sql :table does not exist or alias is not currently open
- From: "Bertil Isberg" <ctech@xxxxxxxx>
- Date: Mon, 9 Apr 2007 21:45:56 +0200
marco
<<
db.open("albe") ; and not db.open("PRIV")
....
sq=sql
/*
ALIAS: priv
*/
Opening albe and specifying :PRIV: inside the SQL comment should make
Paradox totally confused. The comment was once needed if you wanted to get
the answer table in an in-memory cursor , but then it had to be the same
alias as the opened database-variable.
Specifying a different database in the SQL-comment has never come to my
mind.
--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/
"marco" <n_sp_hum_marco.foglia@xxxxxxxxxxx> skrev i meddelandet
news:461a8f7f$1_2@xxxxxxxxxxxxxxxxxx
Bertil Isberg wrote:
marco
<<
BDE 5.2 care only for DDL and does not want alias inside sq endsql.
This code works for me using P11 build 410 and Bde 5.2 and it contradicts
your statement
var
db database
sqlhandle sql
endvar
db.open(":WORK:")
sqlhandle=sql
SELECT DISTINCT ":Sample:customer.db"."Customer No", Name
FROM ":Sample:customer.db"
ORDER BY ":Sample:customer.db"."Customer No", Name
endsql
sqlhandle.executeSQL(db,":priv:answer.db")
but this SQL code is not DDL, it is DML
If you open the database on PRIV, you should never reference PRIV in the
sql statement
my original code (not working with pdx7 bde5.2)was
-------------------------------------------------
db.open("albe") ; and not db.open("PRIV")
...
sq=sql
/*
ALIAS: priv
*/
alter table "~contratto" add ttax NUMERIC(10,2)
----------------------------------------------------
but using SELECT ((DML)) instead of ALTER ((DDL))works fine also with
db.open("PRIV")...SELECT * FROM ":PRIV
I always wandered why pdx 7 asks to open a DB if then it does not care
which one it is. My conclusion was that it was for using other database
like interbase.
.
- Follow-Ups:
- References:
- sql :table does not exist or alias is not currently open
- From: marco
- Re: sql :table does not exist or alias is not currently open
- From: Bertil Isberg
- Re: sql :table does not exist or alias is not currently open
- From: marco
- Re: sql :table does not exist or alias is not currently open
- From: Bertil Isberg
- Re: sql :table does not exist or alias is not currently open
- From: marco
- Re: sql :table does not exist or alias is not currently open
- From: Bertil Isberg
- Re: sql :table does not exist or alias is not currently open
- From: marco
- sql :table does not exist or alias is not currently open
- Prev by Date: Re: sql :table does not exist or alias is not currently open
- Next by Date: Re: Unlocking problem...
- Previous by thread: Re: sql :table does not exist or alias is not currently open
- Next by thread: Re: sql :table does not exist or alias is not currently open
- Index(es):
Relevant Pages
|
|