Hi, I'm currently testing V11 to switch our office over to the new version. I'm using a copy of our current db for testing. In the following script, it worked in v5 but now it's not displaying the records on the form it's opening. The script is as follows:
dim tbl as P
dim tbl3 as P
dim user1 as C
dim begindate as D
dim enddate as D
tbl3 = set.open("ameagle")
tstr1 = ui_get_text("Server Name","Please Enter a Server's Name")
if tstr1=""then
end
end if
user1=(tstr1)
dstr = ui_get_date("Beginning Date?","How Far Back Do You Wish To Go")
if dstr=""then
end
end if
begindate=ctod(dstr)
dstr1 = ui_get_date("Drop Dead Date","Please Enter Drop Dead Date")
if dstr1=""then
end
end if
enddate=ctod(dstr1)
'debug(1)
tbl = table.current()
query.description = ""
query.order = ""
query.filter = "AMEREGL3->SERVER = "+quote(user1)+" .AND. BETWEEN(AMEREGL3->DROP_DEAD,{"+dtoc(begindate)+"},{"+dtoc(enddate)+"}) .AND. ISBLANK(\"AMEREGL3->DATE_COMP\")"
query.options = "I"
tbl.query_create()
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
ameregl3->server_email = IF( marked("server list"), server list->email, ameregl3->server_email)
tbl.change_end(.t.)
tbl.fetch_next()
end while
:form.view("ameagle-new")
END
In the earlier version, after running the script it would open the form displaying the queried records. Now the form opens, but displays all the records in the table and not the queried records. The script is run from a button on our main menu and is run spawning a new session. If I debug the script with test records, it runs all the way thru and I see it fetch the 2 test records. When it opens the form view however, the form view is displaying all the records in the table and not what I queried. Any ideas would be appreciated. Thanks in advance.
Scott
dim tbl as P
dim tbl3 as P
dim user1 as C
dim begindate as D
dim enddate as D
tbl3 = set.open("ameagle")
tstr1 = ui_get_text("Server Name","Please Enter a Server's Name")
if tstr1=""then
end
end if
user1=(tstr1)
dstr = ui_get_date("Beginning Date?","How Far Back Do You Wish To Go")
if dstr=""then
end
end if
begindate=ctod(dstr)
dstr1 = ui_get_date("Drop Dead Date","Please Enter Drop Dead Date")
if dstr1=""then
end
end if
enddate=ctod(dstr1)
'debug(1)
tbl = table.current()
query.description = ""
query.order = ""
query.filter = "AMEREGL3->SERVER = "+quote(user1)+" .AND. BETWEEN(AMEREGL3->DROP_DEAD,{"+dtoc(begindate)+"},{"+dtoc(enddate)+"}) .AND. ISBLANK(\"AMEREGL3->DATE_COMP\")"
query.options = "I"
tbl.query_create()
tbl.fetch_first()
while .not. tbl.fetch_eof()
tbl.change_begin()
ameregl3->server_email = IF( marked("server list"), server list->email, ameregl3->server_email)
tbl.change_end(.t.)
tbl.fetch_next()
end while
:form.view("ameagle-new")
END
In the earlier version, after running the script it would open the form displaying the queried records. Now the form opens, but displays all the records in the table and not the queried records. The script is run from a button on our main menu and is run spawning a new session. If I debug the script with test records, it runs all the way thru and I see it fetch the 2 test records. When it opens the form view however, the form view is displaying all the records in the table and not what I queried. Any ideas would be appreciated. Thanks in advance.
Scott
Comment