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:

&#8220; error in compiling in Microsoft VBScript, error 800a03ea
Microsoft OLE DB provider for ODBC Drivers &#8211; error 800004005
Microsoft][ODBC Microsoft Access Driver] has to use an actualising Query&#8221;


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?....
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
----------------------------------------

&lt;%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connDB1_STRING = "dsn=DB1;"
%&gt;


---------------------------------------------
The file for the tested "Homepage" INDEX.ASP
---------------------------------------------

&lt;%@LANGUAGE="VBSCRIPT"%&gt;
&lt;!--#include file="../Inetpub/Webpub/Connections/connDB1.asp" --&gt;
&lt;%
' *** Edit Operations: declare variables

MM_editAction = CStr(Request("URL")
If (Request.QueryString &lt;&gt; "" Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%&gt;
&lt;%
' *** Insert Record: set variables

If (CStr(Request("MM_insert") &lt;&gt; "" 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 &lt;&gt; "" And Request.QueryString &lt;&gt; "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString &lt;&gt; "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%&gt;
&lt;%
' *** Insert Record: construct a sql insert statement and execute it

If (CStr(Request("MM_insert") &lt;&gt; "" 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 &lt;&gt; "" Then
FormVal = AltVal
ElseIf (Delim = "'" Then ' escape quotes
FormVal = "'" & Replace(FormVal,"'","''" & "'"
Else
FormVal = Delim + FormVal + Delim
End If
End If
If (i &lt;&gt; 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 &lt;&gt; "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%&gt;
&lt;%
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
%&gt;
&lt;%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
rsDB1_numRows = rsDB1_numRows + Repeat1__numRows
%&gt;
&lt;%
Dim Repeat2__numRows
Repeat2__numRows = -1
Dim Repeat2__index
Repeat2__index = 0
rsDB1_Aquaristik_numRows = rsDB1_Aquaristik_numRows + Repeat2__numRows
%&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;/head&gt;
&lt;body bgcolor="#FFFFFF" text="#000000"&gt;
&lt;p&gt;&lt;b&gt;&lt;font face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;u&gt;Testsite zur dynamischen
Datenbankanbindung von DB1&lt;/u&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;Dateneingabe:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;form ACTION="&lt;%=MM_editAction%&gt;" METHOD="POST" name="form2"&gt;
&lt;table width="75%" border="1" bgcolor="#990000"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;&lt;font color="#C0C0C0" face="Arial, Helvetica, sans-serif"&gt;Aquarienverein&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;&lt;font color="#C0C0C0" face="Arial, Helvetica, sans-serif"&gt;Link&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;input type="text" name="Aquarienverein" size="50" value=""&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" name="Link" size="50"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;input type="submit" name="Abschicken" value="Abschicken"&gt;
&lt;input type="hidden" name="MM_insert" value="true"&gt;
&lt;/form&gt;
&lt;p&gt;&nbsp;&lt;/p&gt;
&lt;p&gt;&nbsp;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;%
rsDB1.Close()
%&gt;

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
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?....
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

Reply to this topic