Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record not selected by a SQL query
Message
From
27/10/2018 17:08:28
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01662848
Message ID:
01662853
Views:
37
>Hi there,
>
>in myprogram I build this query:
>
>
>select kartei.* , RECNO() as satznr, kunden.vorname, kunden.name1, kunden.name2,
> kunden.name3, kunden.strasse, kunden.plz, kunden.ort from kartei  inner join kunden 
>on kartei.kundennr == kunden.kundennr where kartei.vormerker = .T. 
>and (kartei.nummer == this.cIsbn) and not DELETED() into cursor myvormerker 
>READWRITE order by best_dat DESC
>
>
>by assigning it to a var like
>
>cSelect = "Select...."
>
>And run it
>
>&cSelect
>
>Unfortunately this works only if I have more than one record fulfilling the conditions.
> If there is only one record matching it, _tally returns 0
>If I run the query in the command window, it works.
>Hay anybody some help für me?

In the past I've run into weird issues using DELETED() in SQL queries.

Instead, can you try removing that function from your query, and issuing SET DELETED ON before you run it?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform