Save to DB

M

Mettá

I'm getting increasingly fed up with the FP database wizards. Now a simple
save to db form has given up the ghost! No changes just a sudden death!! Can
anyone shed any light in the following.


Microsoft VBScript compilation error '800a03ea'

Syntax error

C:\xxxxxxxxxxxx\xxxxxxxxxxxxx\xxxxxxxxxxxxxxx\xxxxxxxxxxxxx\../_fpclass/fpdb
form.inc, line 32

Case adInteger Or adBigInt Or adUnsignedTinyInt Or adUnsignedSmallInt
OradUnsignedInt Or adUnsignedBigInt
----------------------------------------------------------------------------
----------^
--

This is on a win2003 server

Thanks
M



for Metta.org.uk
http://www.metta.org.uk
THE HOLISTIC INFORMATION SERVICE
 
M

Microsoft

As requested, the form is fed from a duplicate form for adding to a db

page1.asp is a form, on submit click it posts to page2.asp this page gives
the error mentioned before.

Thanks
M

<%
Function FP_SaveFormFields(rs, rgFormFields, rgDBFields)
On Error Resume Next
Err.Clear

Dim i
For i = 0 To UBound(rgFormFields)
FP_SaveFormField rs, rgFormFields(i), rgDBFields(i)
Next
Err.Clear
End Function

Function FP_SaveFormField(rs, strField, strDBField)
On Error Resume Next
Err.Clear

If (Request.Form(strField)) = "" And rs(strDBField).Type <> adBoolean Then
Exit Function
End If

FP_SaveFieldToDB rs, Request.Form(strField), strDBField
Err.Clear
End Function

Function FP_SaveFieldToDB(rs, strField, strDBField)
On Error Resume Next
Err.Clear
Dim fp_Debug
fp_Debug = False

Select Case rs(strDBField).Type
Case adInteger Or adBigInt Or adUnsignedTinyInt Or adUnsignedSmallInt
OradUnsignedInt Or adUnsignedBigInt
rs(strDBField) = CInt(strField)
Case adSingle Or adDecimal Or adNumeric
rs(strDBField) = CSng(strField)
Case adDouble
rs(strDBField) = CDbl(strField)
Case adCurrency
rs(strDBField) = CCur(strField)
Case adBoolean
rs(strDBField) = CBool(strField)
Case adDate Or adDBDate Or adDBTime or adDBTimeStamp
rs(strDBField) = CDate(strField)
Case Else
rs(strDBField) = CStr(strField)
End Select

