-
testblank not working consistantly?
Hello, We are getting some inconsistant behaviour with testblanktable.
Here is our version number:
Tornado (Powered by ASPdb.Net) Version : Tornado - (GOLD), ASPdb.Net, ASP-db(tm)(c)1998-2004 by USIntertech Inc. - Ver 4.6.11.10
Here is our example code (change all "produce" entries to "seafood" to give the blank condition in the products table). Also the add submission does not work in this example, but we just want to go into the add form.
<%@ Page Language="vb" Debug="true" aspcompat=true%>
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim GD As New Tornado.Getdata()
Dim M1 As New Tornado.Z()
Dim LastUnit As String = GD.Get_Unit
With M1
.dbQP = "U=11| S=12|ps=-1| D=d:\Inetpub\db\nwind.mdb|M=ty=SBox!SboxMacro=#0# |Q=select * from categories"
.ASPdbNET()
End With
If LastUnit = "11" Or Session("Box11") = "" Then
Session("Box11") = "<Center>" & GD.Get_Sbox("t=1") & "</center>"
Session("selected_cat") = GD.Get_SelectBoxSelection(11)
end if
response.Write("<br>" & Session("Box11"))
Dim EditAll As New Tornado.Z()
With EditAll
Dim DBF as string = "Select * From products"
if Session("selected_cat") <> "" then
DBF = DBF & " where categoryid = " & Session("selected_cat")
end if
.dbTestBlankTable = "table=products|action=add|testsql=" & DBF
.dbQP = "U=727|S=12|Ps=15|M=ty=G!sysindex=t|Gdf=0|D=d:\Ine tpub\db\nwind.mdb|ni=add|Q="& DBF
Dim CT as string = "ind= cat_ct|sql=Select Categoryid from categories"
.dbCommonTables = CT
Dim EAF as string = "fi=categoryid|ty=SELECTBOX+B|val=cat_ct|Tex=cat_c t"
.dbEditAddFlds = EAF
.dbBookMark = "products;0"
.ASPdbNET()
End With
End Sub
</script>
Thanks,
Dean
-
New more details. Pin point where the code fails and how. Also, Add button shows up when I ran the code and when I Clicked the Add button - Add form is displayed. Do I need to modify NWIND?
FK
-
followup
Thanks for the reply.
- You will need to open the products table, sort the category column.
- Change all "produce" to "seafood".
- Close the table
- run the code, and select 7 from the drop list at the top, this corresponds to produce.
- since there are not any produce entries anymore, then it should return an empty record set and go into an add. However, it just returns "empty record set"
- we just need to have it go into an add when an empty record set is returned.
Thanks,
Dean
-
The test blank is only tets it once ( for you, at the top program) unless you force it to do it everytime. In you case yo uwan to test every time because your selectio is dynamic. SO add the everytime property and it'll force it to check every time.
.dbTestBlankTable = "everytime=true|table=products|action=add|testsql= " & DBF
-
thanks!
Thanks, sorry, should of looked more carefully for that option. Dean
-
No problem... keep going
Frank
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|