Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Greeting Card Mod 3.6 (RC1)
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 6

texanman
Junior Member

United States
410 Posts

Posted - 02 July 2008 :  08:20:12  Show Profile  Reply with Quote
quote:
Originally posted by Carefree

I installed it, tested the cleaning file, works perfectly with my change. Here's my file in .txt format: greeting_cards_clean



Carefree, I used your copy and still same error. hmmm<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 02 July 2008 :  08:27:59  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
I'm not sure what type is DateSent (guessing datetime), but the syntax used is valid just for Access. SQL Server doesn't use '*' in DELETE statements and dates aren't delimited by '#'.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 02 July 2008 :  08:31:34  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Originally posted by ruirib

I'm not sure what type is DateSent (guessing datetime), but the syntax used is valid just for Access. SQL Server doesn't use '*' in DELETE statements and dates aren't delimited by '#'.



and it is the reason we do dates in the forum as a string not a date<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 02 July 2008 :  09:12:06  Show Profile  Reply with Quote
rurib & HuwR:
This is the date format in the code:

rev = (rmonth & "/" & rday & "/" &ryear )
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< #" & rev & "#"

For SQ are you saying we take out those "#"'s?
Thanks<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 02 July 2008 :  09:14:11  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Originally posted by texanman

rurib & HuwR:
This is the date format in the code:

rev = (rmonth & "/" & rday & "/" &ryear )
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< #" & rev & "#"

For SQ are you saying we take out those "#"'s?
Thanks


yes, replace them with ', however you will need to ascertain whether your server wants the adte as mm/dd/yy or dd/mm/yy and adjust the rev = (rmonth & "/" & rday & "/" &ryear )
accordingly<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 02 July 2008 :  09:25:56  Show Profile  Reply with Quote
Tried both date types and got the same error:

ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/greeting_cards_clean.asp, line 89
I changed the line as:

strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< '" & rev & "'"
<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 02 July 2008 :  09:32:59  Show Profile  Visit HuwR's Homepage  Reply with Quote
an object closed error means you don't have an open connection, it has nothing to do with what the query is, have you deleted or commented any lines ?<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 02 July 2008 :  09:58:01  Show Profile  Reply with Quote
Thanks HuwR, You are the man!!
This is original code modified using your suggestion (works fine now in SQL):

quote:
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< '" & rev & "'"
set rs = conn.execute (strsql)

And this is the code carefree suggested to solve the issue earlier:

quote:
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< #" & rev & "#"
set rs = conn.execute(strSQL)
if rs.EOF or rs.BOF then ' Not Found
Response.Write "Deleted"
end if
rs.Close
set rs = Nothing

Thanks again<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 02 July 2008 :  10:21:05  Show Profile  Visit HuwR's Homepage  Reply with Quote
glad you have it working now (so far at least)<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 02 July 2008 :  11:12:10  Show Profile  Reply with Quote
LOL @ so far . You got that right.

The issue brought up by leatherlips still needs fixing.

quote:
It took out some of the error. Now it only says this:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/forumtest/greeting_cards_docard.asp, line 188
Line 188 is:
rs("mailserver") = strMailServer


<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 02 July 2008 :  12:35:11  Show Profile  Reply with Quote
I found the problem. Delete lines 188-189, the fields he's trying to update do not exist in that table.<

Edited by - Carefree on 02 July 2008 12:39:35
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 02 July 2008 :  12:50:52  Show Profile  Reply with Quote
Genius!!!!!!!!!!!!!!
Thanksssssssssss
Now everything works fine for SQL<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 02 July 2008 :  14:03:38  Show Profile  Reply with Quote
You're welcome.<
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 04 July 2008 :  14:07:08  Show Profile  Visit Maxime's Homepage  Reply with Quote
I applied all updates proposed here

Change the number of days before expiry of the card
ADODB.Recordset error '800a0cc1'

Unable to find the object in the collection corresponding to the name or the reference asked ordinal.

/forum/greeting_cards_docard.asp, line 188




Removing card sent before the deadline expiry

ADODB.Recordset error '800a0e78'

This operation is not permitted if the subject is closed.

/forum/greeting_cards_clean.asp, line 88
<

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)


Edited by - Maxime on 04 July 2008 14:10:24
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 04 July 2008 :  16:11:11  Show Profile  Reply with Quote
quote:
I found the problem. Delete lines 188-189, the fields he's trying to update do not exist in that table.

You have missed that one for the first error.

For the second error if you are using SQL replace lines 90-92 with:

strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< '" & rev & "'"
set rs = conn.execute (strsql)<

Edited by - texanman on 04 July 2008 16:17:11
Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07