ASP Formpagetablefields formatting 1st Part


G

Guest

Dear Sirs
I created my databse in Access but my server is an Apache server and not
accepting ASP codes from Frontpage.
Sowith I used ATAF software to create the code. My server is accepting that,
but the following happened.
My ASP page shows the data but not like in the data table (Access). I would
like that the numbers have a 2 digit decimal behind the comma i.e.123.456,30
and
negative numbers should be in red and in brackets i.e. (123.456,30).
So the format should be: $#.##0,00;($#.##0,00)[Red]
Please look at my code because I cannot set the "formpagetablefield" to the
above mentioned. Please tell me where and what I have to do to get my field
correctly formatted.
Many thanks
Klaus
*********************************************************
Here the complete code:
<!--#include File ="globalsub.asp"-->
<%

On Error Resume Next
cmd = Request.QueryString("cmd")
Session("accountnumber") = Request.QueryString("accountnumber")
Session("accountnumber") = Replace(session("accountnumber"),"%2D","-")

Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

Function CountRecs(TableName, FieldName, NoOfRecs)
SqlStrCount = "Select Count(" + FieldName + ") As NoOfRecs From " +
TableName
Set rscount = conntemp.Execute(SqlStrCount)
NoOfRecs = rscount("NoOfRecs")
CountRecs = A
rscount.Close
End Function

Select Case cmd

Case "SaveNew"
FieldStr=" ("
ValueStr = " VALUES ("
If Request.QueryString("accountnumber")<>"" Then
FieldStr=FieldStr+ "accountnumber, "

ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("accountnumber"))+"', "
End if
If Request.QueryString("product")<>"" Then
FieldStr=FieldStr+ "product, "
ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("product"))+"', "
End if
If Request.QueryString("initialinvestment")<>"" Then
FieldStr=FieldStr+ "initialinvestment, "
ValueStr=ValueStr+Request.QueryString("initialinvestment")+", "
End if
If Request.QueryString("guaranteedequity")<>"" Then
FieldStr=FieldStr+ "guaranteedequity, "
ValueStr=ValueStr+Request.QueryString("guaranteedequity")+", "
End if
If Request.QueryString("monthstartingbalance")<>"" Then
FieldStr=FieldStr+ "monthstartingbalance, "
ValueStr=ValueStr+Request.QueryString("monthstartingbalance")+", "
End if
If Request.QueryString("SumOfcontractvalue")<>"" Then
FieldStr=FieldStr+ "SumOfcontractvalue, "
ValueStr=ValueStr+Request.QueryString("SumOfcontractvalue")+", "
End if
If Request.QueryString("commission")<>"" Then
FieldStr=FieldStr+ "commission, "
ValueStr=ValueStr+Request.QueryString("commission")+", "
End if
If Request.QueryString("managementfeebasic")<>"" Then
FieldStr=FieldStr+ "managementfeebasic, "
ValueStr=ValueStr+Request.QueryString("managementfeebasic")+", "
End if
If Request.QueryString("incentivefeetotal")<>"" Then
FieldStr=FieldStr+ "incentivefeetotal, "
ValueStr=ValueStr+Request.QueryString("incentivefeetotal")+", "
End if
If Request.QueryString("electronicfee")<>"" Then
FieldStr=FieldStr+ "electronicfee, "
ValueStr=ValueStr+Request.QueryString("electronicfee")+", "
End if
If Request.QueryString("vat")<>"" Then
FieldStr=FieldStr+ "vat, "
ValueStr=ValueStr+Request.QueryString("vat")+", "
End if
If Request.QueryString("adjustment")<>"" Then
FieldStr=FieldStr+ "adjustment, "
ValueStr=ValueStr+Request.QueryString("adjustment")+", "
End if
If Request.QueryString("netliquidationbalance")<>"" Then
FieldStr=FieldStr+ "netliquidationbalance, "
ValueStr=ValueStr+Request.QueryString("netliquidationbalance")+", "
End if
If Request.QueryString("SumOfopenpl")<>"" Then
FieldStr=FieldStr+ "SumOfopenpl, "
ValueStr=ValueStr+Request.QueryString("SumOfopenpl")+", "
End if
If Request.QueryString("SumOfinitialmargin")<>"" Then
FieldStr=FieldStr+ "SumOfinitialmargin, "
ValueStr=ValueStr+Request.QueryString("SumOfinitialmargin")+", "
End if
If Request.QueryString("SumOfmaintenancemargin")<>"" Then
FieldStr=FieldStr+ "SumOfmaintenancemargin, "
ValueStr=ValueStr+Request.QueryString("SumOfmaintenancemargin")+", "
End if
If Request.QueryString("opentradebalance")<>"" Then
FieldStr=FieldStr+ "opentradebalance, "
ValueStr=ValueStr+Request.QueryString("opentradebalance")+", "
End if
FieldStr = Mid(FieldStr, 1, Len(FieldStr) - 2) + ")"
ValueStr = Mid(ValueStr, 1, Len(ValueStr) - 2) + ")"
SqlStr = "Insert Into webtotalbalancebie30p" + FieldStr + ValueStr
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
If Err <> 0 Then
Session("Err") = Err.Number
Session("Description") = Err.Description
Session("HelpContext") = Err.HelpContext
Session("HelpFile;") = Err.HelpFile
Session("Source") = Err.Source
For Each Item In request.querystring
Session(Item) = request.querystring(Item)
Next
response.redirect "1form.asp?"+ Replace(request.querystring, "SaveNew",
"Copy")
End If
response.redirect "1form.asp?cmd=Last"

Case "Save"
SqlStr = "UPDATE webtotalbalancebie30p SET "
If Request.QueryString("accountnumber") <> Session("accountnumber") OR
IsNull(Session("accountnumber"))=true Then

Sqlstr=SqlStr+"accountnumber='"+FixDbFieldSave(Request.QueryString("accountnumber")) + "', "
End if
If Request.QueryString("product") <> Session("product") OR
IsNull(Session("product"))=true Then
Sqlstr=SqlStr+"product='"+FixDbFieldSave(Request.QueryString("product")) +
"', "
End if
If Request.QueryString("initialinvestment") <> "" OR
IsNull(Session("initialinvestment"))=true Then

Sqlstr=SqlStr+"initialinvestment="+Request.QueryString("initialinvestment") +
", "
End if
If Request.QueryString("guaranteedequity") <> "" OR
IsNull(Session("guaranteedequity"))=true Then
Sqlstr=SqlStr+"guaranteedequity="+Request.QueryString("guaranteedequity")
+ ", "
End if
If Request.QueryString("monthstartingbalance") <> "" OR
IsNull(Session("monthstartingbalance"))=true Then

Sqlstr=SqlStr+"monthstartingbalance="+Request.QueryString("monthstartingbalance") + ", "
End if
If Request.QueryString("SumOfcontractvalue") <> "" OR
IsNull(Session("SumOfcontractvalue"))=true Then

Sqlstr=SqlStr+"SumOfcontractvalue="+Request.QueryString("SumOfcontractvalue")
+ ", "
End if
If Request.QueryString("commission") <> "" OR
IsNull(Session("commission"))=true Then
Sqlstr=SqlStr+"commission="+Request.QueryString("commission") + ", "
End if
If Request.QueryString("managementfeebasic") <> "" OR
IsNull(Session("managementfeebasic"))=true Then

Sqlstr=SqlStr+"managementfeebasic="+Request.QueryString("managementfeebasic")
+ ", "
End if
If Request.QueryString("incentivefeetotal") <> "" OR
IsNull(Session("incentivefeetotal"))=true Then

Sqlstr=SqlStr+"incentivefeetotal="+Request.QueryString("incentivefeetotal") +
", "
End if
If Request.QueryString("electronicfee") <> "" OR
IsNull(Session("electronicfee"))=true Then
Sqlstr=SqlStr+"electronicfee="+Request.QueryString("electronicfee") + ", "
End if
If Request.QueryString("vat") <> "" OR IsNull(Session("vat"))=true Then
Sqlstr=SqlStr+"vat="+Request.QueryString("vat") + ", "
End if
If Request.QueryString("adjustment") <> "" OR
IsNull(Session("adjustment"))=true Then
Sqlstr=SqlStr+"adjustment="+Request.QueryString("adjustment") + ", "
End if
If Request.QueryString("netliquidationbalance") <> "" OR
IsNull(Session("netliquidationbalance"))=true Then

Sqlstr=SqlStr+"netliquidationbalance="+Request.QueryString("netliquidationbalance") + ", "
End if
If Request.QueryString("SumOfopenpl") <> "" OR
IsNull(Session("SumOfopenpl"))=true Then
Sqlstr=SqlStr+"SumOfopenpl="+Request.QueryString("SumOfopenpl") + ", "
End if
If Request.QueryString("SumOfinitialmargin") <> "" OR
IsNull(Session("SumOfinitialmargin"))=true Then

Sqlstr=SqlStr+"SumOfinitialmargin="+Request.QueryString("SumOfinitialmargin")
+ ", "
End if
If Request.QueryString("SumOfmaintenancemargin") <> "" OR
IsNull(Session("SumOfmaintenancemargin"))=true Then

Sqlstr=SqlStr+"SumOfmaintenancemargin="+Request.QueryString("SumOfmaintenancemargin") + ", "
End if
If Request.QueryString("opentradebalance") <> "" OR
IsNull(Session("opentradebalance"))=true Then
Sqlstr=SqlStr+"opentradebalance="+Request.QueryString("opentradebalance")
+ ", "
End if
SqlStr = Mid(SqlStr, 1, Len(SqlStr) - 2)
SqlStr = SqlStr + " WHERE accountnumber='"+ session("accountnumber")+ "'"
If Instr(sqlstr," SE ")<=0 Then
conntemp.Execute (SqlStr)
End if
SqlStr ="SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case ""
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
If rs.EOF = True Then
Response.redirect "1form.asp?cmd=New"
End If
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1

Case "First"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)

Case "Last"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("CurRec") = a
Session("NumOfRecs") = a
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While (a < Session("NumOfRecs")) And (rs.EOF <> True)
a = a + 1
rs.MoveNext
Wend

Case "Prev"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") - 1
If Session("CurRec") <= 0 Then
Session("CurRec") = Session("NumOfRecs")
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case "Next"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") + 1
If Session("CurRec") > Session("NumOfRecs") Then
Session("CurRec") = 1
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case "Del"
SqlStr = "DELETE FROM webtotalbalancebie30p WHERE accountnumber='"+
Session("accountnumber")+ "'"
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
response.redirect "1form.asp"

Case "Fromlist"
Session("CurRec") = 1
SqlStr1 = "SELECT Count(accountnumber) As TotalCount From
webtotalbalancebie30p"
Set Rs1 = conntemp.Execute(SqlStr1)
Session("NumOfRecs") = Rs1("TotalCount")
Rs1.Close
Set Rs1 = Nothing
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
While Trim(Session("accountnumber")) <> Trim(CStr(rs("accountnumber")))
Session("CurRec") = Session("CurRec") + 1
rs.MoveNext
Wend
End Select

If cmd <> "New" And cmd<>"Copy" Then
Session("accountnumber") = server.Urlencode(rs("accountnumber"))
Session("accountnumber") = rs("accountnumber")
Session("product") = rs("product")
Session("initialinvestment") = rs("initialinvestment")
Session("guaranteedequity") = rs("guaranteedequity")
Session("monthstartingbalance") = rs("monthstartingbalance")
Session("SumOfcontractvalue") = rs("SumOfcontractvalue")
Session("commission") = rs("commission")
Session("managementfeebasic") = rs("managementfeebasic")
Session("incentivefeetotal") = rs("incentivefeetotal")
Session("electronicfee") = rs("electronicfee")
Session("vat") = rs("vat")
Session("adjustment") = rs("adjustment")
Session("netliquidationbalance") = rs("netliquidationbalance")
Session("SumOfopenpl") = rs("SumOfopenpl")
Session("SumOfinitialmargin") = rs("SumOfinitialmargin")
Session("SumOfmaintenancemargin") = rs("SumOfmaintenancemargin")
Session("opentradebalance") = rs("opentradebalance")
rs.Close
Set rs = Nothing
End if

