Forums
This topic is locked
newbie problem ??
Posted 19 Jul 2001 10:21:31
1
has voted
19 Jul 2001 10:21:31 Petra Murbach posted:
<font face='Arial'></font id='Arial'>ENGLISH
--------------
I have created a site for dynamical data excange with an access-database (Homepage, ASP local).
The listing of the database works fine, but it is not possible to send data to the database. There comes an error message like this:
“ error in compiling in Microsoft VBScript, error 800a03ea
Microsoft OLE DB provider for ODBC Drivers – error 800004005
Microsoft][ODBC Microsoft Access Driver] has to use an actualising Query”
Do you have an idea what had been going wrong?
Thank you for reply
Petra
---------------------------------------
German:
--------
Typisches Newbie-Problem, oder Murks in Dreamweaver?? J
Habe eine Testseite für dynamische Datenbankeinbindung einer einfachen Access-Datenbank erstellt. (Homepage und ASP Lokal)
Dabei funktioniert eine dynamische Datenbankabbfrage (Listing) sehr gut. Das auf der gleichen Seite eingefügte Live-Formular zur DATENEINGABE in die gleiche Access-Datenbank bringt beim Betätigen der Abschicken-Schaltfläche die folgende Fehlermeldung:
Fehlermeldung:
----------------------
Kompilierungsfehler in Microsoft VBScript- Fehler '800a03ea'
Syntaxfehler
/iisHelp/common/500-100.asp, line 122
on error go to 0
---------^
Microsoft OLE DB Provider for ODBC Drivers- Fehler '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation muss eine aktualisierbare Abfrage verwenden.
/TMPgwbtgpngd.asp, line 90
Hat von Euch einer eine Idee, was da schiefgelaufen sein könnte?
Für alle kreativen Vorschläge schon jetzt recht herzlichen Dank.
Petra
PeMu
Replies
Replied 19 Jul 2001 13:56:10
19 Jul 2001 13:56:10 Joel Martinez replied:
hmmm, well, what server behavior are you using? or did you code it yourself...
if you wrote the code, you may want to post some of it so we can see what you're up against
Joel Martinez
----------
Is this thing on?....
if you wrote the code, you may want to post some of it so we can see what you're up against
Joel Martinez
----------
Is this thing on?....
Replied 20 Jul 2001 08:00:20
20 Jul 2001 08:00:20 Petra Murbach replied:
I only use the UDev generated Code:
----------------------------------------
The file for the connection connDB1.ASP
----------------------------------------
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connDB1_STRING = "dsn=DB1;"
%>
---------------------------------------------
The file for the tested "Homepage" INDEX.ASP
---------------------------------------------
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Inetpub/Webpub/Connections/connDB1.asp" -->
<%
' *** Edit Operations: declare variables
MM_editAction = CStr(Request("URL")
If (Request.QueryString <> "" Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert") <> "" Then
MM_editConnection = MM_connDB1_STRING
MM_editTable = "Tabelle1"
MM_editRedirectUrl = "Index.asp"
MM_fieldsStr = "Aquarienverein|value|Link|value"
MM_columnsStr = "Vereinsbezeichnung|',none,''|Link|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|"
MM_columns = Split(MM_columnsStr, "|"
' set the form values
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
If (CStr(Request("MM_insert") <> "" Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
FormVal = MM_fields(i+1)
MM_typeArray = Split(MM_columns(i+1),","
Delim = MM_typeArray(0)
If (Delim = "none" Then Delim = ""
AltVal = MM_typeArray(1)
If (AltVal = "none" Then AltVal = ""
EmptyVal = MM_typeArray(2)
If (EmptyVal = "none" Then EmptyVal = ""
If (FormVal = "" Then
FormVal = EmptyVal
Else
If (AltVal <> "" Then
FormVal = AltVal
ElseIf (Delim = "'" Then ' escape quotes
FormVal = "'" & Replace(FormVal,"'","''" & "'"
Else
FormVal = Delim + FormVal + Delim
End If
End If
If (i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End if
MM_tableValues = MM_tableValues & MM_columns(i)
MM_dbValues = MM_dbValues & FormVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & " values (" & MM_dbValues & ""
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
set rsDB1 = Server.CreateObject("ADODB.Recordset"
rsDB1.ActiveConnection = MM_connDB1_STRING
rsDB1.Source = "SELECT Link, Vereinsbezeichnung FROM Tabelle1"
rsDB1.CursorType = 0
rsDB1.CursorLocation = 2
rsDB1.LockType = 3
rsDB1.Open()
rsDB1_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
rsDB1_numRows = rsDB1_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = -1
Dim Repeat2__index
Repeat2__index = 0
rsDB1_Aquaristik_numRows = rsDB1_Aquaristik_numRows + Repeat2__numRows
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><b><font face="Verdana, Arial, Helvetica, sans-serif"><u>Testsite zur dynamischen
Datenbankanbindung von DB1</u></font></b></p>
<p> </p>
<p><b><font face="Arial, Helvetica, sans-serif">Dateneingabe:</font></b></p>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form2">
<table width="75%" border="1" bgcolor="#990000">
<tr>
<td><b><font color="#C0C0C0" face="Arial, Helvetica, sans-serif">Aquarienverein</font></b></td>
<td><b><font color="#C0C0C0" face="Arial, Helvetica, sans-serif">Link</font></b></td>
</tr>
<tr>
<td>
<input type="text" name="Aquarienverein" size="50" value="">
</td>
<td>
<input type="text" name="Link" size="50">
</td>
</tr>
</table>
<input type="submit" name="Abschicken" value="Abschicken">
<input type="hidden" name="MM_insert" value="true">
</form>
<p> </p>
<p> </p>
</body>
</html>
<%
rsDB1.Close()
%>
PeMu
----------------------------------------
The file for the connection connDB1.ASP
----------------------------------------
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connDB1_STRING = "dsn=DB1;"
%>
---------------------------------------------
The file for the tested "Homepage" INDEX.ASP
---------------------------------------------
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Inetpub/Webpub/Connections/connDB1.asp" -->
<%
' *** Edit Operations: declare variables
MM_editAction = CStr(Request("URL")
If (Request.QueryString <> "" Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert") <> "" Then
MM_editConnection = MM_connDB1_STRING
MM_editTable = "Tabelle1"
MM_editRedirectUrl = "Index.asp"
MM_fieldsStr = "Aquarienverein|value|Link|value"
MM_columnsStr = "Vereinsbezeichnung|',none,''|Link|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|"
MM_columns = Split(MM_columnsStr, "|"
' set the form values
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
If (CStr(Request("MM_insert") <> "" Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
FormVal = MM_fields(i+1)
MM_typeArray = Split(MM_columns(i+1),","
Delim = MM_typeArray(0)
If (Delim = "none" Then Delim = ""
AltVal = MM_typeArray(1)
If (AltVal = "none" Then AltVal = ""
EmptyVal = MM_typeArray(2)
If (EmptyVal = "none" Then EmptyVal = ""
If (FormVal = "" Then
FormVal = EmptyVal
Else
If (AltVal <> "" Then
FormVal = AltVal
ElseIf (Delim = "'" Then ' escape quotes
FormVal = "'" & Replace(FormVal,"'","''" & "'"
Else
FormVal = Delim + FormVal + Delim
End If
End If
If (i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End if
MM_tableValues = MM_tableValues & MM_columns(i)
MM_dbValues = MM_dbValues & FormVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & " values (" & MM_dbValues & ""
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
set rsDB1 = Server.CreateObject("ADODB.Recordset"
rsDB1.ActiveConnection = MM_connDB1_STRING
rsDB1.Source = "SELECT Link, Vereinsbezeichnung FROM Tabelle1"
rsDB1.CursorType = 0
rsDB1.CursorLocation = 2
rsDB1.LockType = 3
rsDB1.Open()
rsDB1_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
rsDB1_numRows = rsDB1_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = -1
Dim Repeat2__index
Repeat2__index = 0
rsDB1_Aquaristik_numRows = rsDB1_Aquaristik_numRows + Repeat2__numRows
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><b><font face="Verdana, Arial, Helvetica, sans-serif"><u>Testsite zur dynamischen
Datenbankanbindung von DB1</u></font></b></p>
<p> </p>
<p><b><font face="Arial, Helvetica, sans-serif">Dateneingabe:</font></b></p>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form2">
<table width="75%" border="1" bgcolor="#990000">
<tr>
<td><b><font color="#C0C0C0" face="Arial, Helvetica, sans-serif">Aquarienverein</font></b></td>
<td><b><font color="#C0C0C0" face="Arial, Helvetica, sans-serif">Link</font></b></td>
</tr>
<tr>
<td>
<input type="text" name="Aquarienverein" size="50" value="">
</td>
<td>
<input type="text" name="Link" size="50">
</td>
</tr>
</table>
<input type="submit" name="Abschicken" value="Abschicken">
<input type="hidden" name="MM_insert" value="true">
</form>
<p> </p>
<p> </p>
</body>
</html>
<%
rsDB1.Close()
%>
PeMu
Replied 20 Jul 2001 08:04:15
20 Jul 2001 08:04:15 Petra Murbach replied:
I am using Win2000 Workstation and IIS with updated MDAC V2.5 and Access2000. Both Homepage and database are lokal for testing the things.
PeMu
PeMu
Replied 20 Jul 2001 15:28:00
20 Jul 2001 15:28:00 Joel Martinez replied:
hmm... that's the first time I've seen that error message... I hate to say it, but I'm stumped.<img src=../images/dmxzone/forum/icon_smile_dead.gif border=0 align=middle>
hopefully someone else in this forum can help ya out... <img src=../images/dmxzone/forum/icon_smile_blackeye.gif border=0 align=middle>
<img src=../images/dmxzone/forum/icon_smile_dissapprove.gif border=0 align=middle>
Joel Martinez
----------
Is this thing on?....
hopefully someone else in this forum can help ya out... <img src=../images/dmxzone/forum/icon_smile_blackeye.gif border=0 align=middle>
<img src=../images/dmxzone/forum/icon_smile_dissapprove.gif border=0 align=middle>
Joel Martinez
----------
Is this thing on?....
Replied 23 Jul 2001 19:43:17
23 Jul 2001 19:43:17 Petra Murbach replied:
I found something at support-forum from Macromedia <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
I copied the database in an special directory, not in the webpub- or webroot-directory. I thougt it would be usefull to hide the database. This seems to be not possible in that way.
Thank you for your replies.
Petra
PeMu
I copied the database in an special directory, not in the webpub- or webroot-directory. I thougt it would be usefull to hide the database. This seems to be not possible in that way.
Thank you for your replies.
Petra
PeMu