If fp_Debug Then
strError = "Cannot save value """ & strField & """ to database field """ &
strDBField & """"
Else
strError = "Cannot save value to database field"
End If

FP_DumpError strErrorUrl, strError
Err.Clear
End Function

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)
Response.Write "<html>" & vbCrLf
Response.Write "<head>" & vbCrLf
Response.Write "<metahttp-equiv=""Content-Type"" content=" & szCharSet &
">" & vbCrLf
Response.Write "<title> " & szTitle & "</title>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body>" & vbCrLf
Response.Write "<h1> " & szTitle & "</h1>" & vbCrLf
Response.Write "<p> " & szMsg1 &"</p>" & vbCrLf
Response.Write "<p>" & vbCrLf
For Each item in Request.Form
If item <> "VTI-GROUP" Then
Response.Write "<b>" & item & "</b>" & ": " &
Server.HTMLEncode(Request.Form(item)) & "<BR>" & vbCrLf
End If
Next
Response.Write "</p>" & vbCrLf
Response.Write "<p> <a href=""" &szUrl & """>" & szMsg2 & "</a></p>" &
vbCrLf
Response.Write "</body>" & vbCrLf
Response.Write "</html>" & vbCrLf
Response.End
End Function

Function FP_DumpError(strErrorUrl, strMsg)
Dim fp_Debug
fp_Debug = False
If Err.Number <> 0 Then
fp_conn.Close
If strErrorUrl <> "" Then
Response.Redirect strErrorUrl
Else
Response.Write "<b> " & Server.HTMLEncode(strMsg) & "</b><p>"
If fp_Debug Then
Response.Write "Error Description: " &
Server.HTMLEncode(Err.Description) & "<p>"
Response.Write "Error Number: " & Server.HTMLEncode(Err.Number)& "<p>"
Response.Write "Error Source: " & Server.HTMLEncode(Err.Source) & "<p>"
End If
Response.End
End If
End if
End Function
%>






Kathleen Anderson said:
Can you post the contents of that file?

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/


Mettá said:
I'm getting increasingly fed up with the FP database wizards. Now a
simple save to db form has given up the ghost! No changes just a
sudden death!! Can anyone shed any light in the following.


Microsoft VBScript compilation error '800a03ea'

Syntax error
C:\xxxxxxxxxxxx\xxxxxxxxxxxxx\xxxxxxxxxxxxxxx\xxxxxxxxxxxxx\../_fpclass/fpdb
 
M

Microsoft

Microsoft VBScript compilation error '800a03ea'

Syntax error

C:\xxx\xxx\xxx\xxx\../_fpclass/fpdbform.inc, line 32

Case adInteger Or adBigInt Or adUnsignedTinyInt Or adUnsignedSmallInt
OradUnsignedInt Or adUnsignedBigInt
----------------------------------------------------------------------------
----------^


Well It looks the same to me??

M


Kathleen Anderson said:
Mettá:

At line 28, you have fp_Debug = False
change it to True and try again - you should get a more meaningful message.

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/


Microsoft said:
As requested, the form is fed from a duplicate form for adding to a db

page1.asp is a form, on submit click it posts to page2.asp this page
gives the error mentioned before.

Thanks
M

<%
Function FP_SaveFormFields(rs, rgFormFields, rgDBFields)
On Error Resume Next
Err.Clear

Dim i
For i = 0 To UBound(rgFormFields)
FP_SaveFormField rs, rgFormFields(i), rgDBFields(i)
Next
Err.Clear
End Function

Function FP_SaveFormField(rs, strField, strDBField)
On Error Resume Next
Err.Clear

If (Request.Form(strField)) = "" And rs(strDBField).Type <>
adBoolean Then Exit Function
End If

FP_SaveFieldToDB rs, Request.Form(strField), strDBField
Err.Clear
End Function

Function FP_SaveFieldToDB(rs, strField, strDBField)
On Error Resume Next
Err.Clear
Dim fp_Debug
fp_Debug = False

Select Case rs(strDBField).Type
Case adInteger Or adBigInt Or adUnsignedTinyInt Or
adUnsignedSmallInt OradUnsignedInt Or adUnsignedBigInt
rs(strDBField) = CInt(strField)
Case adSingle Or adDecimal Or adNumeric
rs(strDBField) = CSng(strField)
Case adDouble
rs(strDBField) = CDbl(strField)
Case adCurrency
rs(strDBField) = CCur(strField)
Case adBoolean
rs(strDBField) = CBool(strField)
Case adDate Or adDBDate Or adDBTime or adDBTimeStamp
rs(strDBField) = CDate(strField)
Case Else
rs(strDBField) = CStr(strField)
End Select

If fp_Debug Then
strError = "Cannot save value """ & strField & """ to database
field """ & strDBField & """"
Else
strError = "Cannot save value to database field"
End If

FP_DumpError strErrorUrl, strError
Err.Clear
End Function

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl,
szMsg2) Response.Write "<html>" & vbCrLf
Response.Write "<head>" & vbCrLf
Response.Write "<metahttp-equiv=""Content-Type"" content=" &
szCharSet & ">" & vbCrLf
Response.Write "<title> " & szTitle & "</title>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body>" & vbCrLf
Response.Write "<h1> " & szTitle & "</h1>" & vbCrLf
Response.Write "<p> " & szMsg1 &"</p>" & vbCrLf
Response.Write "<p>" & vbCrLf
For Each item in Request.Form
If item <> "VTI-GROUP" Then
Response.Write "<b>" & item & "</b>" & ": " &
Server.HTMLEncode(Request.Form(item)) & "<BR>" & vbCrLf
End If
Next
Response.Write "</p>" & vbCrLf
Response.Write "<p> <a href=""" &szUrl & """>" & szMsg2 & "</a></p>"
& vbCrLf
Response.Write "</body>" & vbCrLf
Response.Write "</html>" & vbCrLf
Response.End
End Function

Function FP_DumpError(strErrorUrl, strMsg)
Dim fp_Debug
fp_Debug = False
If Err.Number <> 0 Then
fp_conn.Close
If strErrorUrl <> "" Then
Response.Redirect strErrorUrl
Else
Response.Write "<b> " & Server.HTMLEncode(strMsg) & "</b><p>"
If fp_Debug Then
Response.Write "Error Description: " &
Server.HTMLEncode(Err.Description) & "<p>"
Response.Write "Error Number: " & Server.HTMLEncode(Err.Number)&
"<p>" Response.Write "Error Source: " &
Server.HTMLEncode(Err.Source) & "<p>" End If
Response.End
End If
End if
End Function
%>
C:\xxxxxxxxxxxx\xxxxxxxxxxxxx\xxxxxxxxxxxxxxx\xxxxxxxxxxxxx\../_fpclass/fpdb
form.inc, line 32

Case adInteger Or adBigInt Or adUnsignedTinyInt Or
adUnsignedSmallInt OradUnsignedInt Or adUnsignedBigInt
-------------------------------------------------------------------------
-
 
K

Kathleen Anderson [MVP - FP]

It looks to me as though you are missing a space between Or and
adUnsignedInt

Mine looks like this:

Case adInteger Or adBigInt Or adUnsignedTinyInt Or adUnsignedSmallInt Or
adUnsignedInt Or adUnsignedBigInt


--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/


Microsoft said:
Microsoft VBScript compilation error '800a03ea'

Syntax error

C:\xxx\xxx\xxx\xxx\../_fpclass/fpdbform.inc, line 32

Case adInteger Or adBigInt Or adUnsignedTinyInt Or adUnsignedSmallInt
OradUnsignedInt Or adUnsignedBigInt
-------------------------------------------------------------------------- --
----------^


Well It looks the same to me??

M


Kathleen Anderson said:
Mettá:

At line 28, you have fp_Debug = False
change it to True and try again - you should get a more meaningful
message.

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
C:\xxxxxxxxxxxx\xxxxxxxxxxxxx\xxxxxxxxxxxxxxx\xxxxxxxxxxxxx\../_fpclass/fpdb
form.inc, line 32

Case adInteger Or adBigInt Or adUnsignedTinyInt Or
adUnsignedSmallInt OradUnsignedInt Or adUnsignedBigInt
------------------------------------------------------------------------
-
-
 
M

Microsoft

Wow, well spotted and thank you

You did you find the error and what could have caused this to happen??

Once again thank you
M
 
M

Mettá

Wow, well spotted and thank you

You did you find the error and what could have caused this to happen??

Once again thank you
M
 
Top