Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql recordcount 1

Status
Not open for further replies.

dodge20

MIS
Joined
Jan 15, 2003
Messages
1,048
Location
US
I am trying to implement the recordset navigation status for a mysql database using asp. I have never had problems with an access database, but the mysql database doesn't display anything. I believe the problem is with this code

Code:
' set the record count
rsSearchResults_total = rsSearchResults.RecordCount

does anyone know how to make this work in mysql?

Dodge20
 
I had tried that, but dreamweaver does something odd where I can't get that to work. I get this error

Microsoft VBScript runtime (0x800A01CA)
Variable uses an Automation type not supported in VBScript

Dodge20
 
you are probably trying to use a string variable or a value from a recordset as an index for an array or as a loop counter.

Cast the variable used in the line where the error occurs to an numeric type (Cint or Clng)

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
That got rid of the error message, but I still get a null value for rsSearchResults.RecordCount


Do I need to change my connection type? I am using mysql odbc 3.51 driver.

Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/ConnTC.asp" -->
<%
Dim rsSearchResults__varsearch
rsSearchResults__varsearch = "%"
If (Request("Search") <> "") Then 
  rsSearchResults__varsearch = Request("Search")
End If
%>
<%
Dim rsSearchResults
Dim rsSearchResults_numRows

Set rsSearchResults = Server.CreateObject("ADODB.Recordset")
rsSearchResults.ActiveConnection = MM_ConnTimesCitizen_STRING
rsSearchResults.Source = "SELECT *  FROM tccontent  WHERE tcheadline like '%" + Replace(rsSearchResults__varsearch, "'", "''") + "%' or tcbody like '%" + Replace(rsSearchResults__varsearch, "'", "''") + "%' or tcsubhead like '%" + Replace(rsSearchResults__varsearch, "'", "''") + "%' or tccutline like '%" + Replace(rsSearchResults__varsearch, "'", "''") + "%' or tcbyline like '%" + Replace(rsSearchResults__varsearch, "'", "''") + "%'"
rsSearchResults.CursorType = 0
rsSearchResults.CursorLocation = 3
rsSearchResults.LockType = 1
rsSearchResults.Open()

rsSearchResults_numRows = 0

%>

Dodge20
 
I gave up trying to make dreamweaver's recordset work. I ended creating a recordset like the one displayed on your link and it looks to be working fine now.

Thanks

Dodge20
 
I reinstall of dreamweaver fixed this problem.

Dodge20
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top