If cmd="New" Then
Session("accountnumber") = ""
Session("accountnumber") = ""
Session("product") = ""
Session("initialinvestment") = ""
Session("guaranteedequity") = ""
Session("monthstartingbalance") = ""
Session("SumOfcontractvalue") = ""
Session("commission") = ""
Session("managementfeebasic") = ""
Session("incentivefeetotal") = ""
Session("electronicfee") = ""
Session("vat") = ""
Session("adjustment") = ""
Session("netliquidationbalance") = ""
Session("SumOfopenpl") = ""
Session("SumOfinitialmargin") = ""
Session("SumOfmaintenancemargin") = ""
Session("opentradebalance") = ""
End If
conntemp.Close
Set conntemp = Nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="ATAF Version 6.1.0">
<title>webtotalbalancebie30p</title>
<base target="_self">
<link rel="stylesheet" type="text/css" href="globalcss.css">

<script Language="JavaScript">
function winopenexcel (sqlstr)
{
msg=open("","NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=150");
msg.location = "toexcel.asp?sqlstr="+sqlstr;
msg.focus()
}
</script>

</head>
<body class="formpage">
<table width="100%" border="0" height="100%">
<tr><td valign="top" align="middle"><td></tr>
<tr><td align="Left" valign="Middle" >
<form method="GET" action="1form.asp" name="webtotalbalancebie30p"
onSubmit="return Checkform(this);">
<table border="0" cellpadding="0" cellspacing="0" class="formpagetable">
<tr>
<td colspan="2" class="formpagetableheader" >
<table width="100%" border="0">
<tr>
<td align="left"><img border="0" src="lefttop.gif"></td>
<td class="formpagetableheader" style="border-style: solid; border-width: 0">
webtotalbalancebie30p
</td>
<td align="right"><input type="button" value="X" style="font-family:
Tahoma; font-weight: bold; font-size: 8pt"
onClick="parent.location='default.asp'" <%=ShowTextOnPic("Click to go back to
the main menu")%> ></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> accountnumber</td>
<td><input class="formpagetablefield" type="number" name="accountnumber"
size="50" Value="<%=trim(Session("accountnumber"))%>"></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> product</td>
<td><input class="formpagetablefield" type="text" name="product"
size="50" Value="<%=trim(Session("product"))%>"></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> guaranteedequity</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="guaranteedequity" size="8"
Value="<%=Session("guaranteedequity")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> monthstartingbalance</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="monthstartingbalance" size="8"
Value="<%=Session("monthstartingbalance")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> SumOfcontractvalue</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfcontractvalue" size="8"
Value="<%=Session("SumOfcontractvalue")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> commission</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="commission" size="8" style:"$#.##0,00;($#.##0,00)[Red]"
Value="<%=Session("commission")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> managementfeebasic</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="managementfeebasic" size="8"
Value="<%=Session("managementfeebasic")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> incentivefeetotal</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="incentivefeetotal" size="8"
Value="<%=Session("incentivefeetotal")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> electronicfee</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="electronicfee" size="8"
Value="<%=Session("electronicfee")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> vat</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="vat" size="8" Value="<%=Session("vat")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> adjustment</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="adjustment" size="8"
Value="<%=Session("adjustment")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> netliquidationbalance</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="netliquidationbalance" size="8"
Value="<%=Session("netliquidationbalance")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> SumOfopenpl</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfopenpl" size="8"
Value="<%=Session("SumOfopenpl")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> SumOfinitialmargin</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfinitialmargin" size="8"
Value="<%=Session("SumOfinitialmargin")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> SumOfmaintenancemargin</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfmaintenancemargin" size="8"
Value="<%=Session("SumOfmaintenancemargin")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> opentradebalance</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="opentradebalance" size="8"
Value="<%=Session("opentradebalance")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr><td align="center" colspan="3">
 
Ad

Advertisements

T

Thomas A. Rowe

You can not use an Access database under Unix/Linux Operating Systems.

You need to review the documentation for the ASP engine that is installed under Apache to see what
ASP tags are supports.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Amateur said:
Dear Sirs
I created my databse in Access but my server is an Apache server and not
accepting ASP codes from Frontpage.
Sowith I used ATAF software to create the code. My server is accepting that,
but the following happened.
My ASP page shows the data but not like in the data table (Access). I would
like that the numbers have a 2 digit decimal behind the comma i.e.123.456,30
and
negative numbers should be in red and in brackets i.e. (123.456,30).
So the format should be: $#.##0,00;($#.##0,00)[Red]
Please look at my code because I cannot set the "formpagetablefield" to the
above mentioned. Please tell me where and what I have to do to get my field
correctly formatted.
Many thanks
Klaus
*********************************************************
Here the complete code:
<!--#include File ="globalsub.asp"-->
<%

On Error Resume Next
cmd = Request.QueryString("cmd")
Session("accountnumber") = Request.QueryString("accountnumber")
Session("accountnumber") = Replace(session("accountnumber"),"%2D","-")

Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

Function CountRecs(TableName, FieldName, NoOfRecs)
SqlStrCount = "Select Count(" + FieldName + ") As NoOfRecs From " +
TableName
Set rscount = conntemp.Execute(SqlStrCount)
NoOfRecs = rscount("NoOfRecs")
CountRecs = A
rscount.Close
End Function

Select Case cmd

Case "SaveNew"
FieldStr=" ("
ValueStr = " VALUES ("
If Request.QueryString("accountnumber")<>"" Then
FieldStr=FieldStr+ "accountnumber, "

ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("accountnumber"))+"', "
End if
If Request.QueryString("product")<>"" Then
FieldStr=FieldStr+ "product, "
ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("product"))+"', "
End if
If Request.QueryString("initialinvestment")<>"" Then
FieldStr=FieldStr+ "initialinvestment, "
ValueStr=ValueStr+Request.QueryString("initialinvestment")+", "
End if
If Request.QueryString("guaranteedequity")<>"" Then
FieldStr=FieldStr+ "guaranteedequity, "
ValueStr=ValueStr+Request.QueryString("guaranteedequity")+", "
End if
If Request.QueryString("monthstartingbalance")<>"" Then
FieldStr=FieldStr+ "monthstartingbalance, "
ValueStr=ValueStr+Request.QueryString("monthstartingbalance")+", "
End if
If Request.QueryString("SumOfcontractvalue")<>"" Then
FieldStr=FieldStr+ "SumOfcontractvalue, "
ValueStr=ValueStr+Request.QueryString("SumOfcontractvalue")+", "
End if
If Request.QueryString("commission")<>"" Then
FieldStr=FieldStr+ "commission, "
ValueStr=ValueStr+Request.QueryString("commission")+", "
End if
If Request.QueryString("managementfeebasic")<>"" Then
FieldStr=FieldStr+ "managementfeebasic, "
ValueStr=ValueStr+Request.QueryString("managementfeebasic")+", "
End if
If Request.QueryString("incentivefeetotal")<>"" Then
FieldStr=FieldStr+ "incentivefeetotal, "
ValueStr=ValueStr+Request.QueryString("incentivefeetotal")+", "
End if
If Request.QueryString("electronicfee")<>"" Then
FieldStr=FieldStr+ "electronicfee, "
ValueStr=ValueStr+Request.QueryString("electronicfee")+", "
End if
If Request.QueryString("vat")<>"" Then
FieldStr=FieldStr+ "vat, "
ValueStr=ValueStr+Request.QueryString("vat")+", "
End if
If Request.QueryString("adjustment")<>"" Then
FieldStr=FieldStr+ "adjustment, "
ValueStr=ValueStr+Request.QueryString("adjustment")+", "
End if
If Request.QueryString("netliquidationbalance")<>"" Then
FieldStr=FieldStr+ "netliquidationbalance, "
ValueStr=ValueStr+Request.QueryString("netliquidationbalance")+", "
End if
If Request.QueryString("SumOfopenpl")<>"" Then
FieldStr=FieldStr+ "SumOfopenpl, "
ValueStr=ValueStr+Request.QueryString("SumOfopenpl")+", "
End if
If Request.QueryString("SumOfinitialmargin")<>"" Then
FieldStr=FieldStr+ "SumOfinitialmargin, "
ValueStr=ValueStr+Request.QueryString("SumOfinitialmargin")+", "
End if
If Request.QueryString("SumOfmaintenancemargin")<>"" Then
FieldStr=FieldStr+ "SumOfmaintenancemargin, "
ValueStr=ValueStr+Request.QueryString("SumOfmaintenancemargin")+", "
End if
If Request.QueryString("opentradebalance")<>"" Then
FieldStr=FieldStr+ "opentradebalance, "
ValueStr=ValueStr+Request.QueryString("opentradebalance")+", "
End if
FieldStr = Mid(FieldStr, 1, Len(FieldStr) - 2) + ")"
ValueStr = Mid(ValueStr, 1, Len(ValueStr) - 2) + ")"
SqlStr = "Insert Into webtotalbalancebie30p" + FieldStr + ValueStr
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
If Err <> 0 Then
Session("Err") = Err.Number
Session("Description") = Err.Description
Session("HelpContext") = Err.HelpContext
Session("HelpFile;") = Err.HelpFile
Session("Source") = Err.Source
For Each Item In request.querystring
Session(Item) = request.querystring(Item)
Next
response.redirect "1form.asp?"+ Replace(request.querystring, "SaveNew",
"Copy")
End If
response.redirect "1form.asp?cmd=Last"

Case "Save"
SqlStr = "UPDATE webtotalbalancebie30p SET "
If Request.QueryString("accountnumber") <> Session("accountnumber") OR
IsNull(Session("accountnumber"))=true Then

Sqlstr=SqlStr+"accountnumber='"+FixDbFieldSave(Request.QueryString("accountnumber")) + "', "
End if
If Request.QueryString("product") <> Session("product") OR
IsNull(Session("product"))=true Then
Sqlstr=SqlStr+"product='"+FixDbFieldSave(Request.QueryString("product")) +
"', "
End if
If Request.QueryString("initialinvestment") <> "" OR
IsNull(Session("initialinvestment"))=true Then

Sqlstr=SqlStr+"initialinvestment="+Request.QueryString("initialinvestment") +
", "
End if
If Request.QueryString("guaranteedequity") <> "" OR
IsNull(Session("guaranteedequity"))=true Then
Sqlstr=SqlStr+"guaranteedequity="+Request.QueryString("guaranteedequity")
+ ", "
End if
If Request.QueryString("monthstartingbalance") <> "" OR
IsNull(Session("monthstartingbalance"))=true Then

Sqlstr=SqlStr+"monthstartingbalance="+Request.QueryString("monthstartingbalance") + ", "
End if
If Request.QueryString("SumOfcontractvalue") <> "" OR
IsNull(Session("SumOfcontractvalue"))=true Then

Sqlstr=SqlStr+"SumOfcontractvalue="+Request.QueryString("SumOfcontractvalue")
+ ", "
End if
If Request.QueryString("commission") <> "" OR
IsNull(Session("commission"))=true Then
Sqlstr=SqlStr+"commission="+Request.QueryString("commission") + ", "
End if
If Request.QueryString("managementfeebasic") <> "" OR
IsNull(Session("managementfeebasic"))=true Then

Sqlstr=SqlStr+"managementfeebasic="+Request.QueryString("managementfeebasic")
+ ", "
End if
If Request.QueryString("incentivefeetotal") <> "" OR
IsNull(Session("incentivefeetotal"))=true Then

Sqlstr=SqlStr+"incentivefeetotal="+Request.QueryString("incentivefeetotal") +
", "
End if
If Request.QueryString("electronicfee") <> "" OR
IsNull(Session("electronicfee"))=true Then
Sqlstr=SqlStr+"electronicfee="+Request.QueryString("electronicfee") + ", "
End if
If Request.QueryString("vat") <> "" OR IsNull(Session("vat"))=true Then
Sqlstr=SqlStr+"vat="+Request.QueryString("vat") + ", "
End if
If Request.QueryString("adjustment") <> "" OR
IsNull(Session("adjustment"))=true Then
Sqlstr=SqlStr+"adjustment="+Request.QueryString("adjustment") + ", "
End if
If Request.QueryString("netliquidationbalance") <> "" OR
IsNull(Session("netliquidationbalance"))=true Then

