A code concept of retreiving data would be nice...
but i inherited that application and have to migrate it to SQL asap. So the temp. tables looks like a good First-Step Soulution to 1:1 migrate the statements.
We have to maintain the old code, so it helps the others, if the code looks similair...
The variable should be in scope. I tested it with public for the parameter variable. Also i get an input prompt if not in scope.
This is what i dont understand.
My problem occurs only if u use the temp. tables.
nid = 1000
Sqlexec(nsqlhandle,"select * from adresse where adr_nid = ?nid) && return...
Update, i just read the posts from OlafDoschke
I tested within the same query like this:
nid = 1000
csql="select * into #curtest from adresse where adr_nid = ?nid; select * from #curtest"
SQlexec(nsqlhandle, csql)
This does work! But wy the #curtest is dropped. The handle is still the same...
nresult=SQLEXEC(nhandle,"select * into #curtemp from adresses where adr_nid = ?nid")
After this, with the same handle:
nresult=SQLEXEC(nhandle,"select * from #curtemp) : return -1
Error is: #curtemp unknown.
This problem only occurs if i use parameters, not if i use...
My problem is to translate the actual in-Code-Querys to SQL-Querys, when local cursors AND DBF-Tables are accessed in the same query
e.g.in FoxPro:
select * from adress where adr_lint = .t. into cursor curAdrInt
select * from jobs inner join curAdrInt on job_nadrid= job_nid into cursor...
Hi.
We´re migrating our application from the FoxPro-Database to Microsoft SQL.
To translate the SQL-Statements with Cursor-DBF-Joins we want to use the temporary tables of T-SQL:
nresult=SQLEXEC(nhandle,"select * into #curtemp from adresses")
This is working fine. We can access #curtemp as a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.