473,466 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Outputting recordset from mysql

384 Contributor
I'm able to output one value from the database no problem but I can't for the life of me a recordset to ouput from a loop, I've also tried the GetRows() option with and array. Below you can see the way I'm trying now. Any ideas much appreciated at this stage!?

N.B. - The DB connection is working grand.

Expand|Select|Wrap|Line Numbers
  1. Sub test()
  2.     Dim sql
  3.     Dim recSet
  4.     Dim arrayRS
  5.  
  6.     sql = "SELECT value FROM system"
  7.  
  8.     dbOpen()
  9.  
  10.     Set recSet = conn.Execute(sql)
  11.     arrayRS = recSet.GetRows()
  12.  
  13.     dbClose()
  14.  
  15.     For i = LBound(arrayRS) To UBound(arrayRS)
  16.         Response.Write arrayRS(0,i)
  17.     Next
  18.  
  19. End Sub
Jul 8 '10 #1
1 1665
ziycon
384 Contributor
Finally got it working with the below code.
Expand|Select|Wrap|Line Numbers
  1. Sub test()
  2.     Dim sql
  3.     Dim recSet
  4.  
  5.     sql = "SELECT value FROM system"
  6.  
  7.     dbOpen()
  8.  
  9.     Set recSet = conn.Execute(sql)
  10.  
  11.     Do While Not recSet.EOF
  12.         Response.Write recSet("value")+"<br/>"
  13.         recSet.MoveNext
  14.     Loop        
  15.  
  16.     dbClose()
  17.  
  18. End Sub
Jul 8 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Phil Powell | last post by:
I've read some online resources that utilize various MySQL command-line actions to migrate data from Access to MySQL. The situation is this: a group of co-workers of mine will be using an Access...
0
by: gary artim | last post by:
Hi All, I have a problem using DBIx::RecordSet. I get correct results but continue to get these messages on stderr. I looked at Compat.pm and it seems to be pointing out a problem with my call...
0
by: M.C. Scheffers | last post by:
Hello all, I'm developing an VB application which uses the SAX parser and ADO VB to insert.update data in in MySQL. The perormance is very bad. If I use the same data and insert/update to a MS...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
4
by: Gerry Abbott | last post by:
Hi all. I wish to call a recordset from a function. Ive tried the following approach, -------------------------------------------------------- Function PassRS() As Recordset Dim db As...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
8
by: Daz | last post by:
Hi everyone. I was faced with the choice of whether my problem is indeed a PHP problem or a MySQL. I have decided it's a PHP problem as I don't experience the same problem when I execute the...
0
by: PCroser | last post by:
I have encountered a problem when querying a table. The query passed data into a recordset which should have resulted in many records but has returned EOF. After debugging the code the only...
3
by: janetopps | last post by:
I have a news website, with asp pages, which was on Access, and i upgraded to MySQL, i used Bullzip to transfer the data. It had about 1000 pages, which im now able to pull up on the public side. Im...
9
by: munkee | last post by:
All, I am using the following adapted code to export a filtered recordset from a search form in to excel: Option Explicit Private Sub btnexcelexport_Click() 'revised for late binding...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.