gpt4 book ai didi

asp-classic - "Microsoft VBScript runtime error ' 800a000d ' ' 800a000d'

转载 作者:行者123 更新时间:2023-12-03 01:47:53 25 4
gpt4 key购买 nike

我有下一个代码,其工作原理如下:

  1. 从网址接收一些参数
  2. 将此数据插入名为“clients”的表中
  3. 然后我选择客户表中最后引入的数据
  4. 最后,它尝试将此数据插入到另一个名为 users 的表中。

但我收到此错误:

“Microsoft VBScript 运行时错误 '800a000d' '800a000d'

类型不匹配:'[字符串:“INSERT INTO galileo。”]'

/createClient.asp,第 50 行

第 50 行是这个:

 <%
Dim insertaUsuario
Set insertaUsuario = Server.CreateObject("ADODB.Recordset")
insertaUsuario.ActiveConnection = MM_trucks_STRING
'" + Replace(posicionFechaFin__MMColParam, "'", "''") + "'
insertaUsuario.Source = "INSERT INTO galileo.users (email,password,clientid) values ('"+(selecciona.Fields.Item("email").Value)+"','"+(selecciona.Fields.Item("password").Value)+"', '" + (selecciona.Fields.Item("id").Value)+ "'"
insertaUsuario.Open()
%>

这是完整的代码:

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="connects/global.asp" -->
<%
Dim inserta__MMColParamEmail
inserta__MMColParamEmail = "1"
If (Request.QueryString("email") <> "") Then
inserta__MMColParamEmail = Request.QueryString("email")
End If
%>
<%
Dim inserta__MMColParamPassword
inserta__MMColParamPasswordd = "1"
If (Request.QueryString("password") <> "") Then
inserta__MMColParamPassword = Request.QueryString("password")
End If
%>

<%
Dim inserta
Set inserta = Server.CreateObject("ADODB.Recordset")
inserta.ActiveConnection = MM_trucks_STRING
'" + Replace(posicionFechaFin__MMColParam, "'", "''") + "'
inserta.Source = "INSERT INTO galileo.clients (email,password) values ('" + Replace(inserta__MMColParamEmail, "'", "''") + "','" + Replace(inserta__MMColParamPassword, "'", "''") + "')"
inserta.Open()
%>
<%

Dim selecciona
Dim selecciona_numRows

Set selecciona = Server.CreateObject("ADODB.Recordset")
selecciona.ActiveConnection = MM_trucks_STRING
selecciona.Source = "SELECT id, email, password from clients where email='" + Replace(inserta__MMColParamEmail, "'", "''") + "' and password='" + Replace(inserta__MMColParamPassword, "'", "''") + "'"
selecciona.CursorType = 0
selecciona.CursorLocation = 2
selecciona.LockType = 1
selecciona.Open()

selecciona_numRows = 0
%>
<%= (selecciona.Fields.Item("id").Value)%>, <%= (selecciona.Fields.Item("email").Value) %>, <%= (selecciona.Fields.Item("password").Value) %>


<%
Dim insertaUsuario
Set insertaUsuario = Server.CreateObject("ADODB.Recordset")
insertaUsuario.ActiveConnection = MM_trucks_STRING
'" + Replace(posicionFechaFin__MMColParam, "'", "''") + "'
insertaUsuario.Source = "INSERT INTO galileo.users (email,password,clientid) values ('"+(selecciona.Fields.Item("email").Value)+"','"+(selecciona.Fields.Item("password").Value)+"', '" + (selecciona.Fields.Item("id").Value)+ "'"
insertaUsuario.Open()
%>

<!--If it is all ok, it redirects-->
<% Response.redirect ("default.asp")%>

最佳答案

您的 SQL 字符串中最后一个 ' 后面缺少一个 ')'。但我不确定为什么你会收到这种错误消息。

关于asp-classic - "Microsoft VBScript runtime error ' 800a000d ' ' 800a000d',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15464347/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com