Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

INSERT RECORD with PASSED information problem

Posted 25 Jun 2002 04:26:13
1
has voted
25 Jun 2002 04:26:13 kim monaco posted:
Hi, I am having a problem with an insert page that has passed information on it.

I made a page "all_clients" which is a master record page.
When you click on the last name of a client you pass the info to the next page (new_order_form) and fill some of the form.

My problem is that when I hit insert, I get an error.
The Passed information is coming from the client table and the form inserts into the order table.

I have made insert record pages that work but this is my first page that has passed info in it.

Can you look at it and tell me why it is not working, or what I am doing wrong.


Here are the links to the pages online.
www.flyersdirect.com/all_clients.asp
www.flyersdirect.com/new_order_form.asp

Thanks for your help.
Kim



Replies

Replied 25 Jun 2002 06:48:30
25 Jun 2002 06:48:30 aegis kleais replied:
Please post what line 90 of new_order_form.asp

Replied 25 Jun 2002 09:16:56
25 Jun 2002 09:16:56 kim monaco replied:
Ok, here is what line 90 says.

MM_editCmd.Execute


First my problem was that I had a colume that was titled "Date". I switched it and am still having problems.


Replied 25 Jun 2002 09:54:11
25 Jun 2002 09:54:11 Andrew Watson replied:
post lines 70 to 100 !

:: Son, im Thirty.... ::
Replied 25 Jun 2002 15:30:48
25 Jun 2002 15:30:48 aegis kleais replied:
Also make sure the following are attended to:

Make sure that any field that REQUIRES info (does not allow NULL) has information sent in it.

Make sure that any date field has information inserted to it in the proper date command

Make sure that in the INSERT behavior, you are not mismatching any form fields to database fields.

Go ahead a list a bit more code before/after line 90. I was assuming line 90 may have been a syntax error.
Replied 25 Jun 2002 18:39:40
25 Jun 2002 18:39:40 kim monaco replied:
Here are some more lines of code starting at 70.

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
%>
<%
Dim PassUserID__MMColParam
PassUserID__MMColParam = "1"
if (Request.QueryString("UserID" <> "" then PassUserID__MMColParam = Request.QueryString("UserID"
%>
<%
set PassUserID = Server.CreateObject("ADODB.Recordset"
PassUserID.ActiveConnection = MM_fddb_STRING
PassUserID.Source = "SELECT FirstName, LastName, Email, billstreet, billcity, billstate, billzip, shipstreet, shipcity, shipstate, shipzip, Phone, AlternatePhone, Fax FROM client WHERE UserID = " + Replace(PassUserID__MMColParam, "'", "''" + ""
PassUserID.CursorType = 0
PassUserID.CursorLocation = 2
PassUserID.LockType = 3
PassUserID.Open()
PassUserID_numRows = 0
%>
<%
set ConnOder = Server.CreateObject("ADODB.Recordset"
ConnOder.ActiveConnection = MM_fddb_STRING
ConnOder.Source = "SELECT * FROM orders"
ConnOder.CursorType = 0
ConnOder.CursorLocation = 2
ConnOder.LockType = 3
ConnOder.Open()
ConnOder_numRows = 0
%>
<html>
<head>
<title>NEW ORDER PROCESS FORM</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFCC00" text="#000000">
<img src="images/fdlogo.gif" width="210" height="75"> <br>
<b><font face="Arial, Helvetica, sans-serif">NEW ORDER PROCESS SHEET</font></b>
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="order">


I hope this helps.
Kim

Replied 25 Jun 2002 19:47:29
25 Jun 2002 19:47:29 kim monaco replied:
Ok, I made some NAME changes to the DB columns and now I am getting a different error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/all_orders.asp, line 10

I don't understand this error.

Anyone?
Thanks again,
kim

Replied 25 Jun 2002 20:08:27
25 Jun 2002 20:08:27 kim monaco replied:
Ok, I fixed it. I had some Column names that were causing the problems.
The I needed to change the "all_order.asp" page because I swithched one of the DB column names that was in the new page.

Thanks to everyone who tried to help.

I'm sure I will be back here to ask questions in a couple of days.

Thanks again
kim

Reply to this topic