CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Getting 500.100 Error when trying to output ADODB.RecordSet

Print topic Send  topic

Author Message
paulklug

Posts: 1
Posted: 06/01/2005, 2:08 PM

I dont get any errors with my code for inputting a record into my RS. But when i try to output my RS into a table I get a 500.100 error "Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/AddInventory/Existing/viewInvOrder.asp, line 28"

Here is my include page code to enter in data to RS
___________
Public Sub Init

'CHECK: Is there already a recordset (rsinvOrder) in memory?
If (isObject(Session("rsinvOrder"))) Then
If not (Session("rsinvOrder") is nothing) Then
'ERROR
'Exit Sub
End If
End If


Set rsinvOrder = Server.CreateObject("ADODB.Recordset")

rsinvOrder.Fields.Append "InHouseID", adVarChar, 100
rsinvOrder.Fields.Append "Quantity", adInteger
rsinvOrder.Fields.Append "ProductName", adVarChar, 100

rsinvOrder.Open
Set Session("rsinvOrder") = rsinvOrder

End Sub

'=========================================
Public Sub Add (InHouseID, Quantity, ProductName)

'NOTE FOR LATER: CHECK FOR DUPLICATES
If (rsinvOrder.RecordCount > 0) Then
rsinvOrder.MoveFirst

Do While NOT rsinvOrder.EOF
If (InHouseID = rsinvOrder("InHouseID")) Then
rsinvOrder("Quantity") = rsinvOrder("Quantity") + Quantity
Exit Sub
End If

rsinvOrder.MoveNext
Loop
End If
rsinvOrder.AddNew
rsinvOrder("InHouseID") = InHouseID
rsinvOrder("Quantity") = Quantity
rsinvOrder("ProductName") = ProductName
rsinvOrder.Update

End Sub

_____________

Here is my code in my .asp page
_____________
Dim oCart
Set oCart = New invOrder
oCart.Init
If (Request.Form("Add") <> "") Then
'ADD ITEM TO CART
oCart.Retrieve
oCart.Add CStr(Request.form("ihID")), _
CInt(Request.form("quantity")), _
CStr(Request.form("ProductName"))
oCart.Store
End If
_____________

and here is my code to output data where i get the errors
_____________
<%
If (oCart.rsinvOrder.RecordCount > 0) Then
oCart.rsinvOrder.MoveFirst
End If
While NOT oCart.rsinvOrder.EOF
%>
<tr>
<td><%=oCart.rsinvOrder("InHouseID")%></td>
<td><%=oCart.rsinvOrder("Quantity")%></td>
<td><%=oCart.rsinvOrder("ProductName")%></td>
<td><div align="center">
<input name="updateQuantity" type="text" id="updateQuantity" size="5" maxlength="5">
</div></td>
<td><div align="center">Update | Delete</div></td>
</tr>
<%
oCart.rsinvOrder.MoveNext
wend
%>

Please ask if you have any questions
Thanks
Paul
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.