Re: sql :table does not exist or alias is not currently open



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.






.



Relevant Pages

  • Re: Serious errors with Create view command
    ... Either you open each view as needed with a different alias and assign this ... stored in the database, ... Edit Stored Procedures opens a code editing window and saves the code you ... can't paste it INTO the view designer sql view window as that's Read ...
    (microsoft.public.fox.helpwanted)
  • Re: sql :table does not exist or alias is not currently open
    ... Opening albe and specifying:PRIV: inside the SQL comment should make Paradox totally confused. ... 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. ...
    (comp.databases.paradox)
  • Re: Can you setup Analysis Services 2005 to work with a SQL 2000 database?
    ... > Please do not send email directly to this alias. ... >> Can you setup Analysis Services 2005 to work with a SQL 2000 database? ...
    (microsoft.public.sqlserver.olap)
  • Alias for a database name?
    ... Various applications connect to this database using this name. ... turns out that certain programs like Excel have a problem accessing SQL ... an "alias" name for this database? ... but clients that have problems with "." ...
    (microsoft.public.sqlserver.server)
  • Alias for a database name?
    ... Various applications connect to this database using this name. ... turns out that certain programs like Excel have a problem accessing SQL ... an "alias" name for this database? ... but clients that have problems with "." ...
    (microsoft.public.sqlserver.programming)