dbTalk Databases Forums  

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

comp.databases.paradox comp.databases.paradox


Discuss sql :table does not exist or alias is not currently open in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
marco
 
Posts: n/a

Default Re: sql :table does not exist or alias is not currently open - 04-09-2007 , 04:39 PM






Bertil Isberg wrote:
Quote:
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.


It "Should" but i does not because it does not care for DML.
"albe" was opened for previous sql using tables in "albe"

Quote:
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.
I understand you. Does this following code work with pdx>7? Which
database do you open?

--------------------------------
db.open("any"); or "albe" or "priv"
sq=sql
select c.numero,c.tp,m.bof
from "riv:~contratto" C, ":albe:movi" M
where c.numero=M.numero
-------------------------------








Reply With Quote
  #12  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: sql :table does not exist or alias is not currently open - 04-15-2007 , 03:10 PM






Marco

This one works in P11 build 410

var
sqlhandle sql
db database
endvar

db.open(":Test:")

sqlHandle=sql

SELECT DISTINCT d."Order No", d."Customer No", D1.Name, D1.Street
FROM ":Samplerders.db" d, ":BUGGAR:Customer.DB" D1
WHERE
(D1."Customer No" = d."Customer No")
ORDER BY d."Order No", d."Customer No", D1.Name, D1.Street
endsql

try
sqlHandle.executeSql(db, ":WORK:X1")
onfail
errorshow()
endtry

db.close()



--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"marco" <n_sp_hum_marco.foglia (AT) tucsoft (DOT) com> skrev i meddelandet
news:461ab296$1_5 (AT) news (DOT) bluewin.ch...
Quote:
Bertil Isberg wrote:
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.



It "Should" but i does not because it does not care for DML.
"albe" was opened for previous sql using tables in "albe"

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.

I understand you. Does this following code work with pdx>7? Which database
do you open?

--------------------------------
db.open("any"); or "albe" or "priv"
sq=sql
select c.numero,c.tp,m.bof
from "riv:~contratto" C, ":albe:movi" M
where c.numero=M.numero
-------------------------------









Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.