MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community 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 November 18th, 2002, 01:53 PM
wolfpac3d wolfpac3d is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Florida
Posts: 6 wolfpac3d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old February 5th, 2004, 04:40 PM
WebMekka WebMekka is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Denmark
Posts: 1 WebMekka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb MySQL and RecordCount

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
Hope you can use it, too.

Steen Pedersen

Last edited by stumpy : February 5th, 2004 at 06:31 PM. Reason: Please place code in [code] tags

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > MYSQL Recordcount error


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


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





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