Sqlstr=SqlStr+"netliquidationbalance="+Request.QueryString("netliquidationbalance") + ", "
End if
If Request.QueryString("SumOfopenpl") <> "" OR
IsNull(Session("SumOfopenpl"))=true Then
Sqlstr=SqlStr+"SumOfopenpl="+Request.QueryString("SumOfopenpl") + ", "
End if
If Request.QueryString("SumOfinitialmargin") <> "" OR
IsNull(Session("SumOfinitialmargin"))=true Then

Sqlstr=SqlStr+"SumOfinitialmargin="+Request.QueryString("SumOfinitialmargin")
+ ", "
End if
If Request.QueryString("SumOfmaintenancemargin") <> "" OR
IsNull(Session("SumOfmaintenancemargin"))=true Then

Sqlstr=SqlStr+"SumOfmaintenancemargin="+Request.QueryString("SumOfmaintenancemargin") + ", "
End if
If Request.QueryString("opentradebalance") <> "" OR
IsNull(Session("opentradebalance"))=true Then
Sqlstr=SqlStr+"opentradebalance="+Request.QueryString("opentradebalance")
+ ", "
End if
SqlStr = Mid(SqlStr, 1, Len(SqlStr) - 2)
SqlStr = SqlStr + " WHERE accountnumber='"+ session("accountnumber")+ "'"
If Instr(sqlstr," SE ")<=0 Then
conntemp.Execute (SqlStr)
End if
SqlStr ="SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case ""
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
If rs.EOF = True Then
Response.redirect "1form.asp?cmd=New"
End If
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1

Case "First"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)

Case "Last"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("CurRec") = a
Session("NumOfRecs") = a
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While (a < Session("NumOfRecs")) And (rs.EOF <> True)
a = a + 1
rs.MoveNext
Wend

Case "Prev"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") - 1
If Session("CurRec") <= 0 Then
Session("CurRec") = Session("NumOfRecs")
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case "Next"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") + 1
If Session("CurRec") > Session("NumOfRecs") Then
Session("CurRec") = 1
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case "Del"
SqlStr = "DELETE FROM webtotalbalancebie30p WHERE accountnumber='"+
Session("accountnumber")+ "'"
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
response.redirect "1form.asp"

Case "Fromlist"
Session("CurRec") = 1
SqlStr1 = "SELECT Count(accountnumber) As TotalCount From
webtotalbalancebie30p"
Set Rs1 = conntemp.Execute(SqlStr1)
Session("NumOfRecs") = Rs1("TotalCount")
Rs1.Close
Set Rs1 = Nothing
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
While Trim(Session("accountnumber")) <> Trim(CStr(rs("accountnumber")))
Session("CurRec") = Session("CurRec") + 1
rs.MoveNext
Wend
End Select

If cmd <> "New" And cmd<>"Copy" Then
Session("accountnumber") = server.Urlencode(rs("accountnumber"))
Session("accountnumber") = rs("accountnumber")
Session("product") = rs("product")
Session("initialinvestment") = rs("initialinvestment")
Session("guaranteedequity") = rs("guaranteedequity")
Session("monthstartingbalance") = rs("monthstartingbalance")
Session("SumOfcontractvalue") = rs("SumOfcontractvalue")
Session("commission") = rs("commission")
Session("managementfeebasic") = rs("managementfeebasic")
Session("incentivefeetotal") = rs("incentivefeetotal")
Session("electronicfee") = rs("electronicfee")
Session("vat") = rs("vat")
Session("adjustment") = rs("adjustment")
Session("netliquidationbalance") = rs("netliquidationbalance")
Session("SumOfopenpl") = rs("SumOfopenpl")
Session("SumOfinitialmargin") = rs("SumOfinitialmargin")
Session("SumOfmaintenancemargin") = rs("SumOfmaintenancemargin")
Session("opentradebalance") = rs("opentradebalance")
rs.Close
Set rs = Nothing
End if

If cmd="New" Then
Session("accountnumber") = ""
Session("accountnumber") = ""
Session("product") = ""
Session("initialinvestment") = ""
Session("guaranteedequity") = ""
Session("monthstartingbalance") = ""
Session("SumOfcontractvalue") = ""
Session("commission") = ""
Session("managementfeebasic") = ""
Session("incentivefeetotal") = ""
Session("electronicfee") = ""
Session("vat") = ""
Session("adjustment") = ""
Session("netliquidationbalance") = ""
Session("SumOfopenpl") = ""
Session("SumOfinitialmargin") = ""
Session("SumOfmaintenancemargin") = ""
Session("opentradebalance") = ""
End If
conntemp.Close
Set conntemp = Nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="ATAF Version 6.1.0">
<title>webtotalbalancebie30p</title>
<base target="_self">
<link rel="stylesheet" type="text/css" href="globalcss.css">

<script Language="JavaScript">
function winopenexcel (sqlstr)
{
msg=open("","NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=150");
msg.location = "toexcel.asp?sqlstr="+sqlstr;
msg.focus()
}
</script>

</head>
<body class="formpage">
<table width="100%" border="0" height="100%">
<tr><td valign="top" align="middle"><td></tr>
<tr><td align="Left" valign="Middle" >
<form method="GET" action="1form.asp" name="webtotalbalancebie30p"
onSubmit="return Checkform(this);">
<table border="0" cellpadding="0" cellspacing="0" class="formpagetable">
<tr>
<td colspan="2" class="formpagetableheader" >
<table width="100%" border="0">
<tr>
<td align="left"><img border="0" src="lefttop.gif"></td>
<td class="formpagetableheader" style="border-style: solid; border-width: 0">
webtotalbalancebie30p
</td>
<td align="right"><input type="button" value="X" style="font-family:
Tahoma; font-weight: bold; font-size: 8pt"
onClick="parent.location='default.asp'" <%=ShowTextOnPic("Click to go back to
the main menu")%> ></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> accountnumber</td>
<td><input class="formpagetablefield" type="number" name="accountnumber"
size="50" Value="<%=trim(Session("accountnumber"))%>"></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> product</td>
<td><input class="formpagetablefield" type="text" name="product"
size="50" Value="<%=trim(Session("product"))%>"></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> guaranteedequity</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="guaranteedequity" size="8"
Value="<%=Session("guaranteedequity")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> monthstartingbalance</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="monthstartingbalance" size="8"
Value="<%=Session("monthstartingbalance")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> SumOfcontractvalue</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfcontractvalue" size="8"
Value="<%=Session("SumOfcontractvalue")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> commission</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="commission" size="8" style:"$#.##0,00;($#.##0,00)[Red]"
Value="<%=Session("commission")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> managementfeebasic</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="managementfeebasic" size="8"
Value="<%=Session("managementfeebasic")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> incentivefeetotal</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="incentivefeetotal" size="8"
Value="<%=Session("incentivefeetotal")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> electronicfee</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="electronicfee" size="8"
Value="<%=Session("electronicfee")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> vat</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="vat" size="8" Value="<%=Session("vat")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> adjustment</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="adjustment" size="8"
Value="<%=Session("adjustment")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> netliquidationbalance</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="netliquidationbalance" size="8"
Value="<%=Session("netliquidationbalance")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top" class="formpagetablelabel"> SumOfopenpl</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfopenpl" size="8"
Value="<%=Session("SumOfopenpl")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> SumOfinitialmargin</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfinitialmargin" size="8"
Value="<%=Session("SumOfinitialmargin")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> SumOfmaintenancemargin</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="SumOfmaintenancemargin" size="8"
Value="<%=Session("SumOfmaintenancemargin")%>"><font
class="formpagetablefield"> EUR</div></td>
</tr>
<tr>
<td align="left" valign="top"
class="formpagetablelabel"> opentradebalance</td>
<td class="formpagetablelabel"><input class="formpagetablefield"
type="number" name="opentradebalance" size="8"
Value="<%=Session("opentradebalance")%>"><font class="formpagetablefield">
EUR</div></td>
</tr>
<tr><td align="center" colspan="3">
 
G

Guest

Hi Thomas,
I asked before an they said with an acces databse it's no problem. It's a
chili soft on Apache server.
They only said that it doesn't support Front page coding with ASP.
The Database is shown in my ASP page which I created with ATAF. You can look
at:
http://www.bellfield-barna.com/New Folder/1form.asp
All Data is shown just in a wrong format.
Please explain, if the data is shown than my ISP server is exepting the
coding. Do I not only find a way to format the datafields?
And that was my question before to help.
I am a bid confused and would be very thankfull for an explanation.
Thanks
Klaus



Thomas A. Rowe said:
You can not use an Access database under Unix/Linux Operating Systems.

You need to review the documentation for the ASP engine that is installed under Apache to see what
ASP tags are supports.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Amateur said:
Dear Sirs
I created my databse in Access but my server is an Apache server and not
accepting ASP codes from Frontpage.
Sowith I used ATAF software to create the code. My server is accepting that,
but the following happened.
My ASP page shows the data but not like in the data table (Access). I would
like that the numbers have a 2 digit decimal behind the comma i.e.123.456,30
and
negative numbers should be in red and in brackets i.e. (123.456,30).
So the format should be: $#.##0,00;($#.##0,00)[Red]
Please look at my code because I cannot set the "formpagetablefield" to the
above mentioned. Please tell me where and what I have to do to get my field
correctly formatted.
Many thanks
Klaus
*********************************************************
Here the complete code:
<!--#include File ="globalsub.asp"-->
<%

On Error Resume Next
cmd = Request.QueryString("cmd")
Session("accountnumber") = Request.QueryString("accountnumber")
Session("accountnumber") = Replace(session("accountnumber"),"%2D","-")

Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

Function CountRecs(TableName, FieldName, NoOfRecs)
SqlStrCount = "Select Count(" + FieldName + ") As NoOfRecs From " +
TableName
Set rscount = conntemp.Execute(SqlStrCount)
NoOfRecs = rscount("NoOfRecs")
CountRecs = A
rscount.Close
End Function

Select Case cmd

Case "SaveNew"
FieldStr=" ("
ValueStr = " VALUES ("
If Request.QueryString("accountnumber")<>"" Then
FieldStr=FieldStr+ "accountnumber, "

ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("accountnumber"))+"', "
End if
If Request.QueryString("product")<>"" Then
FieldStr=FieldStr+ "product, "
ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("product"))+"', "
End if
If Request.QueryString("initialinvestment")<>"" Then
FieldStr=FieldStr+ "initialinvestment, "
ValueStr=ValueStr+Request.QueryString("initialinvestment")+", "
End if
If Request.QueryString("guaranteedequity")<>"" Then
FieldStr=FieldStr+ "guaranteedequity, "
ValueStr=ValueStr+Request.QueryString("guaranteedequity")+", "
End if
If Request.QueryString("monthstartingbalance")<>"" Then
FieldStr=FieldStr+ "monthstartingbalance, "
ValueStr=ValueStr+Request.QueryString("monthstartingbalance")+", "
End if
If Request.QueryString("SumOfcontractvalue")<>"" Then
FieldStr=FieldStr+ "SumOfcontractvalue, "
ValueStr=ValueStr+Request.QueryString("SumOfcontractvalue")+", "
End if
If Request.QueryString("commission")<>"" Then
FieldStr=FieldStr+ "commission, "
ValueStr=ValueStr+Request.QueryString("commission")+", "
End if
If Request.QueryString("managementfeebasic")<>"" Then
FieldStr=FieldStr+ "managementfeebasic, "
ValueStr=ValueStr+Request.QueryString("managementfeebasic")+", "
End if
If Request.QueryString("incentivefeetotal")<>"" Then
FieldStr=FieldStr+ "incentivefeetotal, "
ValueStr=ValueStr+Request.QueryString("incentivefeetotal")+", "
End if
If Request.QueryString("electronicfee")<>"" Then
FieldStr=FieldStr+ "electronicfee, "
ValueStr=ValueStr+Request.QueryString("electronicfee")+", "
End if
If Request.QueryString("vat")<>"" Then
FieldStr=FieldStr+ "vat, "
ValueStr=ValueStr+Request.QueryString("vat")+", "
End if
If Request.QueryString("adjustment")<>"" Then
FieldStr=FieldStr+ "adjustment, "
ValueStr=ValueStr+Request.QueryString("adjustment")+", "
End if
If Request.QueryString("netliquidationbalance")<>"" Then
FieldStr=FieldStr+ "netliquidationbalance, "
ValueStr=ValueStr+Request.QueryString("netliquidationbalance")+", "
End if
If Request.QueryString("SumOfopenpl")<>"" Then
FieldStr=FieldStr+ "SumOfopenpl, "
ValueStr=ValueStr+Request.QueryString("SumOfopenpl")+", "
End if
If Request.QueryString("SumOfinitialmargin")<>"" Then
FieldStr=FieldStr+ "SumOfinitialmargin, "
ValueStr=ValueStr+Request.QueryString("SumOfinitialmargin")+", "
End if
If Request.QueryString("SumOfmaintenancemargin")<>"" Then
FieldStr=FieldStr+ "SumOfmaintenancemargin, "
ValueStr=ValueStr+Request.QueryString("SumOfmaintenancemargin")+", "
End if
If Request.QueryString("opentradebalance")<>"" Then
FieldStr=FieldStr+ "opentradebalance, "
ValueStr=ValueStr+Request.QueryString("opentradebalance")+", "
End if
FieldStr = Mid(FieldStr, 1, Len(FieldStr) - 2) + ")"
ValueStr = Mid(ValueStr, 1, Len(ValueStr) - 2) + ")"
SqlStr = "Insert Into webtotalbalancebie30p" + FieldStr + ValueStr
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
If Err <> 0 Then
Session("Err") = Err.Number
Session("Description") = Err.Description
Session("HelpContext") = Err.HelpContext
Session("HelpFile;") = Err.HelpFile
Session("Source") = Err.Source
For Each Item In request.querystring
Session(Item) = request.querystring(Item)
Next
response.redirect "1form.asp?"+ Replace(request.querystring, "SaveNew",
"Copy")
End If
response.redirect "1form.asp?cmd=Last"

Case "Save"
SqlStr = "UPDATE webtotalbalancebie30p SET "
If Request.QueryString("accountnumber") <> Session("accountnumber") OR
IsNull(Session("accountnumber"))=true Then

Sqlstr=SqlStr+"accountnumber='"+FixDbFieldSave(Request.QueryString("accountnumber")) + "', "
End if
If Request.QueryString("product") <> Session("product") OR
IsNull(Session("product"))=true Then
Sqlstr=SqlStr+"product='"+FixDbFieldSave(Request.QueryString("product")) +
"', "
End if
If Request.QueryString("initialinvestment") <> "" OR
IsNull(Session("initialinvestment"))=true Then

Sqlstr=SqlStr+"initialinvestment="+Request.QueryString("initialinvestment") +
", "
End if
If Request.QueryString("guaranteedequity") <> "" OR
IsNull(Session("guaranteedequity"))=true Then
Sqlstr=SqlStr+"guaranteedequity="+Request.QueryString("guaranteedequity")
+ ", "
End if
If Request.QueryString("monthstartingbalance") <> "" OR
IsNull(Session("monthstartingbalance"))=true Then

Sqlstr=SqlStr+"monthstartingbalance="+Request.QueryString("monthstartingbalance") + ", "
End if
If Request.QueryString("SumOfcontractvalue") <> "" OR
IsNull(Session("SumOfcontractvalue"))=true Then

Sqlstr=SqlStr+"SumOfcontractvalue="+Request.QueryString("SumOfcontractvalue")
+ ", "
End if
If Request.QueryString("commission") <> "" OR
IsNull(Session("commission"))=true Then
Sqlstr=SqlStr+"commission="+Request.QueryString("commission") + ", "
End if
If Request.QueryString("managementfeebasic") <> "" OR
IsNull(Session("managementfeebasic"))=true Then

Sqlstr=SqlStr+"managementfeebasic="+Request.QueryString("managementfeebasic")
+ ", "
End if
If Request.QueryString("incentivefeetotal") <> "" OR
IsNull(Session("incentivefeetotal"))=true Then

Sqlstr=SqlStr+"incentivefeetotal="+Request.QueryString("incentivefeetotal") +
", "
End if
If Request.QueryString("electronicfee") <> "" OR
IsNull(Session("electronicfee"))=true Then
Sqlstr=SqlStr+"electronicfee="+Request.QueryString("electronicfee") + ", "
End if
If Request.QueryString("vat") <> "" OR IsNull(Session("vat"))=true Then
Sqlstr=SqlStr+"vat="+Request.QueryString("vat") + ", "
End if
If Request.QueryString("adjustment") <> "" OR
IsNull(Session("adjustment"))=true Then
Sqlstr=SqlStr+"adjustment="+Request.QueryString("adjustment") + ", "
End if
If Request.QueryString("netliquidationbalance") <> "" OR
IsNull(Session("netliquidationbalance"))=true Then

Sqlstr=SqlStr+"netliquidationbalance="+Request.QueryString("netliquidationbalance") + ", "
End if
If Request.QueryString("SumOfopenpl") <> "" OR
IsNull(Session("SumOfopenpl"))=true Then
Sqlstr=SqlStr+"SumOfopenpl="+Request.QueryString("SumOfopenpl") + ", "
End if
If Request.QueryString("SumOfinitialmargin") <> "" OR
IsNull(Session("SumOfinitialmargin"))=true Then

Sqlstr=SqlStr+"SumOfinitialmargin="+Request.QueryString("SumOfinitialmargin")
+ ", "
End if
If Request.QueryString("SumOfmaintenancemargin") <> "" OR
IsNull(Session("SumOfmaintenancemargin"))=true Then

Sqlstr=SqlStr+"SumOfmaintenancemargin="+Request.QueryString("SumOfmaintenancemargin") + ", "
End if
If Request.QueryString("opentradebalance") <> "" OR
IsNull(Session("opentradebalance"))=true Then
Sqlstr=SqlStr+"opentradebalance="+Request.QueryString("opentradebalance")
+ ", "
End if
SqlStr = Mid(SqlStr, 1, Len(SqlStr) - 2)
SqlStr = SqlStr + " WHERE accountnumber='"+ session("accountnumber")+ "'"
If Instr(sqlstr," SE ")<=0 Then
conntemp.Execute (SqlStr)
End if
SqlStr ="SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case ""
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
If rs.EOF = True Then
Response.redirect "1form.asp?cmd=New"
End If
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1

Case "First"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)

Case "Last"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("CurRec") = a
Session("NumOfRecs") = a
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While (a < Session("NumOfRecs")) And (rs.EOF <> True)
a = a + 1
rs.MoveNext
Wend

Case "Prev"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") - 1
If Session("CurRec") <= 0 Then
Session("CurRec") = Session("NumOfRecs")
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case "Next"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") + 1
If Session("CurRec") > Session("NumOfRecs") Then
Session("CurRec") = 1
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
 
T

Thomas A. Rowe

If you visit the Chilisoft site and look at documentation, you will see that Access is not support.

http://developers.sun.com/asp/kb/kb_display_200110241.html
http://www.sun.com/software/chilisoft/features_benefits.xml?printFriendly=true

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Amateur said:
Hi Thomas,
I asked before an they said with an acces databse it's no problem. It's a
chili soft on Apache server.
They only said that it doesn't support Front page coding with ASP.
The Database is shown in my ASP page which I created with ATAF. You can look
at:
http://www.bellfield-barna.com/New Folder/1form.asp
All Data is shown just in a wrong format.
Please explain, if the data is shown than my ISP server is exepting the
coding. Do I not only find a way to format the datafields?
And that was my question before to help.
I am a bid confused and would be very thankfull for an explanation.
Thanks
Klaus



Thomas A. Rowe said:
You can not use an Access database under Unix/Linux Operating Systems.

You need to review the documentation for the ASP engine that is installed under Apache to see
what
ASP tags are supports.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Amateur said:
Dear Sirs
I created my databse in Access but my server is an Apache server and not
accepting ASP codes from Frontpage.
Sowith I used ATAF software to create the code. My server is accepting that,
but the following happened.
My ASP page shows the data but not like in the data table (Access). I would
like that the numbers have a 2 digit decimal behind the comma i.e.123.456,30
and
negative numbers should be in red and in brackets i.e. (123.456,30).
So the format should be: $#.##0,00;($#.##0,00)[Red]
Please look at my code because I cannot set the "formpagetablefield" to the
above mentioned. Please tell me where and what I have to do to get my field
correctly formatted.
Many thanks
Klaus
*********************************************************
Here the complete code:
<!--#include File ="globalsub.asp"-->
<%

On Error Resume Next
cmd = Request.QueryString("cmd")
Session("accountnumber") = Request.QueryString("accountnumber")
Session("accountnumber") = Replace(session("accountnumber"),"%2D","-")

Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

Function CountRecs(TableName, FieldName, NoOfRecs)
SqlStrCount = "Select Count(" + FieldName + ") As NoOfRecs From " +
TableName
Set rscount = conntemp.Execute(SqlStrCount)
NoOfRecs = rscount("NoOfRecs")
CountRecs = A
rscount.Close
End Function

Select Case cmd

Case "SaveNew"
FieldStr=" ("
ValueStr = " VALUES ("
If Request.QueryString("accountnumber")<>"" Then
FieldStr=FieldStr+ "accountnumber, "

ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("accountnumber"))+"', "
End if
If Request.QueryString("product")<>"" Then
FieldStr=FieldStr+ "product, "
ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("product"))+"', "
End if
If Request.QueryString("initialinvestment")<>"" Then
FieldStr=FieldStr+ "initialinvestment, "
ValueStr=ValueStr+Request.QueryString("initialinvestment")+", "
End if
If Request.QueryString("guaranteedequity")<>"" Then
FieldStr=FieldStr+ "guaranteedequity, "
ValueStr=ValueStr+Request.QueryString("guaranteedequity")+", "
End if
If Request.QueryString("monthstartingbalance")<>"" Then
FieldStr=FieldStr+ "monthstartingbalance, "
ValueStr=ValueStr+Request.QueryString("monthstartingbalance")+", "
End if
If Request.QueryString("SumOfcontractvalue")<>"" Then
FieldStr=FieldStr+ "SumOfcontractvalue, "
ValueStr=ValueStr+Request.QueryString("SumOfcontractvalue")+", "
End if
If Request.QueryString("commission")<>"" Then
FieldStr=FieldStr+ "commission, "
ValueStr=ValueStr+Request.QueryString("commission")+", "
End if
If Request.QueryString("managementfeebasic")<>"" Then
FieldStr=FieldStr+ "managementfeebasic, "
ValueStr=ValueStr+Request.QueryString("managementfeebasic")+", "
End if
If Request.QueryString("incentivefeetotal")<>"" Then
FieldStr=FieldStr+ "incentivefeetotal, "
ValueStr=ValueStr+Request.QueryString("incentivefeetotal")+", "
End if
If Request.QueryString("electronicfee")<>"" Then
FieldStr=FieldStr+ "electronicfee, "
ValueStr=ValueStr+Request.QueryString("electronicfee")+", "
End if
If Request.QueryString("vat")<>"" Then
FieldStr=FieldStr+ "vat, "
ValueStr=ValueStr+Request.QueryString("vat")+", "
End if
If Request.QueryString("adjustment")<>"" Then
FieldStr=FieldStr+ "adjustment, "
ValueStr=ValueStr+Request.QueryString("adjustment")+", "
End if
If Request.QueryString("netliquidationbalance")<>"" Then
FieldStr=FieldStr+ "netliquidationbalance, "
ValueStr=ValueStr+Request.QueryString("netliquidationbalance")+", "
End if
If Request.QueryString("SumOfopenpl")<>"" Then
FieldStr=FieldStr+ "SumOfopenpl, "
ValueStr=ValueStr+Request.QueryString("SumOfopenpl")+", "
End if
If Request.QueryString("SumOfinitialmargin")<>"" Then
FieldStr=FieldStr+ "SumOfinitialmargin, "
ValueStr=ValueStr+Request.QueryString("SumOfinitialmargin")+", "
End if
If Request.QueryString("SumOfmaintenancemargin")<>"" Then
FieldStr=FieldStr+ "SumOfmaintenancemargin, "
ValueStr=ValueStr+Request.QueryString("SumOfmaintenancemargin")+", "
End if
If Request.QueryString("opentradebalance")<>"" Then
FieldStr=FieldStr+ "opentradebalance, "
ValueStr=ValueStr+Request.QueryString("opentradebalance")+", "
End if
FieldStr = Mid(FieldStr, 1, Len(FieldStr) - 2) + ")"
ValueStr = Mid(ValueStr, 1, Len(ValueStr) - 2) + ")"
SqlStr = "Insert Into webtotalbalancebie30p" + FieldStr + ValueStr
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
If Err <> 0 Then
Session("Err") = Err.Number
Session("Description") = Err.Description
Session("HelpContext") = Err.HelpContext
Session("HelpFile;") = Err.HelpFile
Session("Source") = Err.Source
For Each Item In request.querystring
Session(Item) = request.querystring(Item)
Next
response.redirect "1form.asp?"+ Replace(request.querystring, "SaveNew",
"Copy")
End If
response.redirect "1form.asp?cmd=Last"

