Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 10th, 2003, 09:21 AM
Authorized User
 
Join Date: Jun 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update sql

I am getting this error when I run the code below.
   "Microsoft JET Database Engine (0x80040E10)
   No value given for one or more required parameters."

I am trying to manually enter values into the Update SQL to run this page independanly to fix another problem (did you get that). I seem to have forgoten how to do this with strMEID and strLoc. Can someone help me with the correct syntax for this?

strMEID = "555"
strLoc = "444"

'Set required variables
adCmdText = 1

'Start building the SQL string
sql24 = "UPDATE tblEquipment SET tblEquipment.Location = strLoc "
sql24 = sql24 & " WHERE tblEquipment.MEID = strMEID ;"

Set oConn24 = Server.CreateObject("ADODB.Connection")'Open Connection
oConn24.Open strConnect

'Create the command object
    Set oCmd24 = Server.CreateObject("ADODB.Command")

'Set the command object properties
    Set oCmd24.ActiveConnection = oConn24
    oCmd24.CommandText = sql24
    oCmd24.CommandType = adCmdText

    'Execute the command
    oCmd24.Execute
 
Old June 10th, 2003, 10:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

You need to have the actual values contained in the variables strLoc and strMEID put into the SQL, like this:
Code:
sql24 = "UPDATE tblEquipment SET tblEquipment.Location = '" & strLoc & "'"
sql24 = sql24 & " WHERE tblEquipment.MEID = '" & strMEID & "';"
Ditch the ' around the values if these are numeric fields not strings.





Similar Threads
Thread Thread Starter Forum Replies Last Post
C# Sql dynamic update N4th C# 2005 0 December 20th, 2006 09:05 AM
update sql kim Beginning VB 6 0 April 2nd, 2006 02:25 PM
Update SQL problem Teon ASP.NET 1.0 and 1.1 Basics 5 September 19th, 2005 09:55 AM
SQL update records topshed Classic ASP Components 5 September 9th, 2003 09:48 AM
how do I execute an SQL update chrisangus@btinternet.com VB How-To 1 June 22nd, 2003 06:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.