|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
MYSQL Recordcount error
I have tried everything that is in this forum that everyone has posted. I am using MYSQL and displaying records in asp. I had my Access database working perfectly. Do to increase in size of database I moved to MYSQL. I can query the database, but anytime I want to display a record count I get a -1. I have set my connection to adopenstatic, even tried adopendynamic. I can not get this code to display the real integer. Is there something wrong with my database. Here is a sample of my code to understand what I am looking at and my problem.
Code:
set buyerconn = Server.CreateObject("adodb.connection")
buyerconn.open "DSN=cddata"
Set buyeror = Server.CreateObject("ADODB.Recordset")
buyeror.activeconnection = buyerconn
buyeror.open "Select * from Buyer_property where agent_number = '" & application("username") & "'", buyerconn, adopendynamic
buyercount = buyeror.recordcount
please help me! Last edited by stumpy : February 5th, 2004 at 06:32 PM. Reason: Please place code in [code] tags |
|
#2
|
|||
|
|||
|
Hi,
This is working for me (with ASP): Code:
set C = Server.CreateObject("ADODB.connection")
C.Open MyConnectionString
set RS = Server.CreateObject("ADODB.Recordset")
set rs.ActiveConnection = C
rs.CursorLocation = 3
rs.Open "SELECT * FROM MyTable"
response.write rs.Recordcount
Steen Pedersen Last edited by stumpy : February 5th, 2004 at 06:31 PM. Reason: Please place code in [code] tags |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > MYSQL Recordcount error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|