Case "Save"
SqlStr = "UPDATE webtotalbalancebie30p SET "
If Request.QueryString("accountnumber") <> Session("accountnumber") OR
IsNull(Session("accountnumber"))=true Then

Sqlstr=SqlStr+"accountnumber='"+FixDbFieldSave(Request.QueryString("accountnumber")) + "', "
End if
If Request.QueryString("product") <> Session("product") OR
IsNull(Session("product"))=true Then
Sqlstr=SqlStr+"product='"+FixDbFieldSave(Request.QueryString("product")) +
"', "
End if
If Request.QueryString("initialinvestment") <> "" OR
IsNull(Session("initialinvestment"))=true Then

Sqlstr=SqlStr+"initialinvestment="+Request.QueryString("initialinvestment") +
", "
End if
If Request.QueryString("guaranteedequity") <> "" OR
IsNull(Session("guaranteedequity"))=true Then
Sqlstr=SqlStr+"guaranteedequity="+Request.QueryString("guaranteedequity")
+ ", "
End if
If Request.QueryString("monthstartingbalance") <> "" OR
IsNull(Session("monthstartingbalance"))=true Then

Sqlstr=SqlStr+"monthstartingbalance="+Request.QueryString("monthstartingbalance") + ", "
End if
If Request.QueryString("SumOfcontractvalue") <> "" OR
IsNull(Session("SumOfcontractvalue"))=true Then

Sqlstr=SqlStr+"SumOfcontractvalue="+Request.QueryString("SumOfcontractvalue")
+ ", "
End if
If Request.QueryString("commission") <> "" OR
IsNull(Session("commission"))=true Then
Sqlstr=SqlStr+"commission="+Request.QueryString("commission") + ", "
End if
If Request.QueryString("managementfeebasic") <> "" OR
IsNull(Session("managementfeebasic"))=true Then

Sqlstr=SqlStr+"managementfeebasic="+Request.QueryString("managementfeebasic")
+ ", "
End if
If Request.QueryString("incentivefeetotal") <> "" OR
IsNull(Session("incentivefeetotal"))=true Then

Sqlstr=SqlStr+"incentivefeetotal="+Request.QueryString("incentivefeetotal") +
", "
End if
If Request.QueryString("electronicfee") <> "" OR
IsNull(Session("electronicfee"))=true Then
Sqlstr=SqlStr+"electronicfee="+Request.QueryString("electronicfee") + ", "
End if
If Request.QueryString("vat") <> "" OR IsNull(Session("vat"))=true Then
Sqlstr=SqlStr+"vat="+Request.QueryString("vat") + ", "
End if
If Request.QueryString("adjustment") <> "" OR
IsNull(Session("adjustment"))=true Then
Sqlstr=SqlStr+"adjustment="+Request.QueryString("adjustment") + ", "
End if
If Request.QueryString("netliquidationbalance") <> "" OR
IsNull(Session("netliquidationbalance"))=true Then

Sqlstr=SqlStr+"netliquidationbalance="+Request.QueryString("netliquidationbalance") + ", "
End if
If Request.QueryString("SumOfopenpl") <> "" OR
IsNull(Session("SumOfopenpl"))=true Then
Sqlstr=SqlStr+"SumOfopenpl="+Request.QueryString("SumOfopenpl") + ", "
End if
If Request.QueryString("SumOfinitialmargin") <> "" OR
IsNull(Session("SumOfinitialmargin"))=true Then

Sqlstr=SqlStr+"SumOfinitialmargin="+Request.QueryString("SumOfinitialmargin")
+ ", "
End if
If Request.QueryString("SumOfmaintenancemargin") <> "" OR
IsNull(Session("SumOfmaintenancemargin"))=true Then

Sqlstr=SqlStr+"SumOfmaintenancemargin="+Request.QueryString("SumOfmaintenancemargin") + ", "
End if
If Request.QueryString("opentradebalance") <> "" OR
IsNull(Session("opentradebalance"))=true Then
Sqlstr=SqlStr+"opentradebalance="+Request.QueryString("opentradebalance")
+ ", "
End if
SqlStr = Mid(SqlStr, 1, Len(SqlStr) - 2)
SqlStr = SqlStr + " WHERE accountnumber='"+ session("accountnumber")+ "'"
If Instr(sqlstr," SE ")<=0 Then
conntemp.Execute (SqlStr)
End if
SqlStr ="SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case ""
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
If rs.EOF = True Then
Response.redirect "1form.asp?cmd=New"
End If
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1

Case "First"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)

Case "Last"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("CurRec") = a
Session("NumOfRecs") = a
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While (a < Session("NumOfRecs")) And (rs.EOF <> True)
a = a + 1
rs.MoveNext
Wend

Case "Prev"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") - 1
If Session("CurRec") <= 0 Then
Session("CurRec") = Session("NumOfRecs")
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case "Next"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = Session("CurRec") + 1
If Session("CurRec") > Session("NumOfRecs") Then
Session("CurRec") = 1
End If
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
 
G

Guest

Dear Thomas,
I just would like to let you know that your information is somehow not
correct. I am not a specialist like you are but I just tried this in the
formpagefield:
Value="<%=formatCurrency(Session("initialinvestment"),2)%>"
It's working, I see now my 2 digits behind the comma.
Do you have any idea how to get now negative numbers in red and in brackets?
Thanks for your help
Klaus

Thomas A. Rowe said:
If you visit the Chilisoft site and look at documentation, you will see that Access is not support.

http://developers.sun.com/asp/kb/kb_display_200110241.html
http://www.sun.com/software/chilisoft/features_benefits.xml?printFriendly=true

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Amateur said:
Hi Thomas,
I asked before an they said with an acces databse it's no problem. It's a
chili soft on Apache server.
They only said that it doesn't support Front page coding with ASP.
The Database is shown in my ASP page which I created with ATAF. You can look
at:
http://www.bellfield-barna.com/New Folder/1form.asp
All Data is shown just in a wrong format.
Please explain, if the data is shown than my ISP server is exepting the
coding. Do I not only find a way to format the datafields?
And that was my question before to help.
I am a bid confused and would be very thankfull for an explanation.
Thanks
Klaus



Thomas A. Rowe said:
You can not use an Access database under Unix/Linux Operating Systems.

You need to review the documentation for the ASP engine that is installed under Apache to see
what
ASP tags are supports.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Dear Sirs
I created my databse in Access but my server is an Apache server and not
accepting ASP codes from Frontpage.
Sowith I used ATAF software to create the code. My server is accepting that,
but the following happened.
My ASP page shows the data but not like in the data table (Access). I would
like that the numbers have a 2 digit decimal behind the comma i.e.123.456,30
and
negative numbers should be in red and in brackets i.e. (123.456,30).
So the format should be: $#.##0,00;($#.##0,00)[Red]
Please look at my code because I cannot set the "formpagetablefield" to the
above mentioned. Please tell me where and what I have to do to get my field
correctly formatted.
Many thanks
Klaus
*********************************************************
Here the complete code:
<!--#include File ="globalsub.asp"-->
<%

On Error Resume Next
cmd = Request.QueryString("cmd")
Session("accountnumber") = Request.QueryString("accountnumber")
Session("accountnumber") = Replace(session("accountnumber"),"%2D","-")

Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

Function CountRecs(TableName, FieldName, NoOfRecs)
SqlStrCount = "Select Count(" + FieldName + ") As NoOfRecs From " +
TableName
Set rscount = conntemp.Execute(SqlStrCount)
NoOfRecs = rscount("NoOfRecs")
CountRecs = A
rscount.Close
End Function

Select Case cmd

Case "SaveNew"
FieldStr=" ("
ValueStr = " VALUES ("
If Request.QueryString("accountnumber")<>"" Then
FieldStr=FieldStr+ "accountnumber, "

ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("accountnumber"))+"', "
End if
If Request.QueryString("product")<>"" Then
FieldStr=FieldStr+ "product, "
ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("product"))+"', "
End if
If Request.QueryString("initialinvestment")<>"" Then
FieldStr=FieldStr+ "initialinvestment, "
ValueStr=ValueStr+Request.QueryString("initialinvestment")+", "
End if
If Request.QueryString("guaranteedequity")<>"" Then
FieldStr=FieldStr+ "guaranteedequity, "
ValueStr=ValueStr+Request.QueryString("guaranteedequity")+", "
End if
If Request.QueryString("monthstartingbalance")<>"" Then
FieldStr=FieldStr+ "monthstartingbalance, "
ValueStr=ValueStr+Request.QueryString("monthstartingbalance")+", "
End if
If Request.QueryString("SumOfcontractvalue")<>"" Then
FieldStr=FieldStr+ "SumOfcontractvalue, "
ValueStr=ValueStr+Request.QueryString("SumOfcontractvalue")+", "
End if
If Request.QueryString("commission")<>"" Then
FieldStr=FieldStr+ "commission, "
ValueStr=ValueStr+Request.QueryString("commission")+", "
End if
If Request.QueryString("managementfeebasic")<>"" Then
FieldStr=FieldStr+ "managementfeebasic, "
ValueStr=ValueStr+Request.QueryString("managementfeebasic")+", "
End if
If Request.QueryString("incentivefeetotal")<>"" Then
FieldStr=FieldStr+ "incentivefeetotal, "
ValueStr=ValueStr+Request.QueryString("incentivefeetotal")+", "
End if
If Request.QueryString("electronicfee")<>"" Then
FieldStr=FieldStr+ "electronicfee, "
ValueStr=ValueStr+Request.QueryString("electronicfee")+", "
End if
If Request.QueryString("vat")<>"" Then
FieldStr=FieldStr+ "vat, "
ValueStr=ValueStr+Request.QueryString("vat")+", "
End if
If Request.QueryString("adjustment")<>"" Then
FieldStr=FieldStr+ "adjustment, "
ValueStr=ValueStr+Request.QueryString("adjustment")+", "
End if
If Request.QueryString("netliquidationbalance")<>"" Then
FieldStr=FieldStr+ "netliquidationbalance, "
ValueStr=ValueStr+Request.QueryString("netliquidationbalance")+", "
End if
If Request.QueryString("SumOfopenpl")<>"" Then
FieldStr=FieldStr+ "SumOfopenpl, "
ValueStr=ValueStr+Request.QueryString("SumOfopenpl")+", "
End if
If Request.QueryString("SumOfinitialmargin")<>"" Then
FieldStr=FieldStr+ "SumOfinitialmargin, "
ValueStr=ValueStr+Request.QueryString("SumOfinitialmargin")+", "
End if
If Request.QueryString("SumOfmaintenancemargin")<>"" Then
FieldStr=FieldStr+ "SumOfmaintenancemargin, "
ValueStr=ValueStr+Request.QueryString("SumOfmaintenancemargin")+", "
End if
If Request.QueryString("opentradebalance")<>"" Then
FieldStr=FieldStr+ "opentradebalance, "
ValueStr=ValueStr+Request.QueryString("opentradebalance")+", "
End if
FieldStr = Mid(FieldStr, 1, Len(FieldStr) - 2) + ")"
ValueStr = Mid(ValueStr, 1, Len(ValueStr) - 2) + ")"
SqlStr = "Insert Into webtotalbalancebie30p" + FieldStr + ValueStr
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
If Err <> 0 Then
Session("Err") = Err.Number
Session("Description") = Err.Description
Session("HelpContext") = Err.HelpContext
Session("HelpFile;") = Err.HelpFile
Session("Source") = Err.Source
For Each Item In request.querystring
Session(Item) = request.querystring(Item)
Next
response.redirect "1form.asp?"+ Replace(request.querystring, "SaveNew",
"Copy")
End If
response.redirect "1form.asp?cmd=Last"

