ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 18th, 2003, 09:58 PM
merlinti's Avatar
merlinti merlinti is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Miami, FL
Posts: 134 merlinti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 17 sec
Reputation Power: 6
error '800a0e78' on page that creates a table

Hi All,

I have this whole app working on my dev machine at work and now uploaded it to my webhost and everything works but this page. I get this error:

ADODB.Recordset.1 error '800a0e78'
Invalid operation on closed object
/streetguide.com-asp/members/addtomyfolder.asp, line 82


Any ideas

My host is using Chilisoft ASP and MySQL.

Here is the code:

Code:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="streetguide.asp" -->
<%
'/////////////////////////////////////////////////////////////////////////////////
' ***  rsMember Recordset  ***

Dim rsMember__strUserName
rsMember__strUserName = "xyz"
If (Session("MM_UserName")  <> "") Then 
  rsMember__strUserName = Session("MM_UserName") 
End If
%>
<%
Dim rsMember
Dim rsMember_numRows

Set rsMember = Server.CreateObject("ADODB.Recordset")
rsMember.ActiveConnection = MM_streetguide_STRING
rsMember.Source = "SELECT *  FROM streetguide.members  WHERE UserName = '" + Replace(rsMember__strUserName, "'", "''") + "'"
rsMember.CursorType = 0
rsMember.CursorLocation = 2
rsMember.LockType = 1
rsMember.Open()
rsMember_numRows = 0
UserName = rsMember.Fields.Item("UserName" ).Value

'////////////////////////////////////////////////////////////////////////////////
%>
<%
        MM_streetguide_STRING = "driver={MySQL};server=server;uid=uid;"
        MM_streetguide_STRING = MM_streetguide_STRING & "pwd=pwd;database=db"             
        Set conn = Server.CreateObject("ADODB.Connection") 
                conn.Open MM_streetguide_STRING 
%>

<% 

'This is where the work happens
Dim strSQL
Dim strSQL2
Dim UserName
Dim FolderID
Dim StreetName
Dim Block
Dim City
Dim	State1
Dim	Direct1
Dim	Cross1
Dim	Direct2
Dim	Cross2
Dim	Direct3
Dim	Zip


'This captures your username from the previous form as well as other data
UserName = Request.Form("UserName")
StreetName = Request.Form("StreetName" )
Block = Request.Form("Block" )
City = Request.Form("City" )
States = Request.Form("States" )
Direct1 = Request.Form("Direct1" )
Cross1 = Request.Form("Cross1" )
Direct2 = Request.Form("Direct2" )
Cross2 = Request.Form("Cross2" )
Direct3 = Request.Form("Direct3" )
Zip = Request.Form("Zip" )



%>





<%
Set oRs = Server.CreateObject("ADODB.Recordset" )
'This will list all the tables named with the specified UserName
strSQL = "SHOW TABLES LIKE '" & UserName & "';"
oRs.Open strSQL,conn,2,3

If oRs.EOF and oRs.BOF THEN  'means that the table does not exist
	'need to create table
	'Insert username into SQL String
	strSQL = "CREATE TABLE " & UserName & " (FolderID int not null primary key auto_increment, StreetName varchar(100), Block varchar(100), City varchar(100), States varchar(100), Direct1 varchar(100), Cross1 varchar(100), Direct2 varchar(100), Cross2 varchar(100), Direct3 varchar(100), Zip varchar(50))"
	conn.Execute strSQL 
End If
	
'Insert data into table whether we created it or not
'Don't need Folder ID since it is auto_increment
strSQL2 = "INSERT INTO " & UserName & " (StreetName, Block, City, States, Direct1, Cross1, Direct2, Cross2, Direct3, Zip) VALUES ('" & StreetName & "','" & Block & "','" & City & "','" & States & "','" & Direct1 & "','" & Cross1 & "','" & Direct2 & "','" & Cross2 & "','" & Direct3 & "','" & Zip & "')"
conn.Execute strSQL2


%>





<html>
<head>
<title>Directions Steet Guide - Members Home</title>
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../assets/images/buttons/signup_ovr.gif','../assets/images/buttons/home_ovr.gif','../assets/images/buttons/logout_ovr.gif')">
<font color="#FFFFFF"> </font><span class="WelcomeBackTxt"><%=(rsMember.Fields.Item("FirstName").Value)%></span></p>
                </td>
                <td><p align="right"><a href="streetsearch.asp" class="MemberLinks"><font color="#FFFFFF" size="1"> </font> </a><a href="myaccount.asp" class="MemberLinks">MY
                      ACCOUNT</a> <font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">l </font><a href="myfolder.asp" class="MemberLinks">MY
                      FOLDER</a> <font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">l</font> <a href="streetsearch.asp" class="MemberLinks">STREET
                      SEARCH</a> <a href="streetsearch.asp" class="MemberLinks"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif"></font></a><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">l </font> <a href="locations.asp" class="MemberLinks">OTHER
                      LOCATIONS</a> <a href="streetsearch.asp" class="MemberLinks"></a><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">l </font><a href="maps.asp" class="MemberLinks"> MAPS</a></p>
                </td>
                <td width="5">&nbsp;</td>
              </tr>
            </table>              <br>
              <table width="100%" border="0" cellspacing="4" cellpadding="4">
              <tr>
                <td><span class="Title">Saved To Your Folder &nbsp;<img src="../assets/images/title_icon02.gif" width="13" height="11"> <img src="../assets/images/title_icon02.gif" width="13" height="11"> <img src="../assets/images/title_icon02.gif" width="13" height="11"> </span></td>
                <td><div align="right"><a href="javascript:history.back()" onFocus="if(this.blur)this.blur()"><img src="../assets/images/back.jpg" width="100" height="26" border="0" align="absmiddle"></a></div></td>
              </tr>
            </table>
            <p>&nbsp;The following directions have been added to your folder: </p>
            <p align="center" class="TitleGreen"><%= Request.Form("StreetName") %>, <%= Request.Form("Block") %>, <%= Request.Form("City") %>, <%= Request.Form("State") %></p>
            <table width="75%" border="0" align="center" cellpadding="0" cellspacing="1">
              <tr>
                <td bgcolor="#666666"><table width="100%" border="0" cellspacing="1" cellpadding="0">
                    <tr>
                      <td bgcolor="#F0EFEC"><table width="100%" border="0" cellspacing="6" cellpadding="6">
                          <tr>
                            <td><p align="center">&nbsp <%= Request.Form("Direct1") %> <%= Request.Form("Cross1") %> <%= Request.Form("Direct2") %>,<%= Request.Form("Cross2") %> <%= Request.Form("Direct3") %><%= Request.Form("Zip") %></p>
                            </td>
                          </tr>
                        </table>
  
</div>
</body>
</html>
<%
rsMember.Close()
Set rsMember = Nothing
%>
<%
oRs.Close()
Set oRs = Nothing
%>




thanks for the help

Reply With Quote
  #2  
Old June 19th, 2003, 11:29 AM
merlinti's Avatar
merlinti merlinti is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Miami, FL
Posts: 134 merlinti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 17 sec
Reputation Power: 6
Well, I don't know if this is the correct way to solve this problem, but it works now!!

I added this: On Error Resume Next

On Error Resume Next
If oRs.EOF and oRs.BOF THEN 'means that the table does not exist


I ran out to Borders yesterday and got this book, it helped alot.

Beginning ASP Databases by John Kauffman

I know some of you were saying that it would have been easier to just create a table for each user at the registration page, but I guess I learned alot more doing it the harder way. Also I need to learn for about linked tables.


Thanks for the help

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > error '800a0e78' on page that creates a table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway