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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Display last 5 forum posts (update)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

adslonline
Starting Member

Netherlands
38 Posts

Posted - 20 March 2004 :  04:05:07  Show Profile  Visit adslonline's Homepage
Hi,

I am working with a friend on a Mod to display the last 5 posts on the forum on my frontpage (portal). Our idea was to show subject/author/date and the first few lines of text of the post in a special format. We had some problems with the simple slash mod and decided to make our own Mod and customize it to our needs.

We have coded some of the mentioned features but we seem to have made an error in the database (mysql) connection code.

Error message:

ADODB.Recordset error '800a0e7d'
The connection cannot be used to execute this query. The connection is closed or not valid in this context

/snitz/lastpost.asp, line 29
line 29 reads:
sql_results.open sql_query, sql_conn

I hope someone could have a look at it, it might be something small.
You can find a texfile link here:
http://marnix.adslforum.nl/snitz/lastpost.txt

Thanks in advance. btw I am running version 3.4.04 and MySQL

www.adslforum.nl

Edited by - adslonline on 20 March 2004 18:30:37

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 20 March 2004 :  04:35:10  Show Profile  Visit HuwR's Homepage

set sql_conn=Server.CreateObject("ADODB.Connection")
set sql_results=Server.CreateObject("ADODB.Recordset")

'execute query and award to sql_results
sql_results.open sql_query, sql_conn

if sql_results.BOF and sql_results.EOF then


although you have told it that sql_conn is a recordset, you have not opened a database.
you need a line like
sql_conn.open YOURCONNECTIONSTRING
Go to Top of Page

adslonline
Starting Member

Netherlands
38 Posts

Posted - 20 March 2004 :  09:27:22  Show Profile  Visit adslonline's Homepage
Hello HuwR, added the connect string and it works perfectly, thanks!

One last question, what function can I use to set a limit to T_Message length in number of characters displayed?

Got it working :)

www.adslforum.nl

Edited by - adslonline on 21 March 2004 02:47:52
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07