Case "Save"
SqlStr = "UPDATE webtotalbalancebie30p SET "
If Request.QueryString("accountnumber") <> Session("accountnumber") OR
IsNull(Session("accountnumber"))=true Then

Sqlstr=SqlStr+"accountnumber='"+FixDbFieldSave(Request.QueryString("accountnumber")) + "', "
End if
If Request.QueryString("product") <> Session("product") OR
IsNull(Session("product"))=true Then
Sqlstr=SqlStr+"product='"+FixDbFieldSave(Request.QueryString("product")) +
"', "
End if
If Request.QueryString("initialinvestment") <> "" OR
IsNull(Session("initialinvestment"))=true Then

Sqlstr=SqlStr+"initialinvestment="+Request.QueryString("initialinvestment") +
", "
End if
If Request.QueryString("guaranteedequity") <> "" OR
IsNull(Session("guaranteedequity"))=true Then
Sqlstr=SqlStr+"guaranteedequity="+Request.QueryString("guaranteedequity")
+ ", "
End if
If Request.QueryString("monthstartingbalance") <> "" OR
IsNull(Session("monthstartingbalance"))=true Then

Sqlstr=SqlStr+"monthstartingbalance="+Request.QueryString("monthstartingbalance") + ", "
End if
If Request.QueryString("SumOfcontractvalue") <> "" OR
IsNull(Session("SumOfcontractvalue"))=true Then

Sqlstr=SqlStr+"SumOfcontractvalue="+Request.QueryString("SumOfcontractvalue")
+ ", "
End if
If Request.QueryString("commission") <> "" OR
IsNull(Session("commission"))=true Then
Sqlstr=SqlStr+"commission="+Request.QueryString("commission") + ", "
End if
If Request.QueryString("managementfeebasic") <> "" OR
IsNull(Session("managementfeebasic"))=true Then

Sqlstr=SqlStr+"managementfeebasic="+Request.QueryString("managementfeebasic")
+ ", "
End if
If Request.QueryString("incentivefeetotal") <> "" OR
IsNull(Session("incentivefeetotal"))=true Then

Sqlstr=SqlStr+"incentivefeetotal="+Request.QueryString("incentivefeetotal") +
", "
End if
If Request.QueryString("electronicfee") <> "" OR
IsNull(Session("electronicfee"))=true Then
Sqlstr=SqlStr+"electronicfee="+Request.QueryString("electronicfee") + ", "
End if
If Request.QueryString("vat") <> "" OR IsNull(Session("vat"))=true Then
Sqlstr=SqlStr+"vat="+Request.QueryString("vat") + ", "
End if
If Request.QueryString("adjustment") <> "" OR
IsNull(Session("adjustment"))=true Then
Sqlstr=SqlStr+"adjustment="+Request.QueryString("adjustment") + ", "
End if
If Request.QueryString("netliquidationbalance") <> "" OR
IsNull(Session("netliquidationbalance"))=true Then

Sqlstr=SqlStr+"netliquidationbalance="+Request.QueryString("netliquidationbalance") + ", "
End if
If Request.QueryString("SumOfopenpl") <> "" OR
IsNull(Session("SumOfopenpl"))=true Then
Sqlstr=SqlStr+"SumOfopenpl="+Request.QueryString("SumOfopenpl") + ", "
End if
If Request.QueryString("SumOfinitialmargin") <> "" OR
IsNull(Session("SumOfinitialmargin"))=true Then

Sqlstr=SqlStr+"SumOfinitialmargin="+Request.QueryString("SumOfinitialmargin")
+ ", "
End if
If Request.QueryString("SumOfmaintenancemargin") <> "" OR
IsNull(Session("SumOfmaintenancemargin"))=true Then

Sqlstr=SqlStr+"SumOfmaintenancemargin="+Request.QueryString("SumOfmaintenancemargin") + ", "
End if
If Request.QueryString("opentradebalance") <> "" OR
IsNull(Session("opentradebalance"))=true Then
Sqlstr=SqlStr+"opentradebalance="+Request.QueryString("opentradebalance")
+ ", "
End if
SqlStr = Mid(SqlStr, 1, Len(SqlStr) - 2)
SqlStr = SqlStr + " WHERE accountnumber='"+ session("accountnumber")+ "'"
If Instr(sqlstr," SE ")<=0 Then
conntemp.Execute (SqlStr)
End if
SqlStr ="SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case ""
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
If rs.EOF = True Then
Response.redirect "1form.asp?cmd=New"
End If
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1

Case "First"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
 
T

Thomas A. Rowe

My comment is based on the Sun Chilisoft documentation..

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Amateur said:
Dear Thomas,
I just would like to let you know that your information is somehow not
correct. I am not a specialist like you are but I just tried this in the
formpagefield:
Value="<%=formatCurrency(Session("initialinvestment"),2)%>"
It's working, I see now my 2 digits behind the comma.
Do you have any idea how to get now negative numbers in red and in brackets?
Thanks for your help
Klaus

Thomas A. Rowe said:
If you visit the Chilisoft site and look at documentation, you will see that Access is not
support.

http://developers.sun.com/asp/kb/kb_display_200110241.html
http://www.sun.com/software/chilisoft/features_benefits.xml?printFriendly=true

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Amateur said:
Hi Thomas,
I asked before an they said with an acces databse it's no problem. It's a
chili soft on Apache server.
They only said that it doesn't support Front page coding with ASP.
The Database is shown in my ASP page which I created with ATAF. You can look
at:
http://www.bellfield-barna.com/New Folder/1form.asp
All Data is shown just in a wrong format.
Please explain, if the data is shown than my ISP server is exepting the
coding. Do I not only find a way to format the datafields?
And that was my question before to help.
I am a bid confused and would be very thankfull for an explanation.
Thanks
Klaus



:

You can not use an Access database under Unix/Linux Operating Systems.

You need to review the documentation for the ASP engine that is installed under Apache to see
what
ASP tags are supports.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


Dear Sirs
I created my databse in Access but my server is an Apache server and not
accepting ASP codes from Frontpage.
Sowith I used ATAF software to create the code. My server is accepting that,
but the following happened.
My ASP page shows the data but not like in the data table (Access). I would
like that the numbers have a 2 digit decimal behind the comma i.e.123.456,30
and
negative numbers should be in red and in brackets i.e. (123.456,30).
So the format should be: $#.##0,00;($#.##0,00)[Red]
Please look at my code because I cannot set the "formpagetablefield" to the
above mentioned. Please tell me where and what I have to do to get my field
correctly formatted.
Many thanks
Klaus
*********************************************************
Here the complete code:
<!--#include File ="globalsub.asp"-->
<%

On Error Resume Next
cmd = Request.QueryString("cmd")
Session("accountnumber") = Request.QueryString("accountnumber")
Session("accountnumber") = Replace(session("accountnumber"),"%2D","-")

Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

Function CountRecs(TableName, FieldName, NoOfRecs)
SqlStrCount = "Select Count(" + FieldName + ") As NoOfRecs From " +
TableName
Set rscount = conntemp.Execute(SqlStrCount)
NoOfRecs = rscount("NoOfRecs")
CountRecs = A
rscount.Close
End Function

Select Case cmd

Case "SaveNew"
FieldStr=" ("
ValueStr = " VALUES ("
If Request.QueryString("accountnumber")<>"" Then
FieldStr=FieldStr+ "accountnumber, "

ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("accountnumber"))+"', "
End if
If Request.QueryString("product")<>"" Then
FieldStr=FieldStr+ "product, "
ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("product"))+"', "
End if
If Request.QueryString("initialinvestment")<>"" Then
FieldStr=FieldStr+ "initialinvestment, "
ValueStr=ValueStr+Request.QueryString("initialinvestment")+", "
End if
If Request.QueryString("guaranteedequity")<>"" Then
FieldStr=FieldStr+ "guaranteedequity, "
ValueStr=ValueStr+Request.QueryString("guaranteedequity")+", "
End if
If Request.QueryString("monthstartingbalance")<>"" Then
FieldStr=FieldStr+ "monthstartingbalance, "
ValueStr=ValueStr+Request.QueryString("monthstartingbalance")+", "
End if
If Request.QueryString("SumOfcontractvalue")<>"" Then
FieldStr=FieldStr+ "SumOfcontractvalue, "
ValueStr=ValueStr+Request.QueryString("SumOfcontractvalue")+", "
End if
If Request.QueryString("commission")<>"" Then
FieldStr=FieldStr+ "commission, "
ValueStr=ValueStr+Request.QueryString("commission")+", "
End if
If Request.QueryString("managementfeebasic")<>"" Then
FieldStr=FieldStr+ "managementfeebasic, "
ValueStr=ValueStr+Request.QueryString("managementfeebasic")+", "
End if
If Request.QueryString("incentivefeetotal")<>"" Then
FieldStr=FieldStr+ "incentivefeetotal, "
ValueStr=ValueStr+Request.QueryString("incentivefeetotal")+", "
End if
If Request.QueryString("electronicfee")<>"" Then
FieldStr=FieldStr+ "electronicfee, "
ValueStr=ValueStr+Request.QueryString("electronicfee")+", "
End if
If Request.QueryString("vat")<>"" Then
FieldStr=FieldStr+ "vat, "
ValueStr=ValueStr+Request.QueryString("vat")+", "
End if
If Request.QueryString("adjustment")<>"" Then
FieldStr=FieldStr+ "adjustment, "
ValueStr=ValueStr+Request.QueryString("adjustment")+", "
End if
If Request.QueryString("netliquidationbalance")<>"" Then
FieldStr=FieldStr+ "netliquidationbalance, "
ValueStr=ValueStr+Request.QueryString("netliquidationbalance")+", "
End if
If Request.QueryString("SumOfopenpl")<>"" Then
FieldStr=FieldStr+ "SumOfopenpl, "
ValueStr=ValueStr+Request.QueryString("SumOfopenpl")+", "
End if
If Request.QueryString("SumOfinitialmargin")<>"" Then
FieldStr=FieldStr+ "SumOfinitialmargin, "
ValueStr=ValueStr+Request.QueryString("SumOfinitialmargin")+", "
End if
If Request.QueryString("SumOfmaintenancemargin")<>"" Then
FieldStr=FieldStr+ "SumOfmaintenancemargin, "
ValueStr=ValueStr+Request.QueryString("SumOfmaintenancemargin")+", "
End if
If Request.QueryString("opentradebalance")<>"" Then
FieldStr=FieldStr+ "opentradebalance, "
ValueStr=ValueStr+Request.QueryString("opentradebalance")+", "
End if
FieldStr = Mid(FieldStr, 1, Len(FieldStr) - 2) + ")"
ValueStr = Mid(ValueStr, 1, Len(ValueStr) - 2) + ")"
SqlStr = "Insert Into webtotalbalancebie30p" + FieldStr + ValueStr
conntemp.Execute (SqlStr)
conntemp.Close
Set conntemp = Nothing
If Err <> 0 Then
Session("Err") = Err.Number
Session("Description") = Err.Description
Session("HelpContext") = Err.HelpContext
Session("HelpFile;") = Err.HelpFile
Session("Source") = Err.Source
For Each Item In request.querystring
Session(Item) = request.querystring(Item)
Next
response.redirect "1form.asp?"+ Replace(request.querystring, "SaveNew",
"Copy")
End If
response.redirect "1form.asp?cmd=Last"

Case "Save"
SqlStr = "UPDATE webtotalbalancebie30p SET "
If Request.QueryString("accountnumber") <> Session("accountnumber") OR
IsNull(Session("accountnumber"))=true Then

Sqlstr=SqlStr+"accountnumber='"+FixDbFieldSave(Request.QueryString("accountnumber")) + "', "
End if
If Request.QueryString("product") <> Session("product") OR
IsNull(Session("product"))=true Then
Sqlstr=SqlStr+"product='"+FixDbFieldSave(Request.QueryString("product")) +
"', "
End if
If Request.QueryString("initialinvestment") <> "" OR
IsNull(Session("initialinvestment"))=true Then

Sqlstr=SqlStr+"initialinvestment="+Request.QueryString("initialinvestment") +
", "
End if
If Request.QueryString("guaranteedequity") <> "" OR
IsNull(Session("guaranteedequity"))=true Then
Sqlstr=SqlStr+"guaranteedequity="+Request.QueryString("guaranteedequity")
+ ", "
End if
If Request.QueryString("monthstartingbalance") <> "" OR
IsNull(Session("monthstartingbalance"))=true Then

Sqlstr=SqlStr+"monthstartingbalance="+Request.QueryString("monthstartingbalance") + ", "
End if
If Request.QueryString("SumOfcontractvalue") <> "" OR
IsNull(Session("SumOfcontractvalue"))=true Then

Sqlstr=SqlStr+"SumOfcontractvalue="+Request.QueryString("SumOfcontractvalue")
+ ", "
End if
If Request.QueryString("commission") <> "" OR
IsNull(Session("commission"))=true Then
Sqlstr=SqlStr+"commission="+Request.QueryString("commission") + ", "
End if
If Request.QueryString("managementfeebasic") <> "" OR
IsNull(Session("managementfeebasic"))=true Then

Sqlstr=SqlStr+"managementfeebasic="+Request.QueryString("managementfeebasic")
+ ", "
End if
If Request.QueryString("incentivefeetotal") <> "" OR
IsNull(Session("incentivefeetotal"))=true Then

Sqlstr=SqlStr+"incentivefeetotal="+Request.QueryString("incentivefeetotal") +
", "
End if
If Request.QueryString("electronicfee") <> "" OR
IsNull(Session("electronicfee"))=true Then
Sqlstr=SqlStr+"electronicfee="+Request.QueryString("electronicfee") + ", "
End if
If Request.QueryString("vat") <> "" OR IsNull(Session("vat"))=true Then
Sqlstr=SqlStr+"vat="+Request.QueryString("vat") + ", "
End if
If Request.QueryString("adjustment") <> "" OR
IsNull(Session("adjustment"))=true Then
Sqlstr=SqlStr+"adjustment="+Request.QueryString("adjustment") + ", "
End if
If Request.QueryString("netliquidationbalance") <> "" OR
IsNull(Session("netliquidationbalance"))=true Then

Sqlstr=SqlStr+"netliquidationbalance="+Request.QueryString("netliquidationbalance") + ", "
End if
If Request.QueryString("SumOfopenpl") <> "" OR
IsNull(Session("SumOfopenpl"))=true Then
Sqlstr=SqlStr+"SumOfopenpl="+Request.QueryString("SumOfopenpl") + ", "
End if
If Request.QueryString("SumOfinitialmargin") <> "" OR
IsNull(Session("SumOfinitialmargin"))=true Then

Sqlstr=SqlStr+"SumOfinitialmargin="+Request.QueryString("SumOfinitialmargin")
+ ", "
End if
If Request.QueryString("SumOfmaintenancemargin") <> "" OR
IsNull(Session("SumOfmaintenancemargin"))=true Then

Sqlstr=SqlStr+"SumOfmaintenancemargin="+Request.QueryString("SumOfmaintenancemargin") + ", "
End if
If Request.QueryString("opentradebalance") <> "" OR
IsNull(Session("opentradebalance"))=true Then
Sqlstr=SqlStr+"opentradebalance="+Request.QueryString("opentradebalance")
+ ", "
End if
SqlStr = Mid(SqlStr, 1, Len(SqlStr) - 2)
SqlStr = SqlStr + " WHERE accountnumber='"+ session("accountnumber")+ "'"
If Instr(sqlstr," SE ")<=0 Then
conntemp.Execute (SqlStr)
End if
SqlStr ="SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
a = 1
While rs.EOF <> True And a < Session("CurRec")
a = a + 1
rs.MoveNext
Wend

Case ""
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
Set rs = conntemp.Execute(SqlStr)
If rs.EOF = True Then
Response.redirect "1form.asp?cmd=New"
End If
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1

Case "First"
CountRecs "webtotalbalancebie30p", "accountnumber", A
Session("NumOfRecs") = a
Session("CurRec") = 1
SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
 
Ad

Advertisements

S

Stefan B Rusynko

See http://www.drdev.net/article04.asp

<%
Amount=-1000.78
MyCurrency = FormatCurrency(Amount,-1,-1)
If Amount<0 Then
thiscolor="red"
Else
thiscolor="black"
End if
%>
<p><font color="<%=thiscolor%>"><%=MyCurrency%></font></p>


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Dear Sirs
| I created my databse in Access but my server is an Apache server and not
| accepting ASP codes from Frontpage.
| Sowith I used ATAF software to create the code. My server is accepting that,
| but the following happened.
| My ASP page shows the data but not like in the data table (Access). I would
| like that the numbers have a 2 digit decimal behind the comma i.e.123.456,30
| and
| negative numbers should be in red and in brackets i.e. (123.456,30).
| So the format should be: $#.##0,00;($#.##0,00)[Red]
| Please look at my code because I cannot set the "formpagetablefield" to the
| above mentioned. Please tell me where and what I have to do to get my field
| correctly formatted.
| Many thanks
| Klaus
| *********************************************************
| Here the complete code:
| <!--#include File ="globalsub.asp"-->
| <%
|
| On Error Resume Next
| cmd = Request.QueryString("cmd")
| Session("accountnumber") = Request.QueryString("accountnumber")
| Session("accountnumber") = Replace(session("accountnumber"),"%2D","-")
|
| Set conntemp = server.CreateObject("adodb.Connection")
| conntemp.open
| "DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"
|
| Function CountRecs(TableName, FieldName, NoOfRecs)
| SqlStrCount = "Select Count(" + FieldName + ") As NoOfRecs From " +
| TableName
| Set rscount = conntemp.Execute(SqlStrCount)
| NoOfRecs = rscount("NoOfRecs")
| CountRecs = A
| rscount.Close
| End Function
|
| Select Case cmd
|
| Case "SaveNew"
| FieldStr=" ("
| ValueStr = " VALUES ("
| If Request.QueryString("accountnumber")<>"" Then
| FieldStr=FieldStr+ "accountnumber, "
|
| ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("accountnumber"))+"', "
| End if
| If Request.QueryString("product")<>"" Then
| FieldStr=FieldStr+ "product, "
| ValueStr=ValueStr+"'"+FixDbFieldSave(Request.QueryString("product"))+"', "
| End if
| If Request.QueryString("initialinvestment")<>"" Then
| FieldStr=FieldStr+ "initialinvestment, "
| ValueStr=ValueStr+Request.QueryString("initialinvestment")+", "
| End if
| If Request.QueryString("guaranteedequity")<>"" Then
| FieldStr=FieldStr+ "guaranteedequity, "
| ValueStr=ValueStr+Request.QueryString("guaranteedequity")+", "
| End if
| If Request.QueryString("monthstartingbalance")<>"" Then
| FieldStr=FieldStr+ "monthstartingbalance, "
| ValueStr=ValueStr+Request.QueryString("monthstartingbalance")+", "
| End if
| If Request.QueryString("SumOfcontractvalue")<>"" Then
| FieldStr=FieldStr+ "SumOfcontractvalue, "
| ValueStr=ValueStr+Request.QueryString("SumOfcontractvalue")+", "
| End if
| If Request.QueryString("commission")<>"" Then
| FieldStr=FieldStr+ "commission, "
| ValueStr=ValueStr+Request.QueryString("commission")+", "
| End if
| If Request.QueryString("managementfeebasic")<>"" Then
| FieldStr=FieldStr+ "managementfeebasic, "
| ValueStr=ValueStr+Request.QueryString("managementfeebasic")+", "
| End if
| If Request.QueryString("incentivefeetotal")<>"" Then
| FieldStr=FieldStr+ "incentivefeetotal, "
| ValueStr=ValueStr+Request.QueryString("incentivefeetotal")+", "
| End if
| If Request.QueryString("electronicfee")<>"" Then
| FieldStr=FieldStr+ "electronicfee, "
| ValueStr=ValueStr+Request.QueryString("electronicfee")+", "
| End if
| If Request.QueryString("vat")<>"" Then
| FieldStr=FieldStr+ "vat, "
| ValueStr=ValueStr+Request.QueryString("vat")+", "
| End if
| If Request.QueryString("adjustment")<>"" Then
| FieldStr=FieldStr+ "adjustment, "
| ValueStr=ValueStr+Request.QueryString("adjustment")+", "
| End if
| If Request.QueryString("netliquidationbalance")<>"" Then
| FieldStr=FieldStr+ "netliquidationbalance, "
| ValueStr=ValueStr+Request.QueryString("netliquidationbalance")+", "
| End if
| If Request.QueryString("SumOfopenpl")<>"" Then
| FieldStr=FieldStr+ "SumOfopenpl, "
| ValueStr=ValueStr+Request.QueryString("SumOfopenpl")+", "
| End if
| If Request.QueryString("SumOfinitialmargin")<>"" Then
| FieldStr=FieldStr+ "SumOfinitialmargin, "
| ValueStr=ValueStr+Request.QueryString("SumOfinitialmargin")+", "
| End if
| If Request.QueryString("SumOfmaintenancemargin")<>"" Then
| FieldStr=FieldStr+ "SumOfmaintenancemargin, "
| ValueStr=ValueStr+Request.QueryString("SumOfmaintenancemargin")+", "
| End if
| If Request.QueryString("opentradebalance")<>"" Then
| FieldStr=FieldStr+ "opentradebalance, "
| ValueStr=ValueStr+Request.QueryString("opentradebalance")+", "
| End if
| FieldStr = Mid(FieldStr, 1, Len(FieldStr) - 2) + ")"
| ValueStr = Mid(ValueStr, 1, Len(ValueStr) - 2) + ")"
| SqlStr = "Insert Into webtotalbalancebie30p" + FieldStr + ValueStr
| conntemp.Execute (SqlStr)
| conntemp.Close
| Set conntemp = Nothing
| If Err <> 0 Then
| Session("Err") = Err.Number
| Session("Description") = Err.Description
| Session("HelpContext") = Err.HelpContext
| Session("HelpFile;") = Err.HelpFile
| Session("Source") = Err.Source
| For Each Item In request.querystring
| Session(Item) = request.querystring(Item)
| Next
| response.redirect "1form.asp?"+ Replace(request.querystring, "SaveNew",
| "Copy")
| End If
| response.redirect "1form.asp?cmd=Last"
|
| Case "Save"
| SqlStr = "UPDATE webtotalbalancebie30p SET "
| If Request.QueryString("accountnumber") <> Session("accountnumber") OR
| IsNull(Session("accountnumber"))=true Then
|
| Sqlstr=SqlStr+"accountnumber='"+FixDbFieldSave(Request.QueryString("accountnumber")) + "', "
| End if
| If Request.QueryString("product") <> Session("product") OR
| IsNull(Session("product"))=true Then
| Sqlstr=SqlStr+"product='"+FixDbFieldSave(Request.QueryString("product")) +
| "', "
| End if
| If Request.QueryString("initialinvestment") <> "" OR
| IsNull(Session("initialinvestment"))=true Then
|
| Sqlstr=SqlStr+"initialinvestment="+Request.QueryString("initialinvestment") +
| ", "
| End if
| If Request.QueryString("guaranteedequity") <> "" OR
| IsNull(Session("guaranteedequity"))=true Then
| Sqlstr=SqlStr+"guaranteedequity="+Request.QueryString("guaranteedequity")
| + ", "
| End if
| If Request.QueryString("monthstartingbalance") <> "" OR
| IsNull(Session("monthstartingbalance"))=true Then
|
| Sqlstr=SqlStr+"monthstartingbalance="+Request.QueryString("monthstartingbalance") + ", "
| End if
| If Request.QueryString("SumOfcontractvalue") <> "" OR
| IsNull(Session("SumOfcontractvalue"))=true Then
|
| Sqlstr=SqlStr+"SumOfcontractvalue="+Request.QueryString("SumOfcontractvalue")
| + ", "
| End if
| If Request.QueryString("commission") <> "" OR
| IsNull(Session("commission"))=true Then
| Sqlstr=SqlStr+"commission="+Request.QueryString("commission") + ", "
| End if
| If Request.QueryString("managementfeebasic") <> "" OR
| IsNull(Session("managementfeebasic"))=true Then
|
| Sqlstr=SqlStr+"managementfeebasic="+Request.QueryString("managementfeebasic")
| + ", "
| End if
| If Request.QueryString("incentivefeetotal") <> "" OR
| IsNull(Session("incentivefeetotal"))=true Then
|
| Sqlstr=SqlStr+"incentivefeetotal="+Request.QueryString("incentivefeetotal") +
| ", "
| End if
| If Request.QueryString("electronicfee") <> "" OR
| IsNull(Session("electronicfee"))=true Then
| Sqlstr=SqlStr+"electronicfee="+Request.QueryString("electronicfee") + ", "
| End if
| If Request.QueryString("vat") <> "" OR IsNull(Session("vat"))=true Then
| Sqlstr=SqlStr+"vat="+Request.QueryString("vat") + ", "
| End if
| If Request.QueryString("adjustment") <> "" OR
| IsNull(Session("adjustment"))=true Then
| Sqlstr=SqlStr+"adjustment="+Request.QueryString("adjustment") + ", "
| End if
| If Request.QueryString("netliquidationbalance") <> "" OR
| IsNull(Session("netliquidationbalance"))=true Then
|
| Sqlstr=SqlStr+"netliquidationbalance="+Request.QueryString("netliquidationbalance") + ", "
| End if
| If Request.QueryString("SumOfopenpl") <> "" OR
| IsNull(Session("SumOfopenpl"))=true Then
| Sqlstr=SqlStr+"SumOfopenpl="+Request.QueryString("SumOfopenpl") + ", "
| End if
| If Request.QueryString("SumOfinitialmargin") <> "" OR
| IsNull(Session("SumOfinitialmargin"))=true Then
|
| Sqlstr=SqlStr+"SumOfinitialmargin="+Request.QueryString("SumOfinitialmargin")
| + ", "
| End if
| If Request.QueryString("SumOfmaintenancemargin") <> "" OR
| IsNull(Session("SumOfmaintenancemargin"))=true Then
|
| Sqlstr=SqlStr+"SumOfmaintenancemargin="+Request.QueryString("SumOfmaintenancemargin") + ", "
| End if
| If Request.QueryString("opentradebalance") <> "" OR
| IsNull(Session("opentradebalance"))=true Then
| Sqlstr=SqlStr+"opentradebalance="+Request.QueryString("opentradebalance")
| + ", "
| End if
| SqlStr = Mid(SqlStr, 1, Len(SqlStr) - 2)
| SqlStr = SqlStr + " WHERE accountnumber='"+ session("accountnumber")+ "'"
| If Instr(sqlstr," SE ")<=0 Then
| conntemp.Execute (SqlStr)
| End if
| SqlStr ="SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
| Set rs = conntemp.Execute(SqlStr)
| a = 1
| While rs.EOF <> True And a < Session("CurRec")
| a = a + 1
| rs.MoveNext
| Wend
|
| Case ""
| SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
| Set rs = conntemp.Execute(SqlStr)
| If rs.EOF = True Then
| Response.redirect "1form.asp?cmd=New"
| End If
| CountRecs "webtotalbalancebie30p", "accountnumber", A
| Session("NumOfRecs") = a
| Session("CurRec") = 1
|
| Case "First"
| CountRecs "webtotalbalancebie30p", "accountnumber", A
| Session("NumOfRecs") = a
| Session("CurRec") = 1
| SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
| Set rs = conntemp.Execute(SqlStr)
|
| Case "Last"
| CountRecs "webtotalbalancebie30p", "accountnumber", A
| Session("CurRec") = a
| Session("NumOfRecs") = a
| SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
| Set rs = conntemp.Execute(SqlStr)
| a = 1
| While (a < Session("NumOfRecs")) And (rs.EOF <> True)
| a = a + 1
| rs.MoveNext
| Wend
|
| Case "Prev"
| CountRecs "webtotalbalancebie30p", "accountnumber", A
| Session("NumOfRecs") = a
| Session("CurRec") = Session("CurRec") - 1
| If Session("CurRec") <= 0 Then
| Session("CurRec") = Session("NumOfRecs")
| End If
| SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
| Set rs = conntemp.Execute(SqlStr)
| a = 1
| While rs.EOF <> True And a < Session("CurRec")
| a = a + 1
| rs.MoveNext
| Wend
|
| Case "Next"
| CountRecs "webtotalbalancebie30p", "accountnumber", A
| Session("NumOfRecs") = a
| Session("CurRec") = Session("CurRec") + 1
| If Session("CurRec") > Session("NumOfRecs") Then
| Session("CurRec") = 1
| End If
| SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
| Set rs = conntemp.Execute(SqlStr)
| a = 1
| While rs.EOF <> True And a < Session("CurRec")
| a = a + 1
| rs.MoveNext
| Wend
|
| Case "Del"
| SqlStr = "DELETE FROM webtotalbalancebie30p WHERE accountnumber='"+
| Session("accountnumber")+ "'"
| conntemp.Execute (SqlStr)
| conntemp.Close
| Set conntemp = Nothing
| response.redirect "1form.asp"
|
| Case "Fromlist"
| Session("CurRec") = 1
| SqlStr1 = "SELECT Count(accountnumber) As TotalCount From
| webtotalbalancebie30p"
| Set Rs1 = conntemp.Execute(SqlStr1)
| Session("NumOfRecs") = Rs1("TotalCount")
| Rs1.Close
| Set Rs1 = Nothing
| SqlStr = "SELECT * FROM webtotalbalancebie30p ORDER BY accountnumber"
| Set rs = conntemp.Execute(SqlStr)
| While Trim(Session("accountnumber")) <> Trim(CStr(rs("accountnumber")))
| Session("CurRec") = Session("CurRec") + 1
| rs.MoveNext
| Wend
| End Select
|
| If cmd <> "New" And cmd<>"Copy" Then
| Session("accountnumber") = server.Urlencode(rs("accountnumber"))
| Session("accountnumber") = rs("accountnumber")
| Session("product") = rs("product")
| Session("initialinvestment") = rs("initialinvestment")
| Session("guaranteedequity") = rs("guaranteedequity")
| Session("monthstartingbalance") = rs("monthstartingbalance")
| Session("SumOfcontractvalue") = rs("SumOfcontractvalue")
| Session("commission") = rs("commission")
| Session("managementfeebasic") = rs("managementfeebasic")
| Session("incentivefeetotal") = rs("incentivefeetotal")
| Session("electronicfee") = rs("electronicfee")
| Session("vat") = rs("vat")
| Session("adjustment") = rs("adjustment")
| Session("netliquidationbalance") = rs("netliquidationbalance")
| Session("SumOfopenpl") = rs("SumOfopenpl")
| Session("SumOfinitialmargin") = rs("SumOfinitialmargin")
| Session("SumOfmaintenancemargin") = rs("SumOfmaintenancemargin")
| Session("opentradebalance") = rs("opentradebalance")
| rs.Close
| Set rs = Nothing
| End if
|
| If cmd="New" Then
| Session("accountnumber") = ""
| Session("accountnumber") = ""
| Session("product") = ""
| Session("initialinvestment") = ""
| Session("guaranteedequity") = ""
| Session("monthstartingbalance") = ""
| Session("SumOfcontractvalue") = ""
| Session("commission") = ""
| Session("managementfeebasic") = ""
| Session("incentivefeetotal") = ""
| Session("electronicfee") = ""
| Session("vat") = ""
| Session("adjustment") = ""
| Session("netliquidationbalance") = ""
| Session("SumOfopenpl") = ""
| Session("SumOfinitialmargin") = ""
| Session("SumOfmaintenancemargin") = ""
| Session("opentradebalance") = ""
| End If
| conntemp.Close
| Set conntemp = Nothing
| %>
| <html>
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
| <meta name="GENERATOR" content="ATAF Version 6.1.0">
| <title>webtotalbalancebie30p</title>
| <base target="_self">
| <link rel="stylesheet" type="text/css" href="globalcss.css">
|
| <script Language="JavaScript">
| function winopenexcel (sqlstr)
| {
|
msg=open("","NewWindow","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=150");
| msg.location = "toexcel.asp?sqlstr="+sqlstr;
| msg.focus()
| }
| </script>
|
| </head>
| <body class="formpage">
| <table width="100%" border="0" height="100%">
| <tr><td valign="top" align="middle"><td></tr>
| <tr><td align="Left" valign="Middle" >
| <form method="GET" action="1form.asp" name="webtotalbalancebie30p"
| onSubmit="return Checkform(this);">
| <table border="0" cellpadding="0" cellspacing="0" class="formpagetable">
| <tr>
| <td colspan="2" class="formpagetableheader" >
| <table width="100%" border="0">
| <tr>
| <td align="left"><img border="0" src="lefttop.gif"></td>
| <td class="formpagetableheader" style="border-style: solid; border-width: 0">
| webtotalbalancebie30p
| </td>
| <td align="right"><input type="button" value="X" style="font-family:
| Tahoma; font-weight: bold; font-size: 8pt"
| onClick="parent.location='default.asp'" <%=ShowTextOnPic("Click to go back to
| the main menu")%> ></td>
| </tr>
| </table>
| </td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> accountnumber</td>
| <td><input class="formpagetablefield" type="number" name="accountnumber"
| size="50" Value="<%=trim(Session("accountnumber"))%>"></td>
| </tr>
| <tr>
| <td align="left" valign="top" class="formpagetablelabel"> product</td>
| <td><input class="formpagetablefield" type="text" name="product"
| size="50" Value="<%=trim(Session("product"))%>"></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> guaranteedequity</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="guaranteedequity" size="8"
| Value="<%=Session("guaranteedequity")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> monthstartingbalance</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="monthstartingbalance" size="8"
| Value="<%=Session("monthstartingbalance")%>"><font
| class="formpagetablefield"> EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> SumOfcontractvalue</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="SumOfcontractvalue" size="8"
| Value="<%=Session("SumOfcontractvalue")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top" class="formpagetablelabel"> commission</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="commission" size="8" style:"$#.##0,00;($#.##0,00)[Red]"
| Value="<%=Session("commission")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> managementfeebasic</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="managementfeebasic" size="8"
| Value="<%=Session("managementfeebasic")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> incentivefeetotal</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="incentivefeetotal" size="8"
| Value="<%=Session("incentivefeetotal")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> electronicfee</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="electronicfee" size="8"
| Value="<%=Session("electronicfee")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top" class="formpagetablelabel"> vat</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="vat" size="8" Value="<%=Session("vat")%>"><font
| class="formpagetablefield"> EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top" class="formpagetablelabel"> adjustment</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="adjustment" size="8"
| Value="<%=Session("adjustment")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> netliquidationbalance</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="netliquidationbalance" size="8"
| Value="<%=Session("netliquidationbalance")%>"><font
| class="formpagetablefield"> EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top" class="formpagetablelabel"> SumOfopenpl</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="SumOfopenpl" size="8"
| Value="<%=Session("SumOfopenpl")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> SumOfinitialmargin</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="SumOfinitialmargin" size="8"
| Value="<%=Session("SumOfinitialmargin")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> SumOfmaintenancemargin</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="SumOfmaintenancemargin" size="8"
| Value="<%=Session("SumOfmaintenancemargin")%>"><font
| class="formpagetablefield"> EUR</div></td>
| </tr>
| <tr>
| <td align="left" valign="top"
| class="formpagetablelabel"> opentradebalance</td>
| <td class="formpagetablelabel"><input class="formpagetablefield"
| type="number" name="opentradebalance" size="8"
| Value="<%=Session("opentradebalance")%>"><font class="formpagetablefield">
| EUR</div></td>
| </tr>
| <tr><td align="center" colspan="3">
|
|
|
|